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

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

Issue 16032003: Fixing Canvas2DLayerBridge to handle lost graphics contexts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed unit tests Created 7 years, 7 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 510f479e5cd5dda6bfcee6c7e6c3576f1c0bafec..cfde606f26c15701f1cfe57ad4e8d5aebe94a734 100644
--- a/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h
+++ b/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h
@@ -56,10 +56,7 @@ public:
Threaded
};
- static PassOwnPtr<Canvas2DLayerBridge> create(PassRefPtr<GraphicsContext3D> context, SkDeferredCanvas* canvas, OpacityMode opacityMode, ThreadMode threading)
- {
- return adoptPtr(new Canvas2DLayerBridge(context, canvas, opacityMode, threading));
- }
+ static PassOwnPtr<Canvas2DLayerBridge> create(PassRefPtr<GraphicsContext3D>, const IntSize&, OpacityMode, ThreadMode);
virtual ~Canvas2DLayerBridge();
@@ -84,11 +81,15 @@ public:
WebKit::WebLayer* layer();
void contextAcquired();
+ SkCanvas* getCanvas() {return m_canvas;}
unsigned backBufferTexture();
+ virtual bool isValid(); // virtual for faking
+
protected:
- Canvas2DLayerBridge(PassRefPtr<GraphicsContext3D>, SkDeferredCanvas*, OpacityMode, ThreadMode);
+ Canvas2DLayerBridge(PassRefPtr<GraphicsContext3D>, SkDeferredCanvas*);
+ void init(OpacityMode, ThreadMode);
SkDeferredCanvas* m_canvas;
OwnPtr<WebKit::WebExternalTextureLayer> m_layer;

Powered by Google App Engine
This is Rietveld 408576698