From c247da12fcca15fdcc948024287b94d6e63e9784 Mon Sep 17 00:00:00 2001 From: jbauman Date: Mon, 26 Jan 2015 18:53:00 -0800 Subject: Run draw callback immediately if no Display is damaged. This may cause the draw callback to be run earlier than before if the Surface would later be added to a Display, but prevents it ensures that the callback runs if the Surface wouldn't be drawn at all BUG=440269 Review URL: https://codereview.chromium.org/792383004 Cr-Commit-Position: refs/heads/master@{#313212} --- cc/surfaces/surface_aggregator.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cc/surfaces/surface_aggregator.cc') diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc index 9456dd2..15f4b53 100644 --- a/cc/surfaces/surface_aggregator.cc +++ b/cc/surfaces/surface_aggregator.cc @@ -433,6 +433,10 @@ void SurfaceAggregator::RemoveUnreferencedChildren() { provider_->DestroyChild(it->second); surface_id_to_resource_child_id_.erase(it); } + + Surface* surface_ptr = manager_->GetSurfaceForId(surface.first); + if (surface_ptr) + surface_ptr->RunDrawCallbacks(SurfaceDrawStatus::DRAW_SKIPPED); } } } -- cgit v1.1