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

Unified Diff: cc/resources/drawing_display_item.cc

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « cc/resources/drawing_display_item.h ('k') | cc/resources/picture.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/drawing_display_item.cc
diff --git a/cc/resources/drawing_display_item.cc b/cc/resources/drawing_display_item.cc
index eb05e33827cd2d89a483099de72b318c17a10101..473cb77e6ef85a43fc8e6cdc85ad8e39b7950e86 100644
--- a/cc/resources/drawing_display_item.cc
+++ b/cc/resources/drawing_display_item.cc
@@ -32,6 +32,18 @@ void DrawingDisplayItem::Raster(SkCanvas* canvas,
canvas->restore();
}
+void DrawingDisplayItem::RasterForTracing(SkCanvas* canvas) const {
+ canvas->save();
+ canvas->translate(location_.x(), location_.y());
+ // The picture debugger in about:tracing doesn't drill down into |drawPicture|
+ // operations. Calling |playback()| rather than |drawPicture()| causes the
+ // skia operations in |picture_| to appear individually in the picture
+ // produced for tracing rather than being hidden inside a drawPicture
+ // operation.
+ picture_->playback(canvas);
+ canvas->restore();
+}
+
bool DrawingDisplayItem::IsSuitableForGpuRasterization() const {
return picture_->suitableForGpuRasterization(NULL);
}
« no previous file with comments | « cc/resources/drawing_display_item.h ('k') | cc/resources/picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698