summaryrefslogtreecommitdiffstats
path: root/cc/output/renderer.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-09 17:24:32 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-09 17:24:32 +0000
commit573e8e3e2d975af0be8bcdddef0bcc6487ec4a1e (patch)
treeddf1fa64341e23419bc37efe0904495d0edbe256 /cc/output/renderer.h
parent13b31b46110bb70a7dc9bbc8ebc4594442725dac (diff)
downloadchromium_src-573e8e3e2d975af0be8bcdddef0bcc6487ec4a1e.zip
chromium_src-573e8e3e2d975af0be8bcdddef0bcc6487ec4a1e.tar.gz
chromium_src-573e8e3e2d975af0be8bcdddef0bcc6487ec4a1e.tar.bz2
cc: Remove most methods from RendererClient.
This class is being used to pass data to the Renderer, but it's more clear if we just pass the data directly when we call DrawFrame. There are also some interesting round trips where OutputSurface sets data on the OutputSurfaceClient (LayerTreeHostImpl) which just stores the data. Then the data is accessed through the RendererClient or on the LTHI directly, but in places that could just query it from the OutputSurface directly. This patch unravels one of these loops with HasExternalStencilTest(). The remaining two getters on RendererClient are called in both DrawFrame and in SwapBuffers, so I'm not sure if we want to pass them directly to both functions (redundency is error-prone) or we have some other nice idea to get rid of them. R=enne BUG= Review URL: https://chromiumcodereview.appspot.com/23961003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/renderer.h')
-rw-r--r--cc/output/renderer.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/cc/output/renderer.h b/cc/output/renderer.h
index 7624a5b..32a109f 100644
--- a/cc/output/renderer.h
+++ b/cc/output/renderer.h
@@ -23,15 +23,8 @@ class CC_EXPORT RendererClient {
// contained within the output surface size.
virtual gfx::Rect DeviceViewport() const = 0;
virtual gfx::Rect DeviceClip() const = 0;
-
- virtual float DeviceScaleFactor() const = 0;
- virtual const LayerTreeSettings& Settings() const = 0;
virtual void SetFullRootLayerDamage() = 0;
- virtual bool HasImplThread() const = 0;
- virtual bool ShouldClearRootRenderPass() const = 0;
virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const = 0;
- virtual bool AllowPartialSwap() const = 0;
- virtual bool ExternalStencilTestEnabled() const = 0;
protected:
virtual ~RendererClient() {}
@@ -43,8 +36,6 @@ class CC_EXPORT Renderer {
virtual const RendererCapabilities& Capabilities() const = 0;
- const LayerTreeSettings& Settings() const { return client_->Settings(); }
-
virtual void ViewportChanged() {}
virtual bool CanReadPixels() const = 0;
@@ -54,11 +45,12 @@ class CC_EXPORT Renderer {
virtual bool HaveCachedResourcesForRenderPassId(RenderPass::Id id) const;
// This passes ownership of the render passes to the renderer. It should
- // consume them, and empty the list.
- // The |offscreen_context_provider| may change from frame to frame and should
- // not be cached.
+ // consume them, and empty the list. The parameters here may change from frame
+ // to frame and should not be cached.
virtual void DrawFrame(RenderPassList* render_passes_in_draw_order,
- ContextProvider* offscreen_context_provider) = 0;
+ ContextProvider* offscreen_context_provider,
+ float device_scale_factor,
+ bool allow_partial_swap) = 0;
// Waits for rendering to finish.
virtual void Finish() = 0;
@@ -82,10 +74,11 @@ class CC_EXPORT Renderer {
virtual void SetDiscardBackBufferWhenNotVisible(bool discard) = 0;
protected:
- explicit Renderer(RendererClient* client)
- : client_(client) {}
+ explicit Renderer(RendererClient* client, const LayerTreeSettings* settings)
+ : client_(client), settings_(settings) {}
RendererClient* client_;
+ const LayerTreeSettings* settings_;
private:
DISALLOW_COPY_AND_ASSIGN(Renderer);