| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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/layers/layer.h" | 5 #include "cc/layers/layer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 } | 505 } |
| 506 | 506 |
| 507 float Layer::EffectiveOpacity() const { | 507 float Layer::EffectiveOpacity() const { |
| 508 return inputs_.hide_layer_and_subtree ? 0.f : inputs_.opacity; | 508 return inputs_.hide_layer_and_subtree ? 0.f : inputs_.opacity; |
| 509 } | 509 } |
| 510 | 510 |
| 511 bool Layer::OpacityCanAnimateOnImplThread() const { | 511 bool Layer::OpacityCanAnimateOnImplThread() const { |
| 512 return false; | 512 return false; |
| 513 } | 513 } |
| 514 | 514 |
| 515 bool Layer::AlwaysUseActiveTreeOpacity() const { | |
| 516 return false; | |
| 517 } | |
| 518 | |
| 519 void Layer::SetBlendMode(SkBlendMode blend_mode) { | 515 void Layer::SetBlendMode(SkBlendMode blend_mode) { |
| 520 DCHECK(IsPropertyChangeAllowed()); | 516 DCHECK(IsPropertyChangeAllowed()); |
| 521 if (inputs_.blend_mode == blend_mode) | 517 if (inputs_.blend_mode == blend_mode) |
| 522 return; | 518 return; |
| 523 | 519 |
| 524 // Allowing only blend modes that are defined in the CSS Compositing standard, | 520 // Allowing only blend modes that are defined in the CSS Compositing standard, |
| 525 // plus destination-in which is used to implement masks. | 521 // plus destination-in which is used to implement masks. |
| 526 // http://dev.w3.org/fxtf/compositing-1/#blending | 522 // http://dev.w3.org/fxtf/compositing-1/#blending |
| 527 switch (blend_mode) { | 523 switch (blend_mode) { |
| 528 case SkBlendMode::kSrcOver: | 524 case SkBlendMode::kSrcOver: |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1441 ->subtree_has_copy_request; | 1437 ->subtree_has_copy_request; |
| 1442 } | 1438 } |
| 1443 | 1439 |
| 1444 gfx::Transform Layer::ScreenSpaceTransform() const { | 1440 gfx::Transform Layer::ScreenSpaceTransform() const { |
| 1445 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); | 1441 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); |
| 1446 return draw_property_utils::ScreenSpaceTransform( | 1442 return draw_property_utils::ScreenSpaceTransform( |
| 1447 this, layer_tree_host_->property_trees()->transform_tree); | 1443 this, layer_tree_host_->property_trees()->transform_tree); |
| 1448 } | 1444 } |
| 1449 | 1445 |
| 1450 } // namespace cc | 1446 } // namespace cc |
| OLD | NEW |