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

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

Issue 1996783002: Make cc::SurfaceId unguessable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Ben's comment 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/surfaces/display_scheduler_unittest.cc ('k') | cc/surfaces/surface_aggregator_perftest.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/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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 bool referenced_surfaces_changed = 91 bool referenced_surfaces_changed =
92 (referenced_surfaces_ != new_referenced_surfaces); 92 (referenced_surfaces_ != new_referenced_surfaces);
93 referenced_surfaces_ = new_referenced_surfaces; 93 referenced_surfaces_ = new_referenced_surfaces;
94 std::vector<uint32_t> satisfies_sequences; 94 std::vector<uint32_t> satisfies_sequences;
95 if (current_frame_) 95 if (current_frame_)
96 current_frame_->metadata.satisfies_sequences.swap(satisfies_sequences); 96 current_frame_->metadata.satisfies_sequences.swap(satisfies_sequences);
97 if (referenced_surfaces_changed || !satisfies_sequences.empty()) { 97 if (referenced_surfaces_changed || !satisfies_sequences.empty()) {
98 // Notify the manager that sequences were satisfied either if some new 98 // Notify the manager that sequences were satisfied either if some new
99 // sequences were satisfied, or if the set of referenced surfaces changed 99 // sequences were satisfied, or if the set of referenced surfaces changed
100 // to force a GC to happen. 100 // to force a GC to happen.
101 factory_->manager()->DidSatisfySequences( 101 factory_->manager()->DidSatisfySequences(surface_id_.id_namespace(),
102 SurfaceIdAllocator::NamespaceForId(surface_id_), &satisfies_sequences); 102 &satisfies_sequences);
103 } 103 }
104 } 104 }
105 105
106 void Surface::RequestCopyOfOutput( 106 void Surface::RequestCopyOfOutput(
107 std::unique_ptr<CopyOutputRequest> copy_request) { 107 std::unique_ptr<CopyOutputRequest> copy_request) {
108 if (current_frame_ && 108 if (current_frame_ &&
109 !current_frame_->delegated_frame_data->render_pass_list.empty()) { 109 !current_frame_->delegated_frame_data->render_pass_list.empty()) {
110 std::vector<std::unique_ptr<CopyOutputRequest>>& copy_requests = 110 std::vector<std::unique_ptr<CopyOutputRequest>>& copy_requests =
111 current_frame_->delegated_frame_data->render_pass_list.back() 111 current_frame_->delegated_frame_data->render_pass_list.back()
112 ->copy_requests; 112 ->copy_requests;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 if (current_frame_) { 198 if (current_frame_) {
199 for (const auto& render_pass : 199 for (const auto& render_pass :
200 current_frame_->delegated_frame_data->render_pass_list) { 200 current_frame_->delegated_frame_data->render_pass_list) {
201 for (const auto& copy_request : render_pass->copy_requests) 201 for (const auto& copy_request : render_pass->copy_requests)
202 copy_request->SendEmptyResult(); 202 copy_request->SendEmptyResult();
203 } 203 }
204 } 204 }
205 } 205 }
206 206
207 } // namespace cc 207 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/display_scheduler_unittest.cc ('k') | cc/surfaces/surface_aggregator_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698