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 "platform/JSONValues.h" | 34 #include "platform/JSONValues.h" |
35 #include "platform/geometry/LayoutRect.h" | 35 #include "platform/geometry/LayoutRect.h" |
36 #include "platform/graphics/CompositingReasons.h" | 36 #include "platform/graphics/CompositingReasons.h" |
37 #include "public/platform/WebGraphicsLayerDebugInfo.h" | 37 #include "public/platform/WebGraphicsLayerDebugInfo.h" |
| 38 #include "public/platform/WebInvalidationDebugAnnotations.h" |
38 | 39 |
39 #include "wtf/Vector.h" | 40 #include "wtf/Vector.h" |
40 | 41 |
41 namespace blink { | 42 namespace blink { |
42 | 43 |
43 class GraphicsLayerDebugInfo FINAL : public WebGraphicsLayerDebugInfo { | 44 class GraphicsLayerDebugInfo FINAL : public WebGraphicsLayerDebugInfo { |
44 public: | 45 public: |
45 GraphicsLayerDebugInfo(); | 46 GraphicsLayerDebugInfo(); |
46 virtual ~GraphicsLayerDebugInfo(); | 47 virtual ~GraphicsLayerDebugInfo(); |
47 | 48 |
48 virtual void appendAsTraceFormat(WebString* out) const OVERRIDE; | 49 virtual void appendAsTraceFormat(WebString* out) const OVERRIDE; |
| 50 virtual void getAnnotatedInvalidationRects(WebVector<WebAnnotatedInvalidatio
nRect>& rects) const OVERRIDE; |
49 | 51 |
50 GraphicsLayerDebugInfo* clone() const; | 52 GraphicsLayerDebugInfo* clone() const; |
51 | 53 |
52 void setDebugName(const String& name) { m_debugName = name; } | 54 void setDebugName(const String& name) { m_debugName = name; } |
53 CompositingReasons compositingReasons() const { return m_compositingReasons;
} | 55 CompositingReasons compositingReasons() const { return m_compositingReasons;
} |
54 void setCompositingReasons(CompositingReasons reasons) { m_compositingReason
s = reasons; } | 56 void setCompositingReasons(CompositingReasons reasons) { m_compositingReason
s = reasons; } |
55 void setOwnerNodeId(int id) { m_ownerNodeId = id; } | 57 void setOwnerNodeId(int id) { m_ownerNodeId = id; } |
56 Vector<LayoutRect>& currentLayoutRects() { return m_currentLayoutRects; } | 58 Vector<LayoutRect>& currentLayoutRects() { return m_currentLayoutRects; } |
57 | 59 |
| 60 void appendAnnotatedInvalidateRect(const FloatRect&, WebInvalidationDebugAnn
otations); |
| 61 void clearAnnotatedInvalidateRects(); |
| 62 |
58 private: | 63 private: |
59 void appendLayoutRects(JSONObject*) const; | 64 void appendLayoutRects(JSONObject*) const; |
60 void appendCompositingReasons(JSONObject*) const; | 65 void appendCompositingReasons(JSONObject*) const; |
61 void appendDebugName(JSONObject*) const; | 66 void appendDebugName(JSONObject*) const; |
62 void appendOwnerNodeId(JSONObject*) const; | 67 void appendOwnerNodeId(JSONObject*) const; |
63 | 68 |
64 String m_debugName; | 69 String m_debugName; |
65 CompositingReasons m_compositingReasons; | 70 CompositingReasons m_compositingReasons; |
66 int m_ownerNodeId; | 71 int m_ownerNodeId; |
67 Vector<LayoutRect> m_currentLayoutRects; | 72 Vector<LayoutRect> m_currentLayoutRects; |
| 73 Vector<WebAnnotatedInvalidationRect> m_invalidations; |
68 }; | 74 }; |
69 | 75 |
70 } // namespace blink | 76 } // namespace blink |
71 | 77 |
72 #endif | 78 #endif |
OLD | NEW |