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

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: Fixing gpu_test Canvas2DAllowed Created 7 years, 6 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 68388eadb874f0a53718cb3c890e0cf7d1901060..ed1969624f6ad9aef3ade0ca937c103c9760fe23 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,10 +81,14 @@ public:
WebKit::WebLayer* layer();
void contextAcquired();
+ SkCanvas* getCanvas() { return m_canvas; }
unsigned backBufferTexture();
+ bool isValid();
+
protected:
+ // Special constructor only used for unit testing
Stephen White 2013/07/04 16:11:56 Nit: Is this comment stale? It looks like there's
Justin Novosad 2013/07/04 17:34:04 Done.
Canvas2DLayerBridge(PassRefPtr<GraphicsContext3D>, SkDeferredCanvas*, OpacityMode, ThreadMode);
SkDeferredCanvas* m_canvas;
@@ -95,6 +96,7 @@ protected:
RefPtr<GraphicsContext3D> m_context;
size_t m_bytesAllocated;
bool m_didRecordDrawCommand;
+ bool m_surfaceIsValid;
int m_framesPending;
friend class WTF::DoublyLinkedListNode<Canvas2DLayerBridge>;
« no previous file with comments | « Source/core/platform/graphics/ImageBuffer.cpp ('k') | Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698