Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: cc/surfaces/display.cc

Issue 2379343003: Revert of cc: Remove frame queuing from the scheduler. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/surfaces/direct_compositor_frame_sink.cc ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 device_color_space_, device_viewport_rect, 319 device_color_space_, device_viewport_rect,
320 device_clip_rect); 320 device_clip_rect);
321 } else { 321 } else {
322 TRACE_EVENT_INSTANT0("cc", "Draw skipped.", TRACE_EVENT_SCOPE_THREAD); 322 TRACE_EVENT_INSTANT0("cc", "Draw skipped.", TRACE_EVENT_SCOPE_THREAD);
323 } 323 }
324 324
325 bool should_swap = should_draw && size_matches; 325 bool should_swap = should_draw && size_matches;
326 if (should_swap) { 326 if (should_swap) {
327 swapped_since_resize_ = true; 327 swapped_since_resize_ = true;
328 for (auto& latency : frame.metadata.latency_info) { 328 for (auto& latency : frame.metadata.latency_info) {
329 TRACE_EVENT_WITH_FLOW1( 329 TRACE_EVENT_WITH_FLOW1("input,benchmark", "LatencyInfo.Flow",
330 "input,benchmark", "LatencyInfo.Flow",
331 TRACE_ID_DONT_MANGLE(latency.trace_id()), 330 TRACE_ID_DONT_MANGLE(latency.trace_id()),
332 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, "step", 331 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT,
333 "Display::DrawAndSwap"); 332 "step", "Display::DrawAndSwap");
334 } 333 }
335 benchmark_instrumentation::IssueDisplayRenderingStatsEvent(); 334 benchmark_instrumentation::IssueDisplayRenderingStatsEvent();
336 renderer_->SwapBuffers(std::move(frame.metadata)); 335 renderer_->SwapBuffers(std::move(frame.metadata));
337 if (scheduler_) 336 if (scheduler_)
338 scheduler_->DidSwapBuffers(); 337 scheduler_->DidSwapBuffers();
339 } else { 338 } else {
340 if (have_damage && !size_matches) 339 if (have_damage && !size_matches)
341 aggregator_->SetFullDamageForSurface(current_surface_id_); 340 aggregator_->SetFullDamageForSurface(current_surface_id_);
342 TRACE_EVENT_INSTANT0("cc", "Swap skipped.", TRACE_EVENT_SCOPE_THREAD); 341 TRACE_EVENT_INSTANT0("cc", "Swap skipped.", TRACE_EVENT_SCOPE_THREAD);
343 stored_latency_info_.insert(stored_latency_info_.end(), 342 stored_latency_info_.insert(stored_latency_info_.end(),
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 const SurfaceId& Display::CurrentSurfaceId() { 429 const SurfaceId& Display::CurrentSurfaceId() {
431 return current_surface_id_; 430 return current_surface_id_;
432 } 431 }
433 432
434 void Display::ForceImmediateDrawAndSwapIfPossible() { 433 void Display::ForceImmediateDrawAndSwapIfPossible() {
435 if (scheduler_) 434 if (scheduler_)
436 scheduler_->ForceImmediateSwapIfPossible(); 435 scheduler_->ForceImmediateSwapIfPossible();
437 } 436 }
438 437
439 } // namespace cc 438 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/direct_compositor_frame_sink.cc ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698