| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_EFFECT_NODE_H_ | 5 #ifndef CC_TREES_EFFECT_NODE_H_ |
| 6 #define CC_TREES_EFFECT_NODE_H_ | 6 #define CC_TREES_EFFECT_NODE_H_ |
| 7 | 7 |
| 8 #include "cc/base/filter_operations.h" | 8 #include "cc/base/filter_operations.h" |
| 9 #include "cc/cc_export.h" | 9 #include "cc/cc_export.h" |
| 10 #include "third_party/skia/include/core/SkBlendMode.h" | 10 #include "third_party/skia/include/core/SkBlendMode.h" |
| 11 #include "ui/gfx/geometry/point_f.h" | 11 #include "ui/gfx/geometry/point_f.h" |
| 12 #include "ui/gfx/geometry/size_f.h" | 12 #include "ui/gfx/geometry/size_f.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 namespace trace_event { | 15 namespace trace_event { |
| 16 class TracedValue; | 16 class TracedValue; |
| 17 } // namespace trace_event | 17 } // namespace trace_event |
| 18 } // namespace base | 18 } // namespace base |
| 19 | 19 |
| 20 namespace cc { | 20 namespace cc { |
| 21 | 21 |
| 22 struct CC_EXPORT EffectNode { | 22 struct CC_EXPORT EffectNode { |
| 23 EffectNode(); | 23 EffectNode(); |
| 24 EffectNode(const EffectNode& other); | 24 EffectNode(const EffectNode& other); |
| 25 | 25 |
| 26 // The node index of this node in the effect tree node vector. | 26 // The node index of this node in the effect tree node vector. |
| 27 int id; | 27 int id; |
| 28 // The node index of the parent node in the effect tree node vector. | 28 // The node index of the parent node in the effect tree node vector. |
| 29 int parent_id; | 29 int parent_id; |
| 30 // The layer id of the layer that owns this node. | 30 |
| 31 int owning_layer_id; | 31 // An identifer for this effect that is generally stable across commits. |
| 32 int stable_id; |
| 32 | 33 |
| 33 float opacity; | 34 float opacity; |
| 34 float screen_space_opacity; | 35 float screen_space_opacity; |
| 35 | 36 |
| 36 FilterOperations filters; | 37 FilterOperations filters; |
| 37 FilterOperations background_filters; | 38 FilterOperations background_filters; |
| 38 gfx::PointF filters_origin; | 39 gfx::PointF filters_origin; |
| 39 | 40 |
| 40 SkBlendMode blend_mode; | 41 SkBlendMode blend_mode; |
| 41 | 42 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 54 bool has_potential_filter_animation; | 55 bool has_potential_filter_animation; |
| 55 bool has_potential_opacity_animation; | 56 bool has_potential_opacity_animation; |
| 56 bool is_currently_animating_filter; | 57 bool is_currently_animating_filter; |
| 57 bool is_currently_animating_opacity; | 58 bool is_currently_animating_opacity; |
| 58 // We need to track changes to effects on the compositor to compute damage | 59 // We need to track changes to effects on the compositor to compute damage |
| 59 // rect. | 60 // rect. |
| 60 bool effect_changed; | 61 bool effect_changed; |
| 61 bool subtree_has_copy_request; | 62 bool subtree_has_copy_request; |
| 62 int transform_id; | 63 int transform_id; |
| 63 int clip_id; | 64 int clip_id; |
| 64 // Effect node id of which this effect contributes to. | 65 |
| 66 // This is the id of the ancestor effect node that induces a |
| 67 // RenderSurfaceImpl. |
| 65 int target_id; | 68 int target_id; |
| 66 int mask_layer_id; | 69 int mask_layer_id; |
| 67 int closest_ancestor_with_copy_request_id; | 70 int closest_ancestor_with_copy_request_id; |
| 68 | 71 |
| 69 bool operator==(const EffectNode& other) const; | 72 bool operator==(const EffectNode& other) const; |
| 70 | 73 |
| 71 void AsValueInto(base::trace_event::TracedValue* value) const; | 74 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 72 }; | 75 }; |
| 73 | 76 |
| 74 } // namespace cc | 77 } // namespace cc |
| 75 | 78 |
| 76 #endif // CC_TREES_EFFECT_NODE_H_ | 79 #endif // CC_TREES_EFFECT_NODE_H_ |
| OLD | NEW |