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

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: Resolved merge with rate limiter CL 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 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 e77fc69b0ecd43d47278075e5fa3ea261466b89b..12f87fa0f0dd9af0e2c5a6eb8c314d46ec4bd97f 100644
--- a/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h
+++ b/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h
@@ -51,10 +51,7 @@ public:
NonOpaque
};
- static PassOwnPtr<Canvas2DLayerBridge> create(PassRefPtr<GraphicsContext3D> context, SkDeferredCanvas* canvas, OpacityMode opacityMode)
- {
- return adoptPtr(new Canvas2DLayerBridge(context, canvas, opacityMode));
- }
+ static PassOwnPtr<Canvas2DLayerBridge> create(PassRefPtr<GraphicsContext3D>, const IntSize&, OpacityMode);
virtual ~Canvas2DLayerBridge();
@@ -78,9 +75,12 @@ public:
WebKit::WebLayer* layer();
void contextAcquired();
+ SkCanvas* getCanvas() { return m_canvas; }
unsigned backBufferTexture();
+ bool isValid();
+
protected:
Canvas2DLayerBridge(PassRefPtr<GraphicsContext3D>, SkDeferredCanvas*, OpacityMode);
void setRateLimitingEnabled(bool);
@@ -90,6 +90,7 @@ protected:
RefPtr<GraphicsContext3D> m_context;
size_t m_bytesAllocated;
bool m_didRecordDrawCommand;
+ bool m_surfaceIsValid;
int m_framesPending;
bool m_rateLimitingEnabled;
« 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