Index: ui/gfx/canvas_linux.cc |
diff --git a/ui/gfx/canvas_linux.cc b/ui/gfx/canvas_linux.cc |
index 9d417c998c7a629b1339fb81a198ae7b8ce24c0b..c2a4eec69b7f35c01a264dad864f3269a23c2428 100644 |
--- a/ui/gfx/canvas_linux.cc |
+++ b/ui/gfx/canvas_linux.cc |
@@ -112,7 +112,7 @@ void DrawStringContext::Draw(SkColor text_color) { |
void DrawStringContext::DrawWithHalo(SkColor text_color, |
SkColor halo_color) { |
gfx::Size size(bounds_.width() + 2, bounds_.height() + 2); |
- gfx::Canvas text_canvas(size, false); |
+ gfx::Canvas text_canvas(size, scale_factor(), false); |
text_canvas.FillRect(gfx::Rect(size), static_cast<SkColor>(0)); |
{ |
@@ -157,7 +157,9 @@ void DrawStringContext::DrawWithHalo(SkColor text_color, |
const SkBitmap& text_bitmap = const_cast<SkBitmap&>( |
skia::GetTopDevice(*text_canvas.sk_canvas())->accessBitmap(false)); |
- canvas_->DrawImageInt(text_bitmap, text_rect_.x() - 1, text_rect_.y() - 1); |
+ const gfx::ImageSkia text_image = gfx::ImageSkia(gfx::ImageSkiaRep( |
+ text_bitmap, text_canvas.scale_factor())); |
+ canvas_->DrawImageInt(text_image, text_rect_.x() - 1, text_rect_.y() - 1); |
} |
void DrawStringContext::DrawUnderline(cairo_t* cr, double extra_edge_width) { |