Index: third_party/WebKit/Source/platform/graphics/ImageBuffer.h |
diff --git a/third_party/WebKit/Source/platform/graphics/ImageBuffer.h b/third_party/WebKit/Source/platform/graphics/ImageBuffer.h |
index aa17108136fbe427fb20a4d93822f7db5f08804d..5e5d5ea796f9d0f351ddcd4d554920e285913d9a 100644 |
--- a/third_party/WebKit/Source/platform/graphics/ImageBuffer.h |
+++ b/third_party/WebKit/Source/platform/graphics/ImageBuffer.h |
@@ -72,7 +72,7 @@ public: |
static PassOwnPtr<ImageBuffer> create(const IntSize&, OpacityMode = NonOpaque, ImageInitializationMode = InitializeImagePixels); |
static PassOwnPtr<ImageBuffer> create(PassOwnPtr<ImageBufferSurface>); |
- ~ImageBuffer(); |
+ virtual ~ImageBuffer(); |
void setClient(ImageBufferClient* client) { m_client = client; } |
@@ -90,8 +90,9 @@ public: |
void setFilterQuality(SkFilterQuality filterQuality) { m_surface->setFilterQuality(filterQuality); } |
void setIsHidden(bool hidden) { m_surface->setIsHidden(hidden); } |
- // Called by subclasses of ImageBufferSurface to install a new canvas object |
- void resetCanvas(SkCanvas*) const; |
+ // Called by subclasses of ImageBufferSurface to install a new canvas object. |
+ // Virtual for mocking |
+ virtual void resetCanvas(SkCanvas*) const; |
SkCanvas* canvas() const; |
void disableDeferral() const; |
@@ -135,9 +136,10 @@ public: |
static intptr_t getGlobalGPUMemoryUsage() { return s_globalGPUMemoryUsage; } |
intptr_t getGPUMemoryUsage() { return m_gpuMemoryUsage; } |
-private: |
+protected: |
ImageBuffer(PassOwnPtr<ImageBufferSurface>); |
+private: |
enum SnapshotState { |
InitialSnapshotState, |
DidAcquireSnapshot, |