summaryrefslogtreecommitdiffstats
path: root/cc/output/renderer.h
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-29 13:11:04 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-29 13:11:04 +0000
commitfd32d12c2b5df2ea7391003dca7307094535a297 (patch)
treeda94ae6e14da3c03f679bb81a848fa653d6beca2 /cc/output/renderer.h
parentfecf9f77fccd08c22e9655843a534c79ed0ba567 (diff)
downloadchromium_src-fd32d12c2b5df2ea7391003dca7307094535a297.zip
chromium_src-fd32d12c2b5df2ea7391003dca7307094535a297.tar.gz
chromium_src-fd32d12c2b5df2ea7391003dca7307094535a297.tar.bz2
cc: Pipe visibility and memory allocation to DelegatingRenderer
The GPU process makes memory allocation decisions based on the visibility of surface. In the DelegatingRenderer case we don't use the surface directly, but we still have it - just like composite-to-mailbox. So we can use setVisibilityCHROMIUM to signal the GPU process, and listen to the memory allocation callback. This CL refactors a bunch of the logic that was hardcoded in GLRenderer into OutputSurface which is shared. That also opens the door to implementing a memory manager for the software renderer. BUG=123444 Review URL: https://chromiumcodereview.appspot.com/18121005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/renderer.h')
-rw-r--r--cc/output/renderer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/output/renderer.h b/cc/output/renderer.h
index 3070073..3a628ad 100644
--- a/cc/output/renderer.h
+++ b/cc/output/renderer.h
@@ -8,7 +8,6 @@
#include "base/basictypes.h"
#include "cc/base/cc_export.h"
#include "cc/quads/render_pass.h"
-#include "cc/resources/managed_memory_policy.h"
#include "cc/trees/layer_tree_host.h"
namespace cc {
@@ -27,7 +26,6 @@ class CC_EXPORT RendererClient {
virtual float DeviceScaleFactor() const = 0;
virtual const LayerTreeSettings& Settings() const = 0;
virtual void SetFullRootLayerDamage() = 0;
- virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0;
virtual bool HasImplThread() const = 0;
virtual bool ShouldClearRootRenderPass() const = 0;
virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const = 0;
@@ -76,6 +74,8 @@ class CC_EXPORT Renderer {
size_t bytes_visible_and_nearby,
size_t bytes_allocated) = 0;
+ virtual void SetDiscardBackBufferWhenNotVisible(bool discard) = 0;
+
protected:
explicit Renderer(RendererClient* client)
: client_(client) {}