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

Side by Side Diff: cc/trees/draw_property_utils.cc

Issue 2117173002: cc: Don't skip clip rect calculation for copy request layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | cc/trees/layer_tree_host_common_unittest.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/trees/draw_property_utils.h" 5 #include "cc/trees/draw_property_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 template <typename LayerType> 209 template <typename LayerType>
210 void CalculateClipRects( 210 void CalculateClipRects(
211 const typename LayerType::LayerListType& visible_layer_list, 211 const typename LayerType::LayerListType& visible_layer_list,
212 const ClipTree& clip_tree, 212 const ClipTree& clip_tree,
213 const TransformTree& transform_tree, 213 const TransformTree& transform_tree,
214 const EffectTree& effect_tree, 214 const EffectTree& effect_tree,
215 bool non_root_surfaces_enabled) { 215 bool non_root_surfaces_enabled) {
216 for (auto& layer : visible_layer_list) { 216 for (auto& layer : visible_layer_list) {
217 const ClipNode* clip_node = clip_tree.Node(layer->clip_tree_index()); 217 const ClipNode* clip_node = clip_tree.Node(layer->clip_tree_index());
218 // The entire layer is visible if it has copy requests.
219 const EffectNode* effect_node =
220 effect_tree.Node(layer->effect_tree_index());
221 if (effect_node->data.has_copy_request &&
222 effect_node->owner_id == layer->id())
223 continue;
224
225 if (!non_root_surfaces_enabled) { 218 if (!non_root_surfaces_enabled) {
226 layer->set_clip_rect( 219 layer->set_clip_rect(
227 gfx::ToEnclosingRect(clip_node->data.clip_in_target_space)); 220 gfx::ToEnclosingRect(clip_node->data.clip_in_target_space));
228 continue; 221 continue;
229 } 222 }
230 223
231 // When both the layer and the target are unclipped, the entire layer 224 // When both the layer and the target are unclipped, the entire layer
232 // content rect is visible. 225 // content rect is visible.
233 const bool fully_visible = !clip_node->data.layers_are_clipped && 226 const bool fully_visible = !clip_node->data.layers_are_clipped &&
234 !clip_node->data.target_is_clipped; 227 !clip_node->data.target_is_clipped;
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 void UpdateElasticOverscroll(PropertyTrees* property_trees, 1365 void UpdateElasticOverscroll(PropertyTrees* property_trees,
1373 const Layer* overscroll_elasticity_layer, 1366 const Layer* overscroll_elasticity_layer,
1374 const gfx::Vector2dF& elastic_overscroll) { 1367 const gfx::Vector2dF& elastic_overscroll) {
1375 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, 1368 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer,
1376 elastic_overscroll); 1369 elastic_overscroll);
1377 } 1370 }
1378 1371
1379 } // namespace draw_property_utils 1372 } // namespace draw_property_utils
1380 1373
1381 } // namespace cc 1374 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698