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

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

Issue 2625203004: Add debug method to print surface references. (Closed)
Patch Set: Little fixes. Created 3 years, 11 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/surface.h ('k') | cc/surfaces/surface_manager.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/surface.h" 5 #include "cc/surfaces/surface.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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 for (const auto& render_pass : current_frame_->render_pass_list) { 109 for (const auto& render_pass : current_frame_->render_pass_list) {
110 for (auto& request : render_pass->copy_requests) { 110 for (auto& request : render_pass->copy_requests) {
111 copy_requests->insert( 111 copy_requests->insert(
112 std::make_pair(render_pass->id, std::move(request))); 112 std::make_pair(render_pass->id, std::move(request)));
113 } 113 }
114 render_pass->copy_requests.clear(); 114 render_pass->copy_requests.clear();
115 } 115 }
116 } 116 }
117 } 117 }
118 118
119 const CompositorFrame& Surface::GetEligibleFrame() { 119 const CompositorFrame& Surface::GetEligibleFrame() const {
120 DCHECK(current_frame_); 120 DCHECK(current_frame_);
121 return current_frame_.value(); 121 return current_frame_.value();
122 } 122 }
123 123
124 void Surface::TakeLatencyInfo(std::vector<ui::LatencyInfo>* latency_info) { 124 void Surface::TakeLatencyInfo(std::vector<ui::LatencyInfo>* latency_info) {
125 if (!current_frame_) 125 if (!current_frame_)
126 return; 126 return;
127 if (latency_info->empty()) { 127 if (latency_info->empty()) {
128 current_frame_->metadata.latency_info.swap(*latency_info); 128 current_frame_->metadata.latency_info.swap(*latency_info);
129 return; 129 return;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 void Surface::ClearCopyRequests() { 171 void Surface::ClearCopyRequests() {
172 if (current_frame_) { 172 if (current_frame_) {
173 for (const auto& render_pass : current_frame_->render_pass_list) { 173 for (const auto& render_pass : current_frame_->render_pass_list) {
174 for (const auto& copy_request : render_pass->copy_requests) 174 for (const auto& copy_request : render_pass->copy_requests)
175 copy_request->SendEmptyResult(); 175 copy_request->SendEmptyResult();
176 } 176 }
177 } 177 }
178 } 178 }
179 179
180 } // namespace cc 180 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface.h ('k') | cc/surfaces/surface_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698