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 12f87fa0f0dd9af0e2c5a6eb8c314d46ec4bd97f..7fcd7959dbddc0184a1476de2e114bb34ab45031 100644 |
--- a/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h |
+++ b/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h |
@@ -51,7 +51,14 @@ public: |
NonOpaque |
}; |
- static PassOwnPtr<Canvas2DLayerBridge> create(PassRefPtr<GraphicsContext3D>, const IntSize&, OpacityMode); |
+ class Helper { |
+ public: |
+ virtual PassRefPtr<GraphicsContext3D> getContext() = 0; |
+ virtual SkSurface* createSurface(GraphicsContext3D*, const IntSize&) = 0; |
+ virtual ~Helper() { } |
+ }; |
+ |
+ static PassOwnPtr<Canvas2DLayerBridge> create(PassOwnPtr<Helper>, const IntSize&, OpacityMode); |
virtual ~Canvas2DLayerBridge(); |
@@ -76,23 +83,27 @@ public: |
WebKit::WebLayer* layer(); |
void contextAcquired(); |
SkCanvas* getCanvas() { return m_canvas; } |
+ Helper* helper() { return m_helper.get(); } |
unsigned backBufferTexture(); |
bool isValid(); |
protected: |
- Canvas2DLayerBridge(PassRefPtr<GraphicsContext3D>, SkDeferredCanvas*, OpacityMode); |
+ Canvas2DLayerBridge(PassOwnPtr<Helper>, const IntSize&, OpacityMode, bool* success); |
+ |
void setRateLimitingEnabled(bool); |
SkDeferredCanvas* m_canvas; |
OwnPtr<WebKit::WebExternalTextureLayer> m_layer; |
RefPtr<GraphicsContext3D> m_context; |
+ OwnPtr<Helper> m_helper; |
size_t m_bytesAllocated; |
bool m_didRecordDrawCommand; |
bool m_surfaceIsValid; |
int m_framesPending; |
bool m_rateLimitingEnabled; |
+ bool m_contentsDrawable; |
friend class WTF::DoublyLinkedListNode<Canvas2DLayerBridge>; |
Canvas2DLayerBridge* m_next; |