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

Unified Diff: ui/gfx/canvas_skia.cc

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename methods and vars to make image_scale more clear Created 7 years, 3 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: ui/gfx/canvas_skia.cc
diff --git a/ui/gfx/canvas_skia.cc b/ui/gfx/canvas_skia.cc
index 5d3860662794eb3225e956d03235f786a250fcd8..f5b3030e6f9df768e4899ebe9d7901b664ee1257 100644
--- a/ui/gfx/canvas_skia.cc
+++ b/ui/gfx/canvas_skia.cc
@@ -350,7 +350,7 @@ void Canvas::DrawStringRectWithHalo(const base::string16& text,
// Create a temporary buffer filled with the halo color. It must leave room
// for the 1-pixel border around the text.
Size size(display_rect.width() + 2, display_rect.height() + 2);
- Canvas text_canvas(size, scale_factor(), true);
+ Canvas text_canvas(size, image_scale(), true);
SkPaint bkgnd_paint;
bkgnd_paint.setColor(halo_color);
text_canvas.DrawRect(Rect(size), bkgnd_paint);
@@ -381,7 +381,7 @@ void Canvas::DrawStringRectWithHalo(const base::string16& text,
// Draw the halo bitmap with blur.
ImageSkia text_image = ImageSkia(ImageSkiaRep(text_bitmap,
- text_canvas.scale_factor()));
+ text_canvas.image_scale()));
DrawImageInt(text_image, display_rect.x() - 1, display_rect.y() - 1);
}

Powered by Google App Engine
This is Rietveld 408576698