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

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

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 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 14 matching lines...) Expand all
25 25
26 GraphicsLayerDebugInfo::GraphicsLayerDebugInfo() 26 GraphicsLayerDebugInfo::GraphicsLayerDebugInfo()
27 : m_compositingReasons(CompositingReasonNone) 27 : m_compositingReasons(CompositingReasonNone)
28 , m_squashingDisallowedReasons(SquashingDisallowedReasonsNone) 28 , m_squashingDisallowedReasons(SquashingDisallowedReasonsNone)
29 , m_ownerNodeId(0) 29 , m_ownerNodeId(0)
30 { 30 {
31 } 31 }
32 32
33 GraphicsLayerDebugInfo::~GraphicsLayerDebugInfo() { } 33 GraphicsLayerDebugInfo::~GraphicsLayerDebugInfo() { }
34 34
35 scoped_refptr<base::trace_event::TracedValue> GraphicsLayerDebugInfo::asTracedVa lue() const 35 scoped_ptr<base::trace_event::TracedValue> GraphicsLayerDebugInfo::asTracedValue () const
36 { 36 {
37 scoped_refptr<base::trace_event::TracedValue> tracedValue = new base::trace_ event::TracedValue; 37 scoped_ptr<base::trace_event::TracedValue> tracedValue(
38 new base::trace_event::TracedValue());
38 appendAnnotatedInvalidateRects(tracedValue.get()); 39 appendAnnotatedInvalidateRects(tracedValue.get());
39 appendCompositingReasons(tracedValue.get()); 40 appendCompositingReasons(tracedValue.get());
40 appendSquashingDisallowedReasons(tracedValue.get()); 41 appendSquashingDisallowedReasons(tracedValue.get());
41 appendOwnerNodeId(tracedValue.get()); 42 appendOwnerNodeId(tracedValue.get());
42 return tracedValue; 43 return tracedValue;
43 } 44 }
44 45
45 void GraphicsLayerDebugInfo::appendAnnotatedInvalidateRects(base::trace_event::T racedValue* tracedValue) const 46 void GraphicsLayerDebugInfo::appendAnnotatedInvalidateRects(base::trace_event::T racedValue* tracedValue) const
46 { 47 {
47 tracedValue->BeginArray("annotated_invalidation_rects"); 48 tracedValue->BeginArray("annotated_invalidation_rects");
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 m_invalidations.append(annotatedRect); 100 m_invalidations.append(annotatedRect);
100 } 101 }
101 102
102 void GraphicsLayerDebugInfo::clearAnnotatedInvalidateRects() 103 void GraphicsLayerDebugInfo::clearAnnotatedInvalidateRects()
103 { 104 {
104 m_previousInvalidations.clear(); 105 m_previousInvalidations.clear();
105 m_previousInvalidations.swap(m_invalidations); 106 m_previousInvalidations.swap(m_invalidations);
106 } 107 }
107 108
108 } // namespace blink 109 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698