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

Unified Diff: third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp

Issue 2889653002: Remove cullRect() from PaintOpBuffer. (Closed)
Patch Set: movecullrect2 rebase-once-and-for-all Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp b/third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp
index fb4eebcc58a5dfe2016627ddd1576acd9b191b24..926fe406343a95b3693e9d5ee5f663f271710d42 100644
--- a/third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp
+++ b/third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp
@@ -905,18 +905,18 @@ std::unique_ptr<JSONArray> LoggingCanvas::Log() {
}
#ifndef NDEBUG
-String RecordAsDebugString(const PaintRecord* record) {
- const SkIRect bounds = record->cullRect().roundOut();
- LoggingCanvas canvas(bounds.width(), bounds.height());
+String RecordAsDebugString(const PaintRecord* record, const SkRect& bounds) {
+ const SkIRect enclosing_bounds = bounds.roundOut();
+ LoggingCanvas canvas(enclosing_bounds.width(), enclosing_bounds.height());
record->playback(&canvas);
std::unique_ptr<JSONObject> record_as_json = JSONObject::Create();
- record_as_json->SetObject("cullRect", ObjectForSkRect(record->cullRect()));
+ record_as_json->SetObject("cullRect", ObjectForSkRect(bounds));
record_as_json->SetArray("operations", canvas.Log());
return record_as_json->ToPrettyJSONString();
}
-void ShowPaintRecord(const PaintRecord* record) {
- WTFLogAlways("%s\n", RecordAsDebugString(record).Utf8().data());
+void ShowPaintRecord(const PaintRecord* record, const SkRect& bounds) {
+ WTFLogAlways("%s\n", RecordAsDebugString(record, bounds).Utf8().data());
}
#endif

Powered by Google App Engine
This is Rietveld 408576698