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

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

Issue 117703004: Free temporary GPU and memory resources held by inactive or hidden 2D canvases (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: typo Created 6 years, 11 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
« no previous file with comments | « Source/platform/graphics/ImageBuffer.h ('k') | Source/web/tests/Canvas2DLayerManagerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ImageBufferSurface.h
diff --git a/Source/platform/graphics/ImageBufferSurface.h b/Source/platform/graphics/ImageBufferSurface.h
index 60f955284ba79eb743a2f83814604939c97a6bc6..f05c021ff0b368eca0b8a6fb7dd85340c65788ab 100644
--- a/Source/platform/graphics/ImageBufferSurface.h
+++ b/Source/platform/graphics/ImageBufferSurface.h
@@ -65,6 +65,7 @@ public:
virtual const SkBitmap& cachedBitmap() const;
virtual void invalidateCachedBitmap() { }
virtual void updateCachedBitmapIfNeeded() { }
+ virtual void setIsHidden(bool) { }
OpacityMode opacityMode() const { return m_opacityMode; }
const IntSize& size() const { return m_size; }
@@ -75,7 +76,9 @@ protected:
ImageBufferSurface(const IntSize& size, OpacityMode opacityMode)
: m_opacityMode(opacityMode)
, m_size(size)
- { }
+ {
+ setIsHidden(false);
+ }
private:
OpacityMode m_opacityMode;
« no previous file with comments | « Source/platform/graphics/ImageBuffer.h ('k') | Source/web/tests/Canvas2DLayerManagerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698