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

Unified Diff: cc/resources/picture_pile.cc

Issue 692473003: cc: Translate the canvas to correctly detect solid colors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test Created 6 years, 2 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 | cc/resources/picture_pile_unittest.cc » ('j') | cc/resources/picture_pile_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile.cc
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
index 2f62056b2e6407e7d706e07addecc6735c75c1c4..e00ed54eab7e86c2d876e959a922941dfc05a85d 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -570,7 +570,8 @@ void PicturePile::DetermineIfSolidColor() {
}
skia::AnalysisCanvas canvas(recorded_viewport_.width(),
recorded_viewport_.height());
- picture->Raster(&canvas, NULL, Region(), 1.0f);
+ canvas.translate(-recorded_viewport_.x(), -recorded_viewport_.y());
+ picture->Raster(&canvas, nullptr, Region(), 1.0f);
is_solid_color_ = canvas.GetColorIfSolid(&solid_color_);
}
« no previous file with comments | « no previous file | cc/resources/picture_pile_unittest.cc » ('j') | cc/resources/picture_pile_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698