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

Unified Diff: Source/platform/graphics/Canvas2DLayerManager.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/Canvas2DLayerBridge.cpp ('k') | Source/platform/graphics/Canvas2DLayerManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/Canvas2DLayerManager.h
diff --git a/Source/platform/graphics/Canvas2DLayerManager.h b/Source/platform/graphics/Canvas2DLayerManager.h
index e2c4e042e6585647ae81c5fed3f74b7b932e2d64..e1ed66e5def32a56b40437b23f55f534a9f796a7 100644
--- a/Source/platform/graphics/Canvas2DLayerManager.h
+++ b/Source/platform/graphics/Canvas2DLayerManager.h
@@ -35,18 +35,19 @@ namespace WebCore {
class PLATFORM_EXPORT Canvas2DLayerManager : public blink::WebThread::TaskObserver {
public:
static Canvas2DLayerManager& get();
+
void init(size_t maxBytesAllocated, size_t targetBytesAllocated);
virtual ~Canvas2DLayerManager();
- void layerAllocatedStorageChanged(Canvas2DLayerBridge*, intptr_t deltaBytes);
+ void layerTransientResourceAllocationChanged(Canvas2DLayerBridge*, intptr_t deltaBytes = 0);
void layerDidDraw(Canvas2DLayerBridge*);
- void layerToBeDestroyed(Canvas2DLayerBridge*);
+
private:
Canvas2DLayerManager();
// internal methods
void freeMemoryIfNecessary();
- bool isInList(Canvas2DLayerBridge*);
+ bool isInList(Canvas2DLayerBridge*) const;
void addLayerToList(Canvas2DLayerBridge*);
void removeLayerFromList(Canvas2DLayerBridge*);
virtual void willProcessTask() OVERRIDE;
« no previous file with comments | « Source/platform/graphics/Canvas2DLayerBridge.cpp ('k') | Source/platform/graphics/Canvas2DLayerManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698