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

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

Issue 2374183006: Remove GLFrameData from CompositorFrame. (Closed)
Patch Set: Rebase. 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/output/software_renderer.cc ('k') | cc/surfaces/display_unittest.cc » ('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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 if (should_swap) { 315 if (should_swap) {
316 swapped_since_resize_ = true; 316 swapped_since_resize_ = true;
317 for (auto& latency : frame.metadata.latency_info) { 317 for (auto& latency : frame.metadata.latency_info) {
318 TRACE_EVENT_WITH_FLOW1( 318 TRACE_EVENT_WITH_FLOW1(
319 "input,benchmark", "LatencyInfo.Flow", 319 "input,benchmark", "LatencyInfo.Flow",
320 TRACE_ID_DONT_MANGLE(latency.trace_id()), 320 TRACE_ID_DONT_MANGLE(latency.trace_id()),
321 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, "step", 321 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, "step",
322 "Display::DrawAndSwap"); 322 "Display::DrawAndSwap");
323 } 323 }
324 benchmark_instrumentation::IssueDisplayRenderingStatsEvent(); 324 benchmark_instrumentation::IssueDisplayRenderingStatsEvent();
325 renderer_->SwapBuffers(std::move(frame.metadata)); 325 renderer_->SwapBuffers(std::move(frame.metadata.latency_info));
326 if (scheduler_) 326 if (scheduler_)
327 scheduler_->DidSwapBuffers(); 327 scheduler_->DidSwapBuffers();
328 } else { 328 } else {
329 if (have_damage && !size_matches) 329 if (have_damage && !size_matches)
330 aggregator_->SetFullDamageForSurface(current_surface_id_); 330 aggregator_->SetFullDamageForSurface(current_surface_id_);
331 TRACE_EVENT_INSTANT0("cc", "Swap skipped.", TRACE_EVENT_SCOPE_THREAD); 331 TRACE_EVENT_INSTANT0("cc", "Swap skipped.", TRACE_EVENT_SCOPE_THREAD);
332 stored_latency_info_.insert(stored_latency_info_.end(), 332 stored_latency_info_.insert(stored_latency_info_.end(),
333 frame.metadata.latency_info.begin(), 333 frame.metadata.latency_info.begin(),
334 frame.metadata.latency_info.end()); 334 frame.metadata.latency_info.end());
335 if (scheduler_) { 335 if (scheduler_) {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 const SurfaceId& Display::CurrentSurfaceId() { 419 const SurfaceId& Display::CurrentSurfaceId() {
420 return current_surface_id_; 420 return current_surface_id_;
421 } 421 }
422 422
423 void Display::ForceImmediateDrawAndSwapIfPossible() { 423 void Display::ForceImmediateDrawAndSwapIfPossible() {
424 if (scheduler_) 424 if (scheduler_)
425 scheduler_->ForceImmediateSwapIfPossible(); 425 scheduler_->ForceImmediateSwapIfPossible();
426 } 426 }
427 427
428 } // namespace cc 428 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/surfaces/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698