forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheffect_node.h
97 lines (79 loc) · 3.13 KB
/
effect_node.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CC_TREES_EFFECT_NODE_H_
#define CC_TREES_EFFECT_NODE_H_
#include "cc/base/filter_operations.h"
#include "cc/cc_export.h"
#include "third_party/skia/include/core/SkBlendMode.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/size_f.h"
namespace base {
namespace trace_event {
class TracedValue;
} // namespace trace_event
} // namespace base
namespace cc {
struct CC_EXPORT EffectNode {
EffectNode();
EffectNode(const EffectNode& other);
enum StableIdLabels { INVALID_STABLE_ID = 0 };
// The node index of this node in the effect tree node vector.
int id;
// The node index of the parent node in the effect tree node vector.
int parent_id;
// An opaque, unique, stable identifer for this effect that persists across
// frame commits. This id is used only for internal implementation
// details such as RenderSurface and RenderPass ids, and should not
// be assumed to have semantic meaning.
uint64_t stable_id;
float opacity;
float screen_space_opacity;
FilterOperations filters;
FilterOperations background_filters;
gfx::PointF filters_origin;
SkBlendMode blend_mode;
gfx::Vector2dF surface_contents_scale;
gfx::Size unscaled_mask_target_size;
bool has_render_surface : 1;
bool cache_render_surface : 1;
bool has_copy_request : 1;
bool hidden_by_backface_visibility : 1;
bool double_sided : 1;
bool is_drawn : 1;
// TODO(jaydasika) : Delete this after implementation of
// SetHideLayerAndSubtree is cleaned up. (crbug.com/595843)
bool subtree_hidden : 1;
// Whether this node has a potentially running (i.e., irrespective
// of exact timeline) filter animation.
bool has_potential_filter_animation : 1;
// Whether this node has a potentially running (i.e., irrespective
// of exact timeline) opacity animation.
bool has_potential_opacity_animation : 1;
// Whether this node has a currently running filter animation.
bool is_currently_animating_filter : 1;
// Whether this node has a currently running opacity animation.
bool is_currently_animating_opacity : 1;
// Whether this node's effect has been changed since the last
// frame. Needed in order to compute damage rect.
bool effect_changed : 1;
bool subtree_has_copy_request : 1;
// The transform node index of the transform to apply to this effect
// node's content when rendering to a surface.
int transform_id;
// The clip node index of the clip to apply to this effect node's
// content when rendering to a surface.
int clip_id;
// This is the id of the ancestor effect node that induces a
// RenderSurfaceImpl.
int target_id;
// The layer id of the mask layer, if any, to apply to this effect
// node's content when rendering to a surface.
int mask_layer_id;
int closest_ancestor_with_cached_render_surface_id;
int closest_ancestor_with_copy_request_id;
bool operator==(const EffectNode& other) const;
void AsValueInto(base::trace_event::TracedValue* value) const;
};
} // namespace cc
#endif // CC_TREES_EFFECT_NODE_H_