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 45ea42e4938beda649fbda7980352378c6cfc221..7995f6d7d521e31d4ef4f1d3ca3cca4cb18f513f 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -237,7 +237,8 @@ LayerTreeHostImpl::LayerTreeHostImpl( |
? std::numeric_limits<size_t>::max() |
: settings.scheduled_raster_task_limit, |
settings.use_partial_raster, |
- settings.check_tile_priority_inversion), |
+ settings.check_tile_priority_inversion, |
+ settings.enable_checker_imaging), |
enne (OOO)
2017/02/03 23:07:40
Maybe we should just pass settings through at this
enne (OOO)
2017/02/03 23:07:40
Maybe we should just pass settings through at this
vmpstr
2017/02/03 23:42:33
On 2017/02/03 23:07:40, enne wrote:
> Maybe we sho
Khushal
2017/02/07 00:25:33
TileManagerSettings for the win!
|
pinch_gesture_active_(false), |
pinch_gesture_end_should_clear_scrolling_layer_(false), |
fps_counter_( |
@@ -352,6 +353,8 @@ void LayerTreeHostImpl::BeginCommit() { |
void LayerTreeHostImpl::CommitComplete() { |
TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete"); |
+ 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 |
@@ -1054,6 +1057,31 @@ void LayerTreeHostImpl::SetViewportDamage(const gfx::Rect& damage_rect) { |
viewport_damage_rect_.Union(damage_rect); |
} |
+void LayerTreeHostImpl::RunImplSideInvalidation() { |
vmpstr
2017/02/03 23:42:33
I'm not a fan of this function name... It's doing
Khushal
2017/02/07 00:25:33
Its going to called by STP/ProxyImpl when the sche
|
+ DCHECK(!pending_tree_); |
+ |
+ if (!CommitToActiveTree()) |
+ CreatePendingTree(); |
+ |
+ AddImplSideInvalidationToSyncTree(); |
+ |
+ bool did_prepare_tiles = PrepareTiles(); |
Khushal
2017/02/01 00:16:31
I wasn't sure but I think these should be the only
enne (OOO)
2017/02/03 23:07:40
This does seem a little sketchy, but still could b
Khushal
2017/02/07 00:25:33
There was also the UpdateDrawProperties step which
|
+ if (!did_prepare_tiles) { |
+ NotifyReadyToActivate(); |
+ |
+ // Ensure we get ReadyToDraw signal even when PrepareTiles not run. This |
+ // is important for SingleThreadProxy and impl-side painting case. For |
+ // STP, we commit to active tree and RequiresHighResToDraw, and set |
+ // Scheduler to wait for ReadyToDraw signal to avoid Checkerboard. |
+ if (CommitToActiveTree()) |
+ NotifyReadyToDraw(); |
+ } |
+} |
+ |
+void LayerTreeHostImpl::AddImplSideInvalidationToSyncTree() { |
+ tile_manager_.AddImplSideInvalidations(sync_tree()); |
+} |
+ |
DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) { |
TRACE_EVENT1("cc", "LayerTreeHostImpl::PrepareToDraw", "SourceFrameNumber", |
active_tree_->source_frame_number()); |
@@ -1311,6 +1339,10 @@ gfx::ColorSpace LayerTreeHostImpl::GetTileColorSpace() const { |
return sync_tree()->device_color_space(); |
} |
+void LayerTreeHostImpl::RequestImplSideInvalidation() { |
+ client_->NeedsImplSideInvalidation(); |
+} |
+ |
void LayerTreeHostImpl::NotifyReadyToActivate() { |
client_->NotifyReadyToActivate(); |
} |
@@ -2026,6 +2058,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()) |