Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Side by Side Diff: webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h

Issue 18432002: Blend TextureLayer background-color at draw time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolved conflicts with TOT Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ 5 #ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_
6 #define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ 6 #define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_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 19 matching lines...) Expand all
30 public: 30 public:
31 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebExternalTextureLayerImpl( 31 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebExternalTextureLayerImpl(
32 WebKit::WebExternalTextureLayerClient*); 32 WebKit::WebExternalTextureLayerClient*);
33 virtual ~WebExternalTextureLayerImpl(); 33 virtual ~WebExternalTextureLayerImpl();
34 34
35 // WebKit::WebExternalTextureLayer implementation. 35 // WebKit::WebExternalTextureLayer implementation.
36 virtual WebKit::WebLayer* layer(); 36 virtual WebKit::WebLayer* layer();
37 virtual void clearTexture(); 37 virtual void clearTexture();
38 virtual void setOpaque(bool opaque); 38 virtual void setOpaque(bool opaque);
39 virtual void setPremultipliedAlpha(bool premultiplied); 39 virtual void setPremultipliedAlpha(bool premultiplied);
40 virtual void setBlendBackgroundColor(bool blend);
40 virtual void setRateLimitContext(bool rate_limit); 41 virtual void setRateLimitContext(bool rate_limit);
41 42
42 // TextureLayerClient implementation. 43 // TextureLayerClient implementation.
43 virtual unsigned PrepareTexture() OVERRIDE; 44 virtual unsigned PrepareTexture() OVERRIDE;
44 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE; 45 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE;
45 virtual bool PrepareTextureMailbox(cc::TextureMailbox* mailbox, 46 virtual bool PrepareTextureMailbox(cc::TextureMailbox* mailbox,
46 bool use_shared_memory) OVERRIDE; 47 bool use_shared_memory) OVERRIDE;
47 48
48 private: 49 private:
49 static void DidReleaseMailbox( 50 static void DidReleaseMailbox(
50 base::WeakPtr<WebExternalTextureLayerImpl> layer, 51 base::WeakPtr<WebExternalTextureLayerImpl> layer,
51 const WebKit::WebExternalTextureMailbox& mailbox, 52 const WebKit::WebExternalTextureMailbox& mailbox,
52 WebExternalBitmapImpl* bitmap, 53 WebExternalBitmapImpl* bitmap,
53 unsigned sync_point, 54 unsigned sync_point,
54 bool lost_resource); 55 bool lost_resource);
55 56
56 WebExternalBitmapImpl* AllocateBitmap(); 57 WebExternalBitmapImpl* AllocateBitmap();
57 58
58 WebKit::WebExternalTextureLayerClient* client_; 59 WebKit::WebExternalTextureLayerClient* client_;
59 scoped_ptr<WebLayerImpl> layer_; 60 scoped_ptr<WebLayerImpl> layer_;
60 ScopedVector<WebExternalBitmapImpl> free_bitmaps_; 61 ScopedVector<WebExternalBitmapImpl> free_bitmaps_;
61 62
62 DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl); 63 DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl);
63 }; 64 };
64 65
65 } // namespace webkit 66 } // namespace webkit
66 67
67 #endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H _ 68 #endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H _
OLDNEW
« no previous file with comments | « content/common/cc_messages_unittest.cc ('k') | webkit/renderer/compositor_bindings/web_external_texture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698