Line data Source code
1 : /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 : * This Source Code Form is subject to the terms of the Mozilla Public
3 : * License, v. 2.0. If a copy of the MPL was not distributed with this
4 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 :
6 : #ifndef MOZILLA_GFX_RENDERTEXTUREHOST_H
7 : #define MOZILLA_GFX_RENDERTEXTUREHOST_H
8 :
9 : #include "nsISupportsImpl.h"
10 : #include "mozilla/gfx/2D.h"
11 : #include "mozilla/layers/LayersSurfaces.h"
12 : #include "mozilla/RefPtr.h"
13 :
14 : namespace mozilla {
15 : namespace wr {
16 :
17 : class RenderBufferTextureHost;
18 : class RenderTextureHostOGL;
19 :
20 : class RenderTextureHost
21 : {
22 0 : NS_INLINE_DECL_THREADSAFE_REFCOUNTING(RenderTextureHost)
23 :
24 : public:
25 : RenderTextureHost();
26 :
27 : virtual bool Lock() = 0;
28 : virtual void Unlock() = 0;
29 :
30 0 : virtual RenderBufferTextureHost* AsBufferTextureHost() { return nullptr; }
31 0 : virtual RenderTextureHostOGL* AsTextureHostOGL() { return nullptr; }
32 :
33 : protected:
34 : virtual ~RenderTextureHost();
35 : };
36 :
37 : } // namespace wr
38 : } // namespace mozilla
39 :
40 : #endif // MOZILLA_GFX_RENDERTEXTUREHOST_H
|