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

Unified Diff: cc/resources/drawing_display_item.cc

Issue 1116523002: cc: Remove save/restore from DrawingDisplayItem::Raster. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 5 years, 8 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 | « no previous file | no next file » | 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 91ab3fb0d38103b37a08a0ab9e8a9c25df79ee49..578da5cd2dec64f6d0fe6f49abfc8d39672c8644 100644
--- a/cc/resources/drawing_display_item.cc
+++ b/cc/resources/drawing_display_item.cc
@@ -26,12 +26,12 @@ DrawingDisplayItem::~DrawingDisplayItem() {
void DrawingDisplayItem::Raster(SkCanvas* canvas,
SkDrawPictureCallback* callback) const {
- canvas->save();
+ // SkPicture always does a wrapping save/restore on the canvas, so it is not
+ // necessary here.
if (callback)
picture_->playback(canvas, callback);
else
canvas->drawPicture(picture_.get());
- canvas->restore();
}
bool DrawingDisplayItem::IsSuitableForGpuRasterization() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698