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

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

Issue 2769533002: Clean up calls to ToSkPicture (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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp b/third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp
index 5f1201319b5b70039a9f0cc86c6aebb5a808de55..7cac007c2aabc2eb4a7c0d83f3588d96e012402a 100644
--- a/third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp
+++ b/third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp
@@ -23,7 +23,9 @@ void PaintGeneratedImage::draw(PaintCanvas* canvas,
canvas->scale(destRect.width() / srcRect.width(),
destRect.height() / srcRect.height());
canvas->translate(-srcRect.x(), -srcRect.y());
- canvas->drawPicture(m_record, nullptr, &flags);
+ SkRect bounds = m_record->cullRect();
+ canvas->saveLayer(&bounds, &flags);
+ canvas->drawPicture(m_record);
}
void PaintGeneratedImage::drawTile(GraphicsContext& context,
« no previous file with comments | « cc/paint/skia_paint_canvas.cc ('k') | third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698