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

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

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 months 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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
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/scoped_ptr.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 "platform/graphics/SquashingDisallowedReasons.h"
39 #include "wtf/Allocator.h" 39 #include "wtf/Allocator.h"
40 #include "wtf/Noncopyable.h" 40 #include "wtf/Noncopyable.h"
41 #include "wtf/Vector.h" 41 #include "wtf/Vector.h"
42 42
43 namespace base { 43 namespace base {
44 namespace trace_event { 44 namespace trace_event {
45 class TracedValue; 45 class TracedValue;
46 } 46 }
47 } 47 }
48 48
49 namespace blink { 49 namespace blink {
50 50
51 class GraphicsLayerDebugInfo final { 51 class GraphicsLayerDebugInfo final {
52 DISALLOW_NEW(); 52 DISALLOW_NEW();
53 WTF_MAKE_NONCOPYABLE(GraphicsLayerDebugInfo); 53 WTF_MAKE_NONCOPYABLE(GraphicsLayerDebugInfo);
54 public: 54 public:
55 GraphicsLayerDebugInfo(); 55 GraphicsLayerDebugInfo();
56 ~GraphicsLayerDebugInfo(); 56 ~GraphicsLayerDebugInfo();
57 57
58 scoped_refptr<base::trace_event::TracedValue> asTracedValue() const; 58 scoped_ptr<base::trace_event::TracedValue> asTracedValue() const;
59 59
60 CompositingReasons getCompositingReasons() const { return m_compositingReaso ns; } 60 CompositingReasons getCompositingReasons() const { return m_compositingReaso ns; }
61 void setCompositingReasons(CompositingReasons reasons) { m_compositingReason s = reasons; } 61 void setCompositingReasons(CompositingReasons reasons) { m_compositingReason s = reasons; }
62 62
63 SquashingDisallowedReasons squashingDisallowedReasons() const { return m_squ ashingDisallowedReasons; } 63 SquashingDisallowedReasons squashingDisallowedReasons() const { return m_squ ashingDisallowedReasons; }
64 void setSquashingDisallowedReasons(SquashingDisallowedReasons reasons) { m_s quashingDisallowedReasons = reasons; } 64 void setSquashingDisallowedReasons(SquashingDisallowedReasons reasons) { m_s quashingDisallowedReasons = reasons; }
65 void setOwnerNodeId(int id) { m_ownerNodeId = id; } 65 void setOwnerNodeId(int id) { m_ownerNodeId = id; }
66 66
67 void appendAnnotatedInvalidateRect(const FloatRect&, PaintInvalidationReason ); 67 void appendAnnotatedInvalidateRect(const FloatRect&, PaintInvalidationReason );
68 void clearAnnotatedInvalidateRects(); 68 void clearAnnotatedInvalidateRects();
(...skipping 13 matching lines...) Expand all
82 CompositingReasons m_compositingReasons; 82 CompositingReasons m_compositingReasons;
83 SquashingDisallowedReasons m_squashingDisallowedReasons; 83 SquashingDisallowedReasons m_squashingDisallowedReasons;
84 int m_ownerNodeId; 84 int m_ownerNodeId;
85 Vector<AnnotatedInvalidationRect> m_invalidations; 85 Vector<AnnotatedInvalidationRect> m_invalidations;
86 Vector<AnnotatedInvalidationRect> m_previousInvalidations; 86 Vector<AnnotatedInvalidationRect> m_previousInvalidations;
87 }; 87 };
88 88
89 } // namespace blink 89 } // namespace blink
90 90
91 #endif 91 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698