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

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

Issue 1430363002: List all child surfaces (including occluded) in CompositorFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/copy_output_request.h" 10 #include "cc/output/copy_output_request.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 // Empty frames shouldn't be drawn and shouldn't contribute damage, so don't 60 // Empty frames shouldn't be drawn and shouldn't contribute damage, so don't
61 // increment frame index for them. 61 // increment frame index for them.
62 if (current_frame_ && 62 if (current_frame_ &&
63 !current_frame_->delegated_frame_data->render_pass_list.empty()) 63 !current_frame_->delegated_frame_data->render_pass_list.empty())
64 ++frame_index_; 64 ++frame_index_;
65 65
66 std::vector<SurfaceId> new_referenced_surfaces; 66 std::vector<SurfaceId> new_referenced_surfaces;
67 if (current_frame_) { 67 if (current_frame_) {
68 for (auto& render_pass : 68 new_referenced_surfaces = current_frame_->metadata.referenced_surfaces;
69 current_frame_->delegated_frame_data->render_pass_list) {
70 new_referenced_surfaces.insert(new_referenced_surfaces.end(),
71 render_pass->referenced_surfaces.begin(),
72 render_pass->referenced_surfaces.end());
73 }
74 } 69 }
75 70
76 if (previous_frame) { 71 if (previous_frame) {
77 ReturnedResourceArray previous_resources; 72 ReturnedResourceArray previous_resources;
78 TransferableResource::ReturnResources( 73 TransferableResource::ReturnResources(
79 previous_frame->delegated_frame_data->resource_list, 74 previous_frame->delegated_frame_data->resource_list,
80 &previous_resources); 75 &previous_resources);
81 factory_->UnrefResources(previous_resources); 76 factory_->UnrefResources(previous_resources);
82 } 77 }
83 if (!draw_callback_.is_null()) 78 if (!draw_callback_.is_null())
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 if (current_frame_) { 194 if (current_frame_) {
200 for (const auto& render_pass : 195 for (const auto& render_pass :
201 current_frame_->delegated_frame_data->render_pass_list) { 196 current_frame_->delegated_frame_data->render_pass_list) {
202 for (const auto& copy_request : render_pass->copy_requests) 197 for (const auto& copy_request : render_pass->copy_requests)
203 copy_request->SendEmptyResult(); 198 copy_request->SendEmptyResult();
204 } 199 }
205 } 200 }
206 } 201 }
207 202
208 } // namespace cc 203 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698