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

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

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

Powered by Google App Engine
This is Rietveld 408576698