summaryrefslogtreecommitdiffstats
path: root/cc/output
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-26 04:11:08 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-26 04:11:08 +0000
commit0309ba5e0dd0cd544c53de98e17b0261d280bafc (patch)
treecfbda1122db1028816fcca2153c0eeb042632ff5 /cc/output
parentdc000e83ab8ede4242ff2a9df5ec1e195eb3cadc (diff)
downloadchromium_src-0309ba5e0dd0cd544c53de98e17b0261d280bafc.zip
chromium_src-0309ba5e0dd0cd544c53de98e17b0261d280bafc.tar.gz
chromium_src-0309ba5e0dd0cd544c53de98e17b0261d280bafc.tar.bz2
Remove GpuMemoryAllocationForRenderer::enforce_but_do_not_keep_as_policy
It's always false, and we're not planning on using the feature at this point. BUG=None Review URL: https://chromiumcodereview.appspot.com/16972012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208614 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output')
-rw-r--r--cc/output/gl_renderer.cc10
-rw-r--r--cc/output/gl_renderer_unittest.cc5
-rw-r--r--cc/output/renderer.h3
-rw-r--r--cc/output/software_renderer_unittest.cc2
4 files changed, 3 insertions, 17 deletions
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index d7a7cea..8a75101 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -2075,19 +2075,11 @@ void GLRenderer::onMemoryAllocationChanged(
allocation.bytesLimitWhenNotVisible,
PriorityCutoff(allocation.priorityCutoffWhenNotVisible));
- if (allocation.enforceButDoNotKeepAsPolicy)
- client_->EnforceManagedMemoryPolicy(policy);
- else
- client_->SetManagedMemoryPolicy(policy);
+ client_->SetManagedMemoryPolicy(policy);
}
- bool old_discard_backbuffer_when_not_visible =
- discard_backbuffer_when_not_visible_;
discard_backbuffer_when_not_visible_ = !allocation.suggestHaveBackbuffer;
EnforceMemoryPolicy();
- if (allocation.enforceButDoNotKeepAsPolicy)
- discard_backbuffer_when_not_visible_ =
- old_discard_backbuffer_when_not_visible;
}
ManagedMemoryPolicy::PriorityCutoff GLRenderer::PriorityCutoff(
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
index 22180ca..18c21cc 100644
--- a/cc/output/gl_renderer_unittest.cc
+++ b/cc/output/gl_renderer_unittest.cc
@@ -182,9 +182,6 @@ class FakeRendererClient : public RendererClient {
virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
OVERRIDE {
memory_allocation_limit_bytes_ = policy.bytes_limit_when_visible;
- }
- virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
- OVERRIDE {
if (last_call_was_set_visibility_)
*last_call_was_set_visibility_ = false;
}
@@ -860,7 +857,7 @@ TEST(GLRendererTest2, VisibilityChangeIsLastCall) {
bool last_call_was_set_visiblity = false;
// Ensure that the call to setVisibilityCHROMIUM is the last call issue to the
// GPU process, after glFlush is called, and after the RendererClient's
- // EnforceManagedMemoryPolicy is called. Plumb this tracking between both the
+ // SetManagedMemoryPolicy is called. Plumb this tracking between both the
// RenderClient and the Context by giving them both a pointer to a variable on
// the stack.
context->set_last_call_was_set_visibility_pointer(
diff --git a/cc/output/renderer.h b/cc/output/renderer.h
index efb1dfc..3070073 100644
--- a/cc/output/renderer.h
+++ b/cc/output/renderer.h
@@ -28,8 +28,6 @@ class CC_EXPORT RendererClient {
virtual const LayerTreeSettings& Settings() const = 0;
virtual void SetFullRootLayerDamage() = 0;
virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0;
- virtual void EnforceManagedMemoryPolicy(
- const ManagedMemoryPolicy& policy) = 0;
virtual bool HasImplThread() const = 0;
virtual bool ShouldClearRootRenderPass() const = 0;
virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const = 0;
@@ -84,6 +82,7 @@ class CC_EXPORT Renderer {
RendererClient* client_;
+ private:
DISALLOW_COPY_AND_ASSIGN(Renderer);
};
diff --git a/cc/output/software_renderer_unittest.cc b/cc/output/software_renderer_unittest.cc
index b4e91fc..a882c2d 100644
--- a/cc/output/software_renderer_unittest.cc
+++ b/cc/output/software_renderer_unittest.cc
@@ -64,8 +64,6 @@ class SoftwareRendererTest : public testing::Test, public RendererClient {
virtual void SetFullRootLayerDamage() OVERRIDE {}
virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
OVERRIDE {}
- virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
- OVERRIDE {}
virtual bool HasImplThread() const OVERRIDE { return false; }
virtual bool ShouldClearRootRenderPass() const OVERRIDE {
return should_clear_root_render_pass_;