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

Side by Side Diff: cc/trees/layer_tree_host_common.h

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_common.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 #ifndef CC_TREES_LAYER_TREE_HOST_COMMON_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_COMMON_H_
6 #define CC_TREES_LAYER_TREE_HOST_COMMON_H_ 6 #define CC_TREES_LAYER_TREE_HOST_COMMON_H_
7 7
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 ScopedPtrVector<SwapPromise> swap_promises; 165 ScopedPtrVector<SwapPromise> swap_promises;
166 }; 166 };
167 167
168 template <typename LayerType> 168 template <typename LayerType>
169 bool LayerTreeHostCommon::RenderSurfaceContributesToTarget( 169 bool LayerTreeHostCommon::RenderSurfaceContributesToTarget(
170 LayerType* layer, 170 LayerType* layer,
171 int target_surface_layer_id) { 171 int target_surface_layer_id) {
172 // A layer will either contribute its own content, or its render surface's 172 // A layer will either contribute its own content, or its render surface's
173 // content, to the target surface. The layer contributes its surface's content 173 // content, to the target surface. The layer contributes its surface's content
174 // when both the following are true: 174 // when both the following are true:
175 // (1) The layer actually has a render surface, and 175 // (1) The layer actually has a render surface and rendering into that
176 // surface, and
176 // (2) The layer's render surface is not the same as the target surface. 177 // (2) The layer's render surface is not the same as the target surface.
177 // 178 //
178 // Otherwise, the layer just contributes itself to the target surface. 179 // Otherwise, the layer just contributes itself to the target surface.
179 180
180 return layer->render_surface() && layer->id() != target_surface_layer_id; 181 return layer->render_target() == layer &&
182 layer->id() != target_surface_layer_id;
181 } 183 }
182 184
183 template <typename LayerType> 185 template <typename LayerType>
184 LayerType* LayerTreeHostCommon::FindLayerInSubtree(LayerType* root_layer, 186 LayerType* LayerTreeHostCommon::FindLayerInSubtree(LayerType* root_layer,
185 int layer_id) { 187 int layer_id) {
186 if (!root_layer) 188 if (!root_layer)
187 return NULL; 189 return NULL;
188 190
189 if (root_layer->id() == layer_id) 191 if (root_layer->id() == layer_id)
190 return root_layer; 192 return root_layer;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 true, 278 true,
277 render_surface_layer_list, 279 render_surface_layer_list,
278 0) { 280 0) {
279 DCHECK(root_layer); 281 DCHECK(root_layer);
280 DCHECK(render_surface_layer_list); 282 DCHECK(render_surface_layer_list);
281 } 283 }
282 284
283 } // namespace cc 285 } // namespace cc
284 286
285 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ 287 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698