summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_impl.h
diff options
context:
space:
mode:
authorboliu <boliu@chromium.org>2015-12-16 19:16:09 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-17 03:17:21 +0000
commit7097ee5b1f3691d12f425d719d33698bb90261b6 (patch)
treeaed669749022d3807f631b97bfd0c1071d8ecf2b /cc/trees/layer_tree_host_impl.h
parentc7b7003feae8e21fee0c91a8f6bff2b229d07058 (diff)
downloadchromium_src-7097ee5b1f3691d12f425d719d33698bb90261b6.zip
chromium_src-7097ee5b1f3691d12f425d719d33698bb90261b6.tar.gz
chromium_src-7097ee5b1f3691d12f425d719d33698bb90261b6.tar.bz2
cc: Move draw params from SetExternalDrawConstraints to OnDraw
This is a clean up to move some of the logic spread between LayerTreeHostImpl and SynchronousCompositorOutputSurface about setting and saving parameters for synchronous compositor draws. Move draw parameters to OnDraw. These will be reset before OnDraw returns. Parameters are overridden permanently is set in SetExternalDrawConstraints. BUG=419795 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1418273002 Cr-Commit-Position: refs/heads/master@{#365700}
Diffstat (limited to 'cc/trees/layer_tree_host_impl.h')
-rw-r--r--cc/trees/layer_tree_host_impl.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 188efaf..7f2cc34 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -96,8 +96,6 @@ class LayerTreeHostImplClient {
virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) = 0;
virtual void DidSwapBuffersOnImplThread() = 0;
virtual void DidSwapBuffersCompleteOnImplThread() = 0;
- virtual void OnResourcelessSoftareDrawStateChanged(
- bool resourceless_draw) = 0;
virtual void OnCanDrawStateChanged(bool can_draw) = 0;
virtual void NotifyReadyToActivate() = 0;
virtual void NotifyReadyToDraw() = 0;
@@ -124,7 +122,7 @@ class LayerTreeHostImplClient {
virtual void DidCompletePageScaleAnimationOnImplThread() = 0;
// Called when output surface asks for a draw.
- virtual void OnDrawForOutputSurface() = 0;
+ virtual void OnDrawForOutputSurface(bool resourceless_software_draw) = 0;
virtual void PostFrameTimingEventsOnImplThread(
scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
@@ -349,20 +347,19 @@ class CC_EXPORT LayerTreeHostImpl
void CommitVSyncParameters(base::TimeTicks timebase,
base::TimeDelta interval) override;
void SetNeedsRedrawRect(const gfx::Rect& rect) override;
- void SetExternalDrawConstraints(
- const gfx::Transform& transform,
- const gfx::Rect& viewport,
- const gfx::Rect& clip,
- const gfx::Rect& viewport_rect_for_tile_priority,
- const gfx::Transform& transform_for_tile_priority,
- bool resourceless_software_draw) override;
+ void SetExternalTilePriorityConstraints(
+ const gfx::Rect& viewport_rect,
+ const gfx::Transform& transform) override;
void DidLoseOutputSurface() override;
void DidSwapBuffers() override;
void DidSwapBuffersComplete() override;
void ReclaimResources(const CompositorFrameAck* ack) override;
void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
void SetTreeActivationCallback(const base::Closure& callback) override;
- void OnDraw() override;
+ void OnDraw(const gfx::Transform& transform,
+ const gfx::Rect& viewport,
+ const gfx::Rect& clip,
+ bool resourceless_software_draw) override;
// Called from LayerTreeImpl.
void OnCanDrawStateChangedForTree();