Chromium Code Reviews| Index: cc/surfaces/display.cc |
| diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc |
| index 670ad22a70a54ab4de967666805e450b9cfbd168..00d88e09e214fcca5a40f03f74dc2c052835b9e0 100644 |
| --- a/cc/surfaces/display.cc |
| +++ b/cc/surfaces/display.cc |
| @@ -248,7 +248,7 @@ bool Display::DrawAndSwap() { |
| // Run callbacks early to allow pipelining. |
| for (const auto& id_entry : aggregator_->previous_contained_surfaces()) { |
| Surface* surface = surface_manager_->GetSurfaceForId(id_entry.first); |
| - if (surface) |
| + if (surface && surface->surface_id() != current_surface_id_) |
| surface->RunDrawCallbacks(); |
| } |
| @@ -325,10 +325,11 @@ bool Display::DrawAndSwap() { |
| if (should_swap) { |
| swapped_since_resize_ = true; |
| for (auto& latency : frame.metadata.latency_info) { |
| - TRACE_EVENT_WITH_FLOW1("input,benchmark", "LatencyInfo.Flow", |
| + TRACE_EVENT_WITH_FLOW1( |
| + "input,benchmark", "LatencyInfo.Flow", |
| TRACE_ID_DONT_MANGLE(latency.trace_id()), |
| - TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, |
| - "step", "Display::DrawAndSwap"); |
| + TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, "step", |
| + "Display::DrawAndSwap"); |
| } |
| benchmark_instrumentation::IssueDisplayRenderingStatsEvent(); |
| renderer_->SwapBuffers(std::move(frame.metadata)); |
| @@ -347,6 +348,12 @@ bool Display::DrawAndSwap() { |
| } |
| } |
| + // Run draw callback for root surface after drawing. |
|
enne (OOO)
2016/09/19 22:11:50
Can you make this comment more of a 'why' and less
sunnyps
2016/09/19 23:59:04
Added comment where we run the callbacks for other
|
| + Surface* root_surface = |
| + surface_manager_->GetSurfaceForId(current_surface_id_); |
| + if (root_surface) |
| + root_surface->RunDrawCallbacks(); |
| + |
| client_->DisplayDidDrawAndSwap(); |
| return true; |
| } |