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

Unified Diff: cc/tiles/software_image_decode_controller.cc

Issue 1838553003: cc: Always round up target image size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« 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/tiles/software_image_decode_controller.cc
diff --git a/cc/tiles/software_image_decode_controller.cc b/cc/tiles/software_image_decode_controller.cc
index 96f5618a48f3d8e79a3b7fe343562e54643bfbf7..68d84f72f3022b11caff9a34d7ba851c3f54182c 100644
--- a/cc/tiles/software_image_decode_controller.cc
+++ b/cc/tiles/software_image_decode_controller.cc
@@ -738,8 +738,9 @@ ImageDecodeControllerKey ImageDecodeControllerKey::FromDrawImage(
gfx::Rect(image.image()->width(), image.image()->height()));
gfx::Size target_size(
- SkScalarRoundToInt(std::abs(src_rect.width() * scale.width())),
- SkScalarRoundToInt(std::abs(src_rect.height() * scale.height())));
+ static_cast<int>(std::ceil(std::abs(src_rect.width() * scale.width()))),
+ static_cast<int>(
+ std::ceil(std::abs(src_rect.height() * scale.height()))));
// Start with the quality that was requested.
SkFilterQuality quality = image.filter_quality();
« 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