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

Unified Diff: ui/gfx/canvas.cc

Issue 12730010: Fix rounding rules for skia operations to work with non-integer scaling factors. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Move CropImageSkiaRep functionality back into ExtractSubsetImageSource. Created 7 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 | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas.cc
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc
index 4b4a0f47e3bdc7a3b8a49b00cc85facf19bebb89..134c1453d2e104d7351b7abcd87f08ed215a2b3a 100644
--- a/ui/gfx/canvas.cc
+++ b/ui/gfx/canvas.cc
@@ -28,7 +28,7 @@ Canvas::Canvas(const gfx::Size& size,
bool is_opaque)
: scale_factor_(scale_factor),
canvas_(NULL) {
- gfx::Size pixel_size = gfx::ToFlooredSize(
+ gfx::Size pixel_size = gfx::ToCeiledSize(
gfx::ScaleSize(size, ui::GetScaleFactorScale(scale_factor)));
owned_canvas_ = skia::AdoptRef(skia::CreatePlatformCanvas(pixel_size.width(),
pixel_size.height(),
« no previous file with comments | « no previous file | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698