Chromium Code Reviews| 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 722b05392d37f7cf0535eea68288bf35f1bf37bf..6282f1aa5b8dd4d1f82a6821c029d130946aab9a 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_( |
| @@ -352,6 +351,12 @@ void LayerTreeHostImpl::BeginCommit() { |
| void LayerTreeHostImpl::CommitComplete() { |
| TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete"); |
| + UpdateSyncTreeAfterCommitOrImplSideInvalidation(); |
| + micro_benchmark_controller_.DidCompleteCommit(); |
|
vmpstr
2017/02/10 19:25:43
hmm why did you move the micro benchmark controlle
Khushal
2017/02/10 22:09:19
It shouldn't. I took a look at that and there shou
|
| +} |
| + |
| +void LayerTreeHostImpl::UpdateSyncTreeAfterCommitOrImplSideInvalidation() { |
| + AddImplSideInvalidationToSyncTree(); |
| 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 |
| @@ -393,8 +398,6 @@ void LayerTreeHostImpl::CommitComplete() { |
| if (CommitToActiveTree()) |
| NotifyReadyToDraw(); |
| } |
| - |
| - micro_benchmark_controller_.DidCompleteCommit(); |
| } |
| bool LayerTreeHostImpl::CanDraw() const { |
| @@ -1054,6 +1057,19 @@ void LayerTreeHostImpl::SetViewportDamage(const gfx::Rect& damage_rect) { |
| viewport_damage_rect_.Union(damage_rect); |
| } |
| +void LayerTreeHostImpl::InvalidateContentOnImplSide() { |
| + DCHECK(!pending_tree_); |
| + |
| + if (!CommitToActiveTree()) |
| + CreatePendingTree(); |
| + UpdateSyncTreeAfterCommitOrImplSideInvalidation(); |
| +} |
| + |
| +void LayerTreeHostImpl::AddImplSideInvalidationToSyncTree() { |
| + sync_tree()->InvalidateRegionForImages( |
|
vmpstr
2017/02/10 19:25:43
Just inline this call where the function is called
Khushal
2017/02/10 22:09:19
Done.
|
| + tile_manager_.TakeImagesToInvalidateOnSyncTree()); |
| +} |
| + |
| DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) { |
| TRACE_EVENT1("cc", "LayerTreeHostImpl::PrepareToDraw", "SourceFrameNumber", |
| active_tree_->source_frame_number()); |
| @@ -1311,6 +1327,10 @@ gfx::ColorSpace LayerTreeHostImpl::GetTileColorSpace() const { |
| return sync_tree()->device_color_space(); |
| } |
| +void LayerTreeHostImpl::RequestImplSideInvalidation() { |
| + client_->NeedsImplSideInvalidation(); |
| +} |
| + |
| void LayerTreeHostImpl::NotifyReadyToActivate() { |
| client_->NotifyReadyToActivate(); |
| } |
| @@ -2026,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()) |