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

Unified Diff: Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h

Issue 14298018: This CL implements the first draft of Canvas 2D Context Attributes, aka getContext('2d', { alpha: f… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixes from review comments; remove WebPreferences.h changes; fix comment. Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h
diff --git a/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h b/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h
index 7cfc309498cab9e5312d4ae59c0a2b742f40187c..ad139ae51f2f6e27ed4a406f5efb05de40042e20 100644
--- a/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h
+++ b/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h
@@ -44,14 +44,19 @@ namespace WebCore {
class Canvas2DLayerBridge : public WebKit::WebExternalTextureLayerClient, public SkDeferredCanvas::NotificationClient, public DoublyLinkedListNode<Canvas2DLayerBridge> {
WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge);
public:
+ enum OpacityMode {
+ Opaque,
+ NonOpaque
+ };
+
enum ThreadMode {
SingleThread,
Threaded
};
- static PassOwnPtr<Canvas2DLayerBridge> create(PassRefPtr<GraphicsContext3D> context, const IntSize& size, ThreadMode threading, unsigned textureId)
+ static PassOwnPtr<Canvas2DLayerBridge> create(PassRefPtr<GraphicsContext3D> context, const IntSize& size, OpacityMode opacityMode, ThreadMode threading, unsigned textureId)
{
- return adoptPtr(new Canvas2DLayerBridge(context, size, threading, textureId));
+ return adoptPtr(new Canvas2DLayerBridge(context, size, opacityMode, threading, textureId));
}
virtual ~Canvas2DLayerBridge();
@@ -82,7 +87,7 @@ public:
unsigned backBufferTexture();
protected:
- Canvas2DLayerBridge(PassRefPtr<GraphicsContext3D>, const IntSize&, ThreadMode, unsigned textureId);
+ Canvas2DLayerBridge(PassRefPtr<GraphicsContext3D>, const IntSize&, OpacityMode, ThreadMode, unsigned textureId);
unsigned m_backBufferTexture;
IntSize m_size;

Powered by Google App Engine
This is Rietveld 408576698