| 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/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/output/filter_operations.h" | 9 #include "cc/output/filter_operations.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 class RenderSurfaceImpl; | |
| 23 | |
| 24 struct CC_EXPORT EffectNode { | 22 struct CC_EXPORT EffectNode { |
| 25 EffectNode(); | 23 EffectNode(); |
| 26 EffectNode(const EffectNode& other); | 24 EffectNode(const EffectNode& other); |
| 27 | 25 |
| 28 // 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. |
| 29 int id; | 27 int id; |
| 30 // 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. |
| 31 int parent_id; | 29 int parent_id; |
| 32 // The layer id of the layer that owns this node. | 30 // The layer id of the layer that owns this node. |
| 33 int owning_layer_id; | 31 int owning_layer_id; |
| 34 | 32 |
| 35 float opacity; | 33 float opacity; |
| 36 float screen_space_opacity; | 34 float screen_space_opacity; |
| 37 | 35 |
| 38 FilterOperations filters; | 36 FilterOperations filters; |
| 39 FilterOperations background_filters; | 37 FilterOperations background_filters; |
| 40 gfx::PointF filters_origin; | 38 gfx::PointF filters_origin; |
| 41 | 39 |
| 42 SkBlendMode blend_mode; | 40 SkBlendMode blend_mode; |
| 43 | 41 |
| 44 gfx::Vector2dF surface_contents_scale; | 42 gfx::Vector2dF surface_contents_scale; |
| 45 | 43 |
| 46 gfx::Size unscaled_mask_target_size; | 44 gfx::Size unscaled_mask_target_size; |
| 47 | 45 |
| 48 bool has_render_surface; | 46 bool has_render_surface; |
| 49 RenderSurfaceImpl* render_surface; | |
| 50 // Only applicable if has render surface. A true value means a clip needs to | 47 // Only applicable if has render surface. A true value means a clip needs to |
| 51 // be applied to the output of the surface when it is drawn onto its parent | 48 // be applied to the output of the surface when it is drawn onto its parent |
| 52 // surface. | 49 // surface. |
| 53 // TODO(crbug.com/504464): There is ongoing work to delay render surface | 50 // TODO(crbug.com/504464): There is ongoing work to delay render surface |
| 54 // decision to later phase of the pipeline. This flag shall be removed and | 51 // decision to later phase of the pipeline. This flag shall be removed and |
| 55 // computed during render surface decision. | 52 // computed during render surface decision. |
| 56 bool surface_is_clipped; | 53 bool surface_is_clipped; |
| 57 bool has_copy_request; | 54 bool has_copy_request; |
| 58 bool hidden_by_backface_visibility; | 55 bool hidden_by_backface_visibility; |
| 59 bool double_sided; | 56 bool double_sided; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 77 int mask_layer_id; | 74 int mask_layer_id; |
| 78 | 75 |
| 79 bool operator==(const EffectNode& other) const; | 76 bool operator==(const EffectNode& other) const; |
| 80 | 77 |
| 81 void AsValueInto(base::trace_event::TracedValue* value) const; | 78 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 82 }; | 79 }; |
| 83 | 80 |
| 84 } // namespace cc | 81 } // namespace cc |
| 85 | 82 |
| 86 #endif // CC_TREES_EFFECT_NODE_H_ | 83 #endif // CC_TREES_EFFECT_NODE_H_ |
| OLD | NEW |