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

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

Issue 211503006: Implementation of 2D canvas context lost/restored events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 9 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/platform/graphics/Canvas2DLayerBridge.h
diff --git a/Source/platform/graphics/Canvas2DLayerBridge.h b/Source/platform/graphics/Canvas2DLayerBridge.h
index 97bb905411eb5e089c35ca6a36b7613bc9c10cd5..79eb606de4bf686b72175eb74b6889f6a7c33663 100644
--- a/Source/platform/graphics/Canvas2DLayerBridge.h
+++ b/Source/platform/graphics/Canvas2DLayerBridge.h
@@ -49,6 +49,8 @@ class Canvas2DLayerBridgeTest;
namespace WebCore {
+class ImageBuffer;
+
class PLATFORM_EXPORT Canvas2DLayerBridge : public blink::WebExternalTextureLayerClient, public SkDeferredCanvas::NotificationClient, public DoublyLinkedListNode<Canvas2DLayerBridge>, public RefCounted<Canvas2DLayerBridge> {
WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge);
public:
@@ -70,12 +72,13 @@ public:
// ImageBufferSurface implementation
void willUse();
SkCanvas* canvas() const { return m_canvas.get(); }
- bool surfaceIsValid();
- bool recoverSurface();
+ bool checkSurfaceValid();
+ bool restoreSurface();
blink::WebLayer* layer() const;
Platform3DObject getBackingTexture();
bool isAccelerated() const { return true; }
void setIsHidden(bool);
+ void setImageBuffer(ImageBuffer* imageBuffer) { m_imageBuffer = imageBuffer; }
// Methods used by Canvas2DLayerManager
virtual size_t freeMemoryIfPossible(size_t); // virtual for mocking
@@ -99,10 +102,11 @@ protected:
OwnPtr<SkDeferredCanvas> m_canvas;
OwnPtr<blink::WebExternalTextureLayer> m_layer;
OwnPtr<blink::WebGraphicsContext3DProvider> m_contextProvider;
+ ImageBuffer* m_imageBuffer;
int m_msaaSampleCount;
size_t m_bytesAllocated;
bool m_didRecordDrawCommand;
- bool m_surfaceIsValid;
+ bool m_isSurfaceValid;
int m_framesPending;
int m_framesSinceMailboxRelease;
bool m_destructionInProgress;
« no previous file with comments | « Source/platform/graphics/Canvas2DImageBufferSurface.h ('k') | Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698