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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2668873002: cc: Add checker-imaging support to TileManager. (Closed)
Patch Set: remove include Created 3 years, 10 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_host_impl_unittest.cc » ('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 2f70262d5baae6b70d3ac63491817e1b9cb1ec90..8720ed7b1471d12b525cfef5c6fd59bdd47dc4df 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -236,8 +236,7 @@ LayerTreeHostImpl::LayerTreeHostImpl(
is_synchronous_single_threaded_
? std::numeric_limits<size_t>::max()
: settings.scheduled_raster_task_limit,
- settings.use_partial_raster,
- settings.check_tile_priority_inversion),
+ settings.ToTileManagerSettings()),
pinch_gesture_active_(false),
pinch_gesture_end_should_clear_scrolling_layer_(false),
fps_counter_(
@@ -353,6 +352,14 @@ void LayerTreeHostImpl::BeginCommit() {
void LayerTreeHostImpl::CommitComplete() {
TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete");
+ UpdateSyncTreeAfterCommitOrImplSideInvalidation();
+ micro_benchmark_controller_.DidCompleteCommit();
+}
+
+void LayerTreeHostImpl::UpdateSyncTreeAfterCommitOrImplSideInvalidation() {
+ sync_tree()->InvalidateRegionForImages(
+ tile_manager_.TakeImagesToInvalidateOnSyncTree());
+
if (CommitToActiveTree()) {
// We have to activate animations here or "IsActive()" is true on the layers
// but the animations aren't activated yet so they get ignored by
@@ -394,8 +401,6 @@ void LayerTreeHostImpl::CommitComplete() {
if (CommitToActiveTree())
NotifyReadyToDraw();
}
-
- micro_benchmark_controller_.DidCompleteCommit();
}
bool LayerTreeHostImpl::CanDraw() const {
@@ -1055,6 +1060,14 @@ void LayerTreeHostImpl::SetViewportDamage(const gfx::Rect& damage_rect) {
viewport_damage_rect_.Union(damage_rect);
}
+void LayerTreeHostImpl::InvalidateContentOnImplSide() {
+ DCHECK(!pending_tree_);
+
+ if (!CommitToActiveTree())
+ CreatePendingTree();
+ UpdateSyncTreeAfterCommitOrImplSideInvalidation();
+}
+
DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) {
TRACE_EVENT1("cc", "LayerTreeHostImpl::PrepareToDraw", "SourceFrameNumber",
active_tree_->source_frame_number());
@@ -1312,6 +1325,10 @@ gfx::ColorSpace LayerTreeHostImpl::GetTileColorSpace() const {
return sync_tree()->device_color_space();
}
+void LayerTreeHostImpl::RequestImplSideInvalidation() {
+ client_->NeedsImplSideInvalidation();
+}
+
void LayerTreeHostImpl::NotifyReadyToActivate() {
client_->NotifyReadyToActivate();
}
@@ -2029,6 +2046,7 @@ void LayerTreeHostImpl::ActivateSyncTree() {
if (!active_tree_->picture_layers().empty())
DidModifyTilePriorities();
+ tile_manager_.DidActivateSyncTree();
client_->OnCanDrawStateChanged(CanDraw());
client_->DidActivateSyncTree();
if (!tree_activation_callback_.is_null())
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698