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

Unified Diff: cc/tiles/decoded_image_tracker.cc

Issue 2928433003: cc: Add scaling for checkered images. (Closed)
Patch Set: .. Created 3 years, 6 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/tiles/checker_image_tracker_unittest.cc ('k') | cc/tiles/decoded_image_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/decoded_image_tracker.cc
diff --git a/cc/tiles/decoded_image_tracker.cc b/cc/tiles/decoded_image_tracker.cc
index b5c9c15b1ae189bc313f13cb518ebaa432c4361f..84323dea64e450754b36f9c7cd00e35678164442 100644
--- a/cc/tiles/decoded_image_tracker.cc
+++ b/cc/tiles/decoded_image_tracker.cc
@@ -21,9 +21,21 @@ void DecodedImageTracker::QueueImageDecode(
DCHECK(image_controller_);
// Queue the decode in the image controller, but switch out the callback for
// our own.
+
+ // TODO(ccameron): The target color space specified here should match the
+ // target color space that will be used at rasterization time. Leave this
+ // unspecified now, since that will match the rasterization-time color
+ // space while color correct rendering is disabled.
+ gfx::ColorSpace target_color_space;
+
+ auto image_bounds = image.sk_image()->bounds();
+ // TODO(khushalsagar): Eliminate the use of an incorrect id here and have all
+ // call-sites provide PaintImage to the ImageController.
+ DrawImage draw_image(image, image_bounds, kNone_SkFilterQuality,
+ SkMatrix::I(), target_color_space);
image_controller_->QueueImageDecode(
- image.sk_image(), base::Bind(&DecodedImageTracker::ImageDecodeFinished,
- base::Unretained(this), callback));
+ draw_image, base::Bind(&DecodedImageTracker::ImageDecodeFinished,
+ base::Unretained(this), callback));
}
void DecodedImageTracker::NotifyFrameFinished() {
« no previous file with comments | « cc/tiles/checker_image_tracker_unittest.cc ('k') | cc/tiles/decoded_image_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698