OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ | 5 #ifndef CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ |
6 #define CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ | 6 #define CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 CC_BLINK_EXPORT explicit WebExternalTextureLayerImpl( | 36 CC_BLINK_EXPORT explicit WebExternalTextureLayerImpl( |
37 blink::WebExternalTextureLayerClient*); | 37 blink::WebExternalTextureLayerClient*); |
38 virtual ~WebExternalTextureLayerImpl(); | 38 virtual ~WebExternalTextureLayerImpl(); |
39 | 39 |
40 // blink::WebExternalTextureLayer implementation. | 40 // blink::WebExternalTextureLayer implementation. |
41 virtual blink::WebLayer* layer(); | 41 virtual blink::WebLayer* layer(); |
42 virtual void clearTexture(); | 42 virtual void clearTexture(); |
43 virtual void setOpaque(bool opaque); | 43 virtual void setOpaque(bool opaque); |
44 virtual void setPremultipliedAlpha(bool premultiplied); | 44 virtual void setPremultipliedAlpha(bool premultiplied); |
45 virtual void setBlendBackgroundColor(bool blend); | 45 virtual void setBlendBackgroundColor(bool blend); |
46 virtual void setRateLimitContext(bool rate_limit); | |
47 virtual void setNearestNeighbor(bool nearest_neighbor); | 46 virtual void setNearestNeighbor(bool nearest_neighbor); |
48 | 47 |
49 // TextureLayerClient implementation. | 48 // TextureLayerClient implementation. |
50 bool PrepareTextureMailbox( | 49 bool PrepareTextureMailbox( |
51 cc::TextureMailbox* mailbox, | 50 cc::TextureMailbox* mailbox, |
52 scoped_ptr<cc::SingleReleaseCallback>* release_callback, | 51 scoped_ptr<cc::SingleReleaseCallback>* release_callback, |
53 bool use_shared_memory) override; | 52 bool use_shared_memory) override; |
54 | 53 |
55 private: | 54 private: |
56 static void DidReleaseMailbox( | 55 static void DidReleaseMailbox( |
57 base::WeakPtr<WebExternalTextureLayerImpl> layer, | 56 base::WeakPtr<WebExternalTextureLayerImpl> layer, |
58 const blink::WebExternalTextureMailbox& mailbox, | 57 const blink::WebExternalTextureMailbox& mailbox, |
59 WebExternalBitmapImpl* bitmap, | 58 WebExternalBitmapImpl* bitmap, |
60 unsigned sync_point, | 59 unsigned sync_point, |
61 bool lost_resource); | 60 bool lost_resource); |
62 | 61 |
63 WebExternalBitmapImpl* AllocateBitmap(); | 62 WebExternalBitmapImpl* AllocateBitmap(); |
64 | 63 |
65 blink::WebExternalTextureLayerClient* client_; | 64 blink::WebExternalTextureLayerClient* client_; |
66 scoped_ptr<WebLayerImpl> layer_; | 65 scoped_ptr<WebLayerImpl> layer_; |
67 ScopedVector<WebExternalBitmapImpl> free_bitmaps_; | 66 ScopedVector<WebExternalBitmapImpl> free_bitmaps_; |
68 | 67 |
69 DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl); | 68 DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl); |
70 }; | 69 }; |
71 | 70 |
72 } // namespace cc_blink | 71 } // namespace cc_blink |
73 | 72 |
74 #endif // CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ | 73 #endif // CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ |
OLD | NEW |