Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h

Issue 1497683002: Make platform/graphics to use USING_FAST_MALLOC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 "wtf/Allocator.h"
39 #include "wtf/Noncopyable.h"
38 #include "wtf/Vector.h" 40 #include "wtf/Vector.h"
39 41
40 namespace base { 42 namespace base {
41 namespace trace_event { 43 namespace trace_event {
42 class TracedValue; 44 class TracedValue;
43 } 45 }
44 } 46 }
45 47
46 namespace blink { 48 namespace blink {
47 49
48 class GraphicsLayerDebugInfo { 50 class GraphicsLayerDebugInfo final {
51 DISALLOW_NEW();
52 WTF_MAKE_NONCOPYABLE(GraphicsLayerDebugInfo);
49 public: 53 public:
50 GraphicsLayerDebugInfo(); 54 GraphicsLayerDebugInfo();
51 ~GraphicsLayerDebugInfo(); 55 ~GraphicsLayerDebugInfo();
52 56
53 scoped_refptr<base::trace_event::TracedValue> asTracedValue() const; 57 scoped_refptr<base::trace_event::TracedValue> asTracedValue() const;
54 58
55 CompositingReasons compositingReasons() const { return m_compositingReasons; } 59 CompositingReasons compositingReasons() const { return m_compositingReasons; }
56 void setCompositingReasons(CompositingReasons reasons) { m_compositingReason s = reasons; } 60 void setCompositingReasons(CompositingReasons reasons) { m_compositingReason s = reasons; }
57 void setOwnerNodeId(int id) { m_ownerNodeId = id; } 61 void setOwnerNodeId(int id) { m_ownerNodeId = id; }
58 62
59 void appendAnnotatedInvalidateRect(const FloatRect&, PaintInvalidationReason ); 63 void appendAnnotatedInvalidateRect(const FloatRect&, PaintInvalidationReason );
60 void clearAnnotatedInvalidateRects(); 64 void clearAnnotatedInvalidateRects();
61 65
62 private: 66 private:
63 void appendAnnotatedInvalidateRects(base::trace_event::TracedValue*) const; 67 void appendAnnotatedInvalidateRects(base::trace_event::TracedValue*) const;
64 void appendCompositingReasons(base::trace_event::TracedValue*) const; 68 void appendCompositingReasons(base::trace_event::TracedValue*) const;
65 void appendOwnerNodeId(base::trace_event::TracedValue*) const; 69 void appendOwnerNodeId(base::trace_event::TracedValue*) const;
66 70
67 struct AnnotatedInvalidationRect { 71 struct AnnotatedInvalidationRect {
72 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
68 FloatRect rect; 73 FloatRect rect;
69 PaintInvalidationReason reason; 74 PaintInvalidationReason reason;
70 }; 75 };
71 76
72 CompositingReasons m_compositingReasons; 77 CompositingReasons m_compositingReasons;
73 int m_ownerNodeId; 78 int m_ownerNodeId;
74 Vector<AnnotatedInvalidationRect> m_invalidations; 79 Vector<AnnotatedInvalidationRect> m_invalidations;
75 Vector<AnnotatedInvalidationRect> m_previousInvalidations; 80 Vector<AnnotatedInvalidationRect> m_previousInvalidations;
76 }; 81 };
77 82
78 } // namespace blink 83 } // namespace blink
79 84
80 #endif 85 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698