Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(851)

Unified Diff: cc/output/renderer.h

Issue 23961003: cc: Remove most methods from RendererClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rendererclient: rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/output_surface_client.h ('k') | cc/output/software_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/renderer.h
diff --git a/cc/output/renderer.h b/cc/output/renderer.h
index 7624a5befa1b5098465f52c32e77d9199d313170..32a109fac85d53c798f6f1c53ee4affb4f279928 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);
« no previous file with comments | « cc/output/output_surface_client.h ('k') | cc/output/software_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698