Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
| 10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 | 151 |
| 152 static bool IsInvisibleDueToTransform(Layer* layer, const TransformTree& tree) { | 152 static bool IsInvisibleDueToTransform(Layer* layer, const TransformTree& tree) { |
| 153 return HasSingularTransform(layer, tree) || IsBackFaceInvisible(layer, tree); | 153 return HasSingularTransform(layer, tree) || IsBackFaceInvisible(layer, tree); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void FindLayersThatNeedVisibleRects(Layer* layer, | 156 void FindLayersThatNeedVisibleRects(Layer* layer, |
| 157 const TransformTree& tree, | 157 const TransformTree& tree, |
| 158 bool subtree_is_visible_from_ancestor, | 158 bool subtree_is_visible_from_ancestor, |
| 159 std::vector<Layer*>* layers_to_update) { | 159 std::vector<Layer*>* layers_to_update) { |
| 160 const bool subtree_is_invisble = | 160 const bool subtree_is_invisble = |
| 161 layer->opacity() == 0.0f || | |
|
Ian Vollick
2015/02/15 06:27:18
Is it bogus to calculate visible content rects for
enne (OOO)
2015/02/17 17:40:14
I don't think this function goes away. Where was
Ian Vollick
2015/02/18 05:22:43
Sorry, I didn't mean to imply that it was going aw
Ian Vollick
2015/02/19 07:07:44
Stepping through this example, it looks like the p
| |
| 162 (layer->has_render_surface() && !layer->double_sided() && | 161 (layer->has_render_surface() && !layer->double_sided() && |
| 163 IsSurfaceBackFaceExposed(layer, tree)); | 162 IsSurfaceBackFaceExposed(layer, tree)); |
| 164 | 163 |
| 165 if (subtree_is_invisble) | 164 if (subtree_is_invisble) |
| 166 return; | 165 return; |
| 167 | 166 |
| 168 bool layer_is_drawn = | 167 bool layer_is_drawn = |
| 169 layer->HasCopyRequest() || | 168 layer->HasCopyRequest() || |
| 170 (subtree_is_visible_from_ancestor && !layer->hide_layer_and_subtree()); | 169 (subtree_is_visible_from_ancestor && !layer->hide_layer_and_subtree()); |
| 171 | 170 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 271 | 270 |
| 272 std::vector<Layer*> layers_to_update; | 271 std::vector<Layer*> layers_to_update; |
| 273 const bool subtree_is_visible_from_ancestor = true; | 272 const bool subtree_is_visible_from_ancestor = true; |
| 274 FindLayersThatNeedVisibleRects(root_layer, *transform_tree, | 273 FindLayersThatNeedVisibleRects(root_layer, *transform_tree, |
| 275 subtree_is_visible_from_ancestor, | 274 subtree_is_visible_from_ancestor, |
| 276 &layers_to_update); | 275 &layers_to_update); |
| 277 CalculateVisibleRects(layers_to_update, *clip_tree, *transform_tree); | 276 CalculateVisibleRects(layers_to_update, *clip_tree, *transform_tree); |
| 278 } | 277 } |
| 279 | 278 |
| 280 } // namespace cc | 279 } // namespace cc |
| OLD | NEW |