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

Side by Side Diff: cc/output/delegating_renderer.cc

Issue 2102833002: cc: Fixup cc to not use auto to deduce a raw pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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/layers/video_layer_impl_unittest.cc ('k') | cc/output/gl_renderer.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/output/delegating_renderer.h" 5 #include "cc/output/delegating_renderer.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 DCHECK(!delegated_frame_data_); 82 DCHECK(!delegated_frame_data_);
83 83
84 delegated_frame_data_ = base::WrapUnique(new DelegatedFrameData); 84 delegated_frame_data_ = base::WrapUnique(new DelegatedFrameData);
85 DelegatedFrameData& out_data = *delegated_frame_data_; 85 DelegatedFrameData& out_data = *delegated_frame_data_;
86 // Move the render passes and resources into the |out_frame|. 86 // Move the render passes and resources into the |out_frame|.
87 out_data.render_pass_list.swap(*render_passes_in_draw_order); 87 out_data.render_pass_list.swap(*render_passes_in_draw_order);
88 88
89 // Collect all resource ids in the render passes into a ResourceIdArray. 89 // Collect all resource ids in the render passes into a ResourceIdArray.
90 ResourceProvider::ResourceIdArray resources; 90 ResourceProvider::ResourceIdArray resources;
91 for (const auto& render_pass : out_data.render_pass_list) { 91 for (const auto& render_pass : out_data.render_pass_list) {
92 for (const auto& quad : render_pass->quad_list) { 92 for (auto* quad : render_pass->quad_list) {
93 for (ResourceId resource_id : quad->resources) 93 for (ResourceId resource_id : quad->resources)
94 resources.push_back(resource_id); 94 resources.push_back(resource_id);
95 } 95 }
96 } 96 }
97 resource_provider_->PrepareSendToParent(resources, &out_data.resource_list); 97 resource_provider_->PrepareSendToParent(resources, &out_data.resource_list);
98 } 98 }
99 99
100 void DelegatingRenderer::SwapBuffers(CompositorFrameMetadata metadata) { 100 void DelegatingRenderer::SwapBuffers(CompositorFrameMetadata metadata) {
101 TRACE_EVENT0("cc,benchmark", "DelegatingRenderer::SwapBuffers"); 101 TRACE_EVENT0("cc,benchmark", "DelegatingRenderer::SwapBuffers");
102 CompositorFrame compositor_frame; 102 CompositorFrame compositor_frame;
(...skipping 17 matching lines...) Expand all
120 } 120 }
121 } 121 }
122 if (context_provider) { 122 if (context_provider) {
123 // If we are not visible, we ask the context to aggressively free resources. 123 // If we are not visible, we ask the context to aggressively free resources.
124 context_provider->ContextSupport()->SetAggressivelyFreeResources( 124 context_provider->ContextSupport()->SetAggressivelyFreeResources(
125 !visible()); 125 !visible());
126 } 126 }
127 } 127 }
128 128
129 } // namespace cc 129 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl_unittest.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698