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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Dana's nits Created 4 years, 6 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/test/surface_hittest_test_helpers.cc ('k') | cc/trees/layer_tree_host_impl_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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1846 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, 1846 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT,
1847 "step", "SwapBuffers"); 1847 "step", "SwapBuffers");
1848 // Only add the latency component once for renderer swap, not the browser 1848 // Only add the latency component once for renderer swap, not the browser
1849 // swap. 1849 // swap.
1850 if (!latency.FindLatency(ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT, 1850 if (!latency.FindLatency(ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT,
1851 0, nullptr)) { 1851 0, nullptr)) {
1852 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT, 1852 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT,
1853 0, 0); 1853 0, 0);
1854 } 1854 }
1855 } 1855 }
1856 renderer_->SwapBuffers(metadata); 1856 renderer_->SwapBuffers(std::move(metadata));
1857 return true; 1857 return true;
1858 } 1858 }
1859 1859
1860 void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) { 1860 void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) {
1861 current_begin_frame_tracker_.Start(args); 1861 current_begin_frame_tracker_.Start(args);
1862 1862
1863 if (is_likely_to_require_a_draw_) { 1863 if (is_likely_to_require_a_draw_) {
1864 // Optimistically schedule a draw. This will let us expect the tile manager 1864 // Optimistically schedule a draw. This will let us expect the tile manager
1865 // to complete its work so that we can draw new tiles within the impl frame 1865 // to complete its work so that we can draw new tiles within the impl frame
1866 // we are beginning now. 1866 // we are beginning now.
(...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after
4008 return task_runner_provider_->HasImplThread(); 4008 return task_runner_provider_->HasImplThread();
4009 } 4009 }
4010 4010
4011 bool LayerTreeHostImpl::CommitToActiveTree() const { 4011 bool LayerTreeHostImpl::CommitToActiveTree() const {
4012 // In single threaded mode we skip the pending tree and commit directly to the 4012 // In single threaded mode we skip the pending tree and commit directly to the
4013 // active tree. 4013 // active tree.
4014 return !task_runner_provider_->HasImplThread(); 4014 return !task_runner_provider_->HasImplThread();
4015 } 4015 }
4016 4016
4017 } // namespace cc 4017 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/surface_hittest_test_helpers.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698