summaryrefslogtreecommitdiffstats
path: root/cc/layer_tree_host_impl.h
diff options
context:
space:
mode:
authorccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-17 20:16:29 +0000
committerccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-17 20:16:29 +0000
commitb1969fa51d6090a04b5a92cf7789c92ed993f4cc (patch)
treea62ad21c1defa3a119594b82583678dcc268ab2b /cc/layer_tree_host_impl.h
parent886602e91111381c4524ca09fbcbfb9d7887f3d5 (diff)
downloadchromium_src-b1969fa51d6090a04b5a92cf7789c92ed993f4cc.zip
chromium_src-b1969fa51d6090a04b5a92cf7789c92ed993f4cc.tar.gz
chromium_src-b1969fa51d6090a04b5a92cf7789c92ed993f4cc.tar.bz2
Set memory allocation with visibility, instead of through manager.
This change makes tabs drop their backbuffers and memory usage immediately upon receiving a visibility change notification, instead of going indirectly through the GPU memory manager. In the future there will be a separate bytes-and-priority limit for both visible and non-visible states (as opposed to the current bytes-only limit for when you're visible and 0 otherwise). The priority limit allow, say, drop everything but visible content. BUG=134750 Review URL: https://chromiumcodereview.appspot.com/11078017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162507 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer_tree_host_impl.h')
-rw-r--r--cc/layer_tree_host_impl.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/cc/layer_tree_host_impl.h b/cc/layer_tree_host_impl.h
index 1a56c14..b6f57e5 100644
--- a/cc/layer_tree_host_impl.h
+++ b/cc/layer_tree_host_impl.h
@@ -43,7 +43,8 @@ public:
virtual void setNeedsRedrawOnImplThread() = 0;
virtual void setNeedsCommitOnImplThread() = 0;
virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<CCAnimationEventsVector>, double wallClockTime) = 0;
- virtual void releaseContentsTexturesOnImplThread() = 0;
+ // Returns true if resources were deleted by this call.
+ virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes) = 0;
};
// CCPinchZoomViewport models the bounds and offset of the viewport that is used during a pinch-zoom operation.
@@ -151,7 +152,6 @@ public:
virtual void didLoseContext() OVERRIDE;
virtual void onSwapBuffersComplete() OVERRIDE;
virtual void setFullRootLayerDamage() OVERRIDE;
- virtual void releaseContentsTextures() OVERRIDE;
virtual void setMemoryAllocationLimitBytes(size_t) OVERRIDE;
// WebCompositorOutputSurfaceClient implementation.
@@ -197,6 +197,7 @@ public:
void setContentsTexturesPurged();
void resetContentsTexturesPurged();
size_t memoryAllocationLimitBytes() const { return m_memoryAllocationLimitBytes; }
+ void reduceContentsTextureMemoryOnImplThread(size_t limitBytes);
void setViewportSize(const IntSize& layoutViewportSize, const IntSize& deviceViewportSize);
const IntSize& layoutViewportSize() const { return m_layoutViewportSize; }