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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // - is not drawn due to it or one of its ancestors being hidden (or having | 263 // - is not drawn due to it or one of its ancestors being hidden (or having |
264 // no copy requests). | 264 // no copy requests). |
265 // - does not draw content. | 265 // - does not draw content. |
266 // - is transparent. | 266 // - is transparent. |
267 // - has empty bounds | 267 // - has empty bounds |
268 // - the layer is not double-sided, but its back face is visible. | 268 // - the layer is not double-sided, but its back face is visible. |
269 // | 269 // |
270 // Some additional conditions need to be computed at a later point after the | 270 // Some additional conditions need to be computed at a later point after the |
271 // recursion is finished. | 271 // recursion is finished. |
272 // - the intersection of render_surface content and layer clip_rect is empty | 272 // - the intersection of render_surface content and layer clip_rect is empty |
273 // - the visible_content_rect is empty | 273 // - the visible_layer_rect is empty |
274 // | 274 // |
275 // Note, if the layer should not have been drawn due to being fully | 275 // Note, if the layer should not have been drawn due to being fully |
276 // transparent, we would have skipped the entire subtree and never made it | 276 // transparent, we would have skipped the entire subtree and never made it |
277 // into this function, so it is safe to omit this check here. | 277 // into this function, so it is safe to omit this check here. |
278 if (!layer_is_drawn) | 278 if (!layer_is_drawn) |
279 return true; | 279 return true; |
280 | 280 |
281 if (!layer->DrawsContent() || layer->bounds().IsEmpty()) | 281 if (!layer->DrawsContent() || layer->bounds().IsEmpty()) |
282 return true; | 282 return true; |
283 | 283 |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 const OpacityTree& tree) { | 586 const OpacityTree& tree) { |
587 return DrawOpacityFromPropertyTreesInternal(layer, tree); | 587 return DrawOpacityFromPropertyTreesInternal(layer, tree); |
588 } | 588 } |
589 | 589 |
590 float DrawOpacityFromPropertyTrees(const LayerImpl* layer, | 590 float DrawOpacityFromPropertyTrees(const LayerImpl* layer, |
591 const OpacityTree& tree) { | 591 const OpacityTree& tree) { |
592 return DrawOpacityFromPropertyTreesInternal(layer, tree); | 592 return DrawOpacityFromPropertyTreesInternal(layer, tree); |
593 } | 593 } |
594 | 594 |
595 } // namespace cc | 595 } // namespace cc |
OLD | NEW |