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

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

Issue 2743363006: Clean up cc/paint interfaces (Closed)
Patch Set: Rebase Created 3 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/paint/DisplayItemList.h" 5 #include "platform/graphics/paint/DisplayItemList.h"
6 6
7 #include "platform/graphics/LoggingCanvas.h" 7 #include "platform/graphics/LoggingCanvas.h"
8 #include "platform/graphics/paint/DrawingDisplayItem.h" 8 #include "platform/graphics/paint/DrawingDisplayItem.h"
9 #include "platform/graphics/paint/PaintChunk.h" 9 #include "platform/graphics/paint/PaintChunk.h"
10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if (options & ShowClientDebugName) { 85 if (options & ShowClientDebugName) {
86 #endif 86 #endif
87 json->setString( 87 json->setString(
88 "clientDebugName", 88 "clientDebugName",
89 String::format("clientDebugName: \"%s\"", 89 String::format("clientDebugName: \"%s\"",
90 displayItem.client().debugName().ascii().data())); 90 displayItem.client().debugName().ascii().data()));
91 } 91 }
92 #ifndef NDEBUG 92 #ifndef NDEBUG
93 if ((options & ShowPaintRecords) && displayItem.isDrawing()) { 93 if ((options & ShowPaintRecords) && displayItem.isDrawing()) {
94 if (const PaintRecord* record = 94 if (const PaintRecord* record =
95 static_cast<const DrawingDisplayItem&>(displayItem) 95 static_cast<const DrawingDisplayItem&>(displayItem)
danakj 2017/03/16 20:06:16 a temp var here could go a long way to less wild l
96 .GetPaintRecord()) { 96 .GetPaintRecord()
97 .get()) {
97 json->setString("record", recordAsDebugString(record)); 98 json->setString("record", recordAsDebugString(record));
98 } 99 }
99 } 100 }
100 #endif 101 #endif
101 } 102 }
102 if (hasVisualRect(i)) { 103 if (hasVisualRect(i)) {
103 IntRect localVisualRect = visualRect(i); 104 IntRect localVisualRect = visualRect(i);
104 json->setString( 105 json->setString(
105 "visualRect", 106 "visualRect",
106 String::format("[%d,%d %dx%d]", localVisualRect.x(), 107 String::format("[%d,%d %dx%d]", localVisualRect.x(),
107 localVisualRect.y(), localVisualRect.width(), 108 localVisualRect.y(), localVisualRect.width(),
108 localVisualRect.height())); 109 localVisualRect.height()));
109 } 110 }
110 jsonArray->pushObject(std::move(json)); 111 jsonArray->pushObject(std::move(json));
111 } 112 }
112 return jsonArray; 113 return jsonArray;
113 } 114 }
114 115
115 } // namespace blink 116 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698