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

Unified Diff: cc/tiles/decoded_image_tracker.cc

Issue 2928433003: cc: Add scaling for checkered images. (Closed)
Patch Set: fixd tests 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
Index: cc/tiles/decoded_image_tracker.cc
diff --git a/cc/tiles/decoded_image_tracker.cc b/cc/tiles/decoded_image_tracker.cc
index 5672854c1f554ff578075859a2662d293799075a..cfb6f8cfcdcdeb8e18f35141202fac12ab2bb5f0 100644
--- a/cc/tiles/decoded_image_tracker.cc
+++ b/cc/tiles/decoded_image_tracker.cc
@@ -21,9 +21,23 @@ 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->bounds();
+ // TODO(khushalsagar): Eliminate the use of an incorrect id here and have all
+ // call-sites provide PaintImage to the ImageController.
+ DrawImage draw_image(
+ PaintImage(PaintImage::kUnknownStableId,
+ sk_sp<SkImage>(const_cast<SkImage*>(image.release()))),
+ image_bounds, kNone_SkFilterQuality, SkMatrix::I(), target_color_space);
image_controller_->QueueImageDecode(
- std::move(image), base::Bind(&DecodedImageTracker::ImageDecodeFinished,
- base::Unretained(this), callback));
+ draw_image, base::Bind(&DecodedImageTracker::ImageDecodeFinished,
+ base::Unretained(this), callback));
}
void DecodedImageTracker::NotifyFrameFinished() {

Powered by Google App Engine
This is Rietveld 408576698