OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebExternalTextureLayerImpl_h | 5 #ifndef WEBKIT_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ |
6 #define WebExternalTextureLayerImpl_h | 6 #define WEBKIT_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/layers/texture_layer_client.h" | 9 #include "cc/layers/texture_layer_client.h" |
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL
ayer.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL
ayer.h" |
11 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" | 11 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" |
12 | 12 |
13 namespace WebKit { | 13 namespace WebKit { struct WebFloatRect; } |
| 14 |
| 15 namespace webkit { |
14 | 16 |
15 class WebLayerImpl; | 17 class WebLayerImpl; |
16 struct WebFloatRect; | |
17 | 18 |
18 class WebExternalTextureLayerImpl : public WebExternalTextureLayer, | 19 class WebExternalTextureLayerImpl : public WebKit::WebExternalTextureLayer, |
19 public cc::TextureLayerClient { | 20 public cc::TextureLayerClient { |
20 public: | 21 public: |
21 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebExternalTextureLayerImpl( | 22 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebExternalTextureLayerImpl( |
22 WebExternalTextureLayerClient*); | 23 WebKit::WebExternalTextureLayerClient*); |
23 virtual ~WebExternalTextureLayerImpl(); | 24 virtual ~WebExternalTextureLayerImpl(); |
24 | 25 |
25 // WebExternalTextureLayer implementation. | 26 // WebKit::WebExternalTextureLayer implementation. |
26 virtual WebLayer* layer(); | 27 virtual WebKit::WebLayer* layer(); |
27 virtual void setTextureId(unsigned); | 28 virtual void setTextureId(unsigned texture_id); |
28 virtual void setFlipped(bool); | 29 virtual void setFlipped(bool flipped); |
29 virtual void setUVRect(const WebFloatRect&); | 30 virtual void setUVRect(const WebKit::WebFloatRect& uv_rect); |
30 virtual void setOpaque(bool); | 31 virtual void setOpaque(bool opaque); |
31 virtual void setPremultipliedAlpha(bool); | 32 virtual void setPremultipliedAlpha(bool premultiplied); |
32 virtual void willModifyTexture(); | 33 virtual void willModifyTexture(); |
33 virtual void setRateLimitContext(bool); | 34 virtual void setRateLimitContext(bool rate_limit); |
34 | 35 |
35 // TextureLayerClient implementation. | 36 // TextureLayerClient implementation. |
36 virtual unsigned prepareTexture(cc::ResourceUpdateQueue&) OVERRIDE; | 37 virtual unsigned prepareTexture(cc::ResourceUpdateQueue&) OVERRIDE; |
37 virtual WebGraphicsContext3D* context() OVERRIDE; | 38 virtual WebKit::WebGraphicsContext3D* context() OVERRIDE; |
38 | 39 |
39 private: | 40 private: |
40 WebExternalTextureLayerClient* client_; | 41 WebKit::WebExternalTextureLayerClient* client_; |
41 scoped_ptr<WebLayerImpl> layer_; | 42 scoped_ptr<WebLayerImpl> layer_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl); |
42 }; | 45 }; |
43 | 46 |
44 } | 47 } // namespace webkit |
45 | 48 |
46 #endif // WebExternalTextureLayerImpl_h | 49 #endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ |
OLD | NEW |