| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/surfaces/display.h" | 5 #include "cc/surfaces/display.h" |
| 6 | 6 |
| 7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "cc/debug/benchmark_instrumentation.h" | 9 #include "cc/debug/benchmark_instrumentation.h" |
| 10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 renderer_->DecideRenderPassAllocationsForFrame( | 200 renderer_->DecideRenderPassAllocationsForFrame( |
| 201 frame_data->render_pass_list); | 201 frame_data->render_pass_list); |
| 202 renderer_->DrawFrame(&frame_data->render_pass_list, device_scale_factor_, | 202 renderer_->DrawFrame(&frame_data->render_pass_list, device_scale_factor_, |
| 203 device_viewport_rect, device_clip_rect, | 203 device_viewport_rect, device_clip_rect, |
| 204 disable_picture_quad_image_filtering); | 204 disable_picture_quad_image_filtering); |
| 205 } | 205 } |
| 206 | 206 |
| 207 if (should_draw && !avoid_swap) { | 207 if (should_draw && !avoid_swap) { |
| 208 swapped_since_resize_ = true; | 208 swapped_since_resize_ = true; |
| 209 for (auto& latency : frame->metadata.latency_info) { | 209 for (auto& latency : frame->metadata.latency_info) { |
| 210 TRACE_EVENT_WITH_FLOW0("toplevel", "Display::DrawAndSwap", |
| 211 TRACE_ID_DONT_MANGLE(latency.trace_id), |
| 212 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OU
T); |
| 210 TRACE_EVENT_FLOW_STEP0( | 213 TRACE_EVENT_FLOW_STEP0( |
| 211 "input,benchmark", | 214 "input,benchmark", |
| 212 "LatencyInfo.Flow", | 215 "LatencyInfo.Flow", |
| 213 TRACE_ID_DONT_MANGLE(latency.trace_id), | 216 TRACE_ID_DONT_MANGLE(latency.trace_id), |
| 214 "Display::DrawAndSwap"); | 217 "Display::DrawAndSwap"); |
| 215 } | 218 } |
| 216 benchmark_instrumentation::IssueDisplayRenderingStatsEvent(); | 219 benchmark_instrumentation::IssueDisplayRenderingStatsEvent(); |
| 217 renderer_->SwapBuffers(frame->metadata); | 220 renderer_->SwapBuffers(frame->metadata); |
| 218 } else { | 221 } else { |
| 219 stored_latency_info_.insert(stored_latency_info_.end(), | 222 stored_latency_info_.insert(stored_latency_info_.end(), |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 301 |
| 299 if (surface_id == current_surface_id_) | 302 if (surface_id == current_surface_id_) |
| 300 UpdateRootSurfaceResourcesLocked(); | 303 UpdateRootSurfaceResourcesLocked(); |
| 301 } | 304 } |
| 302 | 305 |
| 303 SurfaceId Display::CurrentSurfaceId() { | 306 SurfaceId Display::CurrentSurfaceId() { |
| 304 return current_surface_id_; | 307 return current_surface_id_; |
| 305 } | 308 } |
| 306 | 309 |
| 307 } // namespace cc | 310 } // namespace cc |
| OLD | NEW |