OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef GraphicsLayerDebugInfo_h | 31 #ifndef GraphicsLayerDebugInfo_h |
32 #define GraphicsLayerDebugInfo_h | 32 #define GraphicsLayerDebugInfo_h |
33 | 33 |
34 #include "base/memory/ref_counted.h" | 34 #include "base/memory/ref_counted.h" |
35 #include "platform/geometry/FloatRect.h" | 35 #include "platform/geometry/FloatRect.h" |
36 #include "platform/graphics/CompositingReasons.h" | 36 #include "platform/graphics/CompositingReasons.h" |
37 #include "platform/graphics/PaintInvalidationReason.h" | 37 #include "platform/graphics/PaintInvalidationReason.h" |
| 38 #include "platform/graphics/SquashingDisallowedReasons.h" |
38 #include "wtf/Allocator.h" | 39 #include "wtf/Allocator.h" |
39 #include "wtf/Noncopyable.h" | 40 #include "wtf/Noncopyable.h" |
40 #include "wtf/Vector.h" | 41 #include "wtf/Vector.h" |
41 | 42 |
42 namespace base { | 43 namespace base { |
43 namespace trace_event { | 44 namespace trace_event { |
44 class TracedValue; | 45 class TracedValue; |
45 } | 46 } |
46 } | 47 } |
47 | 48 |
48 namespace blink { | 49 namespace blink { |
49 | 50 |
50 class GraphicsLayerDebugInfo final { | 51 class GraphicsLayerDebugInfo final { |
51 DISALLOW_NEW(); | 52 DISALLOW_NEW(); |
52 WTF_MAKE_NONCOPYABLE(GraphicsLayerDebugInfo); | 53 WTF_MAKE_NONCOPYABLE(GraphicsLayerDebugInfo); |
53 public: | 54 public: |
54 GraphicsLayerDebugInfo(); | 55 GraphicsLayerDebugInfo(); |
55 ~GraphicsLayerDebugInfo(); | 56 ~GraphicsLayerDebugInfo(); |
56 | 57 |
57 scoped_refptr<base::trace_event::TracedValue> asTracedValue() const; | 58 scoped_refptr<base::trace_event::TracedValue> asTracedValue() const; |
58 | 59 |
59 CompositingReasons compositingReasons() const { return m_compositingReasons;
} | 60 CompositingReasons compositingReasons() const { return m_compositingReasons;
} |
60 void setCompositingReasons(CompositingReasons reasons) { m_compositingReason
s = reasons; } | 61 void setCompositingReasons(CompositingReasons reasons) { m_compositingReason
s = reasons; } |
| 62 |
| 63 SquashingDisallowedReasons squashingDisallowedReasons() const { return m_squ
ashingDisallowedReasons; } |
| 64 void setSquashingDisallowedReasons(SquashingDisallowedReasons reasons) { m_s
quashingDisallowedReasons = reasons; } |
61 void setOwnerNodeId(int id) { m_ownerNodeId = id; } | 65 void setOwnerNodeId(int id) { m_ownerNodeId = id; } |
62 | 66 |
63 void appendAnnotatedInvalidateRect(const FloatRect&, PaintInvalidationReason
); | 67 void appendAnnotatedInvalidateRect(const FloatRect&, PaintInvalidationReason
); |
64 void clearAnnotatedInvalidateRects(); | 68 void clearAnnotatedInvalidateRects(); |
65 | 69 |
66 private: | 70 private: |
67 void appendAnnotatedInvalidateRects(base::trace_event::TracedValue*) const; | 71 void appendAnnotatedInvalidateRects(base::trace_event::TracedValue*) const; |
68 void appendCompositingReasons(base::trace_event::TracedValue*) const; | 72 void appendCompositingReasons(base::trace_event::TracedValue*) const; |
| 73 void appendSquashingDisallowedReasons(base::trace_event::TracedValue*) const
; |
69 void appendOwnerNodeId(base::trace_event::TracedValue*) const; | 74 void appendOwnerNodeId(base::trace_event::TracedValue*) const; |
70 | 75 |
71 struct AnnotatedInvalidationRect { | 76 struct AnnotatedInvalidationRect { |
72 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 77 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
73 FloatRect rect; | 78 FloatRect rect; |
74 PaintInvalidationReason reason; | 79 PaintInvalidationReason reason; |
75 }; | 80 }; |
76 | 81 |
77 CompositingReasons m_compositingReasons; | 82 CompositingReasons m_compositingReasons; |
| 83 SquashingDisallowedReasons m_squashingDisallowedReasons; |
78 int m_ownerNodeId; | 84 int m_ownerNodeId; |
79 Vector<AnnotatedInvalidationRect> m_invalidations; | 85 Vector<AnnotatedInvalidationRect> m_invalidations; |
80 Vector<AnnotatedInvalidationRect> m_previousInvalidations; | 86 Vector<AnnotatedInvalidationRect> m_previousInvalidations; |
81 }; | 87 }; |
82 | 88 |
83 } // namespace blink | 89 } // namespace blink |
84 | 90 |
85 #endif | 91 #endif |
OLD | NEW |