summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_output_surface_client.cc
diff options
context:
space:
mode:
authoraelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-03 02:41:07 +0000
committeraelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-03 02:41:07 +0000
commit3f2ff115793c21854acf80b50532a6b03dd172a0 (patch)
tree90b8fb95da57adfe7e8d1855af231a0074118206 /cc/test/fake_output_surface_client.cc
parentd600df7d219890dd9a101922b25d3bff9f4195c3 (diff)
downloadchromium_src-3f2ff115793c21854acf80b50532a6b03dd172a0.zip
chromium_src-3f2ff115793c21854acf80b50532a6b03dd172a0.tar.gz
chromium_src-3f2ff115793c21854acf80b50532a6b03dd172a0.tar.bz2
Add memory policy limit by number of resources.
Currently, MemoryPolicy only limits by number of bytes allocated. For resources like Android gralloc buffers which also have a process or system-wide limit, we also need to limit by count of the resource. This patch implements this and sets a limit of 100 from the AndroidWebView OutputSurface. As additional cleanup, I also moved the ignore-0-memory-policy logic to OutputSurface as it doesn't seem appropriate in CC. New test parametrization for TileManagerTests. NOTRY=true BUG=266619 Review URL: https://chromiumcodereview.appspot.com/20843007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215464 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_output_surface_client.cc')
-rw-r--r--cc/test/fake_output_surface_client.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/cc/test/fake_output_surface_client.cc b/cc/test/fake_output_surface_client.cc
index 7b371ca..2ce6cf0 100644
--- a/cc/test/fake_output_surface_client.cc
+++ b/cc/test/fake_output_surface_client.cc
@@ -21,10 +21,13 @@ void FakeOutputSurfaceClient::DidLoseOutputSurface() {
}
void FakeOutputSurfaceClient::SetMemoryPolicy(
- const ManagedMemoryPolicy& policy,
- bool discard_backbuffer_when_not_visible) {
+ const ManagedMemoryPolicy& policy) {
memory_policy_ = policy;
- discard_backbuffer_when_not_visible_ = discard_backbuffer_when_not_visible;
}
+void FakeOutputSurfaceClient::SetDiscardBackBufferWhenNotVisible(bool discard) {
+ discard_backbuffer_when_not_visible_ = discard;
+}
+
+
} // namespace cc