/src/mozilla-central/gfx/webrender_bindings/RenderTextureHostWrapper.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #ifndef MOZILLA_GFX_RENDERTEXTUREHOSTWRAPPER_H |
8 | | #define MOZILLA_GFX_RENDERTEXTUREHOSTWRAPPER_H |
9 | | |
10 | | #include "RenderTextureHost.h" |
11 | | |
12 | | namespace mozilla { |
13 | | |
14 | | namespace wr { |
15 | | |
16 | | class RenderTextureHostWrapper final : public RenderTextureHost |
17 | | { |
18 | | public: |
19 | | explicit RenderTextureHostWrapper(); |
20 | | |
21 | | wr::WrExternalImage Lock(uint8_t aChannelIndex, |
22 | | gl::GLContext* aGL, |
23 | | wr::ImageRendering aRendering) override; |
24 | | void Unlock() override; |
25 | | void ClearCachedResources() override; |
26 | | |
27 | 0 | RenderTextureHostWrapper* AsRenderTextureHostWrapper() override { return this; } |
28 | | |
29 | | void UpdateRenderTextureHost(RenderTextureHost* aTextureHost); |
30 | 0 | bool IsInited() { return mInited; } |
31 | | |
32 | | private: |
33 | | ~RenderTextureHostWrapper() override; |
34 | | |
35 | | bool mInited; |
36 | | bool mLocked; |
37 | | RefPtr<RenderTextureHost> mTextureHost; |
38 | | }; |
39 | | |
40 | | } // namespace wr |
41 | | } // namespace mozilla |
42 | | |
43 | | #endif // MOZILLA_GFX_RENDERTEXTUREHOSTWRAPPER_H |