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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 23796002: cc: Implement deadine scheduling disabled by default (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedReadback4
Patch Set: Only tie commit to BEGIN_FRAME_IDLE when deadline enabled 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/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 2f657e1ed88c985968c4e8752d84e02f0e65fb60..443a225769e9031f1dd7a20b7a285511f2e956ea 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1054,11 +1054,11 @@ bool LayerTreeHostImpl::PrepareToDraw(FrameData* frame,
"SourceFrameNumber",
active_tree_->source_frame_number());
- if (need_to_update_visible_tiles_before_draw_) {
- DCHECK(tile_manager_);
- if (tile_manager_->UpdateVisibleTiles())
- DidInitializeVisibleTile();
+ if (need_to_update_visible_tiles_before_draw_ &&
+ tile_manager_ && tile_manager_->UpdateVisibleTiles()) {
+ DidInitializeVisibleTile();
}
+ need_to_update_visible_tiles_before_draw_ = true;
active_tree_->UpdateDrawProperties();
@@ -1096,6 +1096,10 @@ void LayerTreeHostImpl::BlockNotifyReadyToActivateForTesting(bool block) {
NOTREACHED();
}
+void LayerTreeHostImpl::DidInitializeVisibleTileForTesting() {
+ DidInitializeVisibleTile();
+}
+
void LayerTreeHostImpl::EnforceManagedMemoryPolicy(
const ManagedMemoryPolicy& policy) {
@@ -1154,7 +1158,7 @@ void LayerTreeHostImpl::DidInitializeVisibleTile() {
// TODO(reveman): Determine tiles that changed and only damage
// what's necessary.
SetFullRootLayerDamage();
- if (client_)
+ if (client_ && !client_->IsInsideDraw())
client_->DidInitializeVisibleTileOnImplThread();
}
@@ -1502,12 +1506,8 @@ void LayerTreeHostImpl::CreatePendingTree() {
}
void LayerTreeHostImpl::UpdateVisibleTiles() {
- DCHECK(!client_->IsInsideDraw()) <<
- "Updating visible tiles within a draw may trigger "
- "spurious redraws.";
if (tile_manager_ && tile_manager_->UpdateVisibleTiles())
DidInitializeVisibleTile();
-
need_to_update_visible_tiles_before_draw_ = false;
}
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698