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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 1131633003: cc: Use multiple PrepareTiles approaches Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 54776e77315b74a08c74c23351547aeb77b6bc73..35cc487b77f9bad282a4114628e8f3f7e4246af9 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -98,6 +98,7 @@ class LayerTreeHostImplClient {
virtual void OnCanDrawStateChanged(bool can_draw) = 0;
virtual void NotifyReadyToActivate() = 0;
virtual void NotifyReadyToDraw() = 0;
+ virtual void SetRequiresHighResToDraw(bool required) = 0;
// Please call these 3 functions through
// LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and
// SetNeedsAnimate().
@@ -105,7 +106,7 @@ class LayerTreeHostImplClient {
virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0;
virtual void SetNeedsAnimateOnImplThread() = 0;
virtual void SetNeedsCommitOnImplThread() = 0;
- virtual void SetNeedsPrepareTilesOnImplThread() = 0;
+ virtual void SetNeedsPrepareTilesOnImplThread(bool for_commit) = 0;
virtual void SetVideoNeedsBeginFrames(bool needs_begin_frames) = 0;
virtual void PostAnimationEventsToMainThreadOnImplThread(
scoped_ptr<AnimationEventsVector> events) = 0;
@@ -118,7 +119,6 @@ class LayerTreeHostImplClient {
virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
base::TimeDelta delay) = 0;
virtual void DidActivateSyncTree() = 0;
- virtual void DidPrepareTiles() = 0;
// Called when page scale animation has completed on the impl thread.
virtual void DidCompletePageScaleAnimationOnImplThread() = 0;
@@ -499,8 +499,10 @@ class CC_EXPORT LayerTreeHostImpl
// TODO(weiliangc): Replace RequiresHighResToDraw with scheduler waits for
// ReadyToDraw. crbug.com/469175
- void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; }
- void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; }
+ void SetRequiresHighResToDraw(bool required) {
+ requires_high_res_to_draw_ = required;
+ client_->SetRequiresHighResToDraw(required);
+ }
bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; }
// Only valid for synchronous (non-scheduled) single-threaded case.

Powered by Google App Engine
This is Rietveld 408576698