| Index: ui/gfx/canvas_paint_win.h
|
| diff --git a/ui/gfx/canvas_paint_win.h b/ui/gfx/canvas_paint_win.h
|
| index 1316b9616bd7f0e719c4e7a0c14d62ea81ed7100..520bdcc482de1001fe59fa2f17b304ce56e35679 100644
|
| --- a/ui/gfx/canvas_paint_win.h
|
| +++ b/ui/gfx/canvas_paint_win.h
|
| @@ -6,6 +6,7 @@
|
| #define UI_GFX_CANVAS_PAINT_WIN_H_
|
|
|
| #include "skia/ext/platform_canvas.h"
|
| +#include "ui/base/win/dpi.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/canvas_paint.h"
|
| #include "ui/gfx/size.h"
|
| @@ -110,16 +111,18 @@ class UI_EXPORT CanvasSkiaPaint : public Canvas {
|
| const int width = ps_.rcPaint.right - ps_.rcPaint.left;
|
| const int height = ps_.rcPaint.bottom - ps_.rcPaint.top;
|
|
|
| - RecreateBackingCanvas(gfx::Size(width, height), ui::SCALE_FACTOR_100P,
|
| - opaque);
|
| + RecreateBackingCanvas(gfx::Size(width, height),
|
| + ui::GetScaleFactorFromScale(ui::win::GetDeviceScaleFactor()),
|
| + opaque);
|
| skia::PlatformCanvas* canvas = platform_canvas();
|
|
|
| canvas->clear(SkColorSetARGB(0, 0, 0, 0));
|
|
|
| // This will bring the canvas into the screen coordinate system for the
|
| // dirty rect
|
| - canvas->translate(SkIntToScalar(-ps_.rcPaint.left),
|
| - SkIntToScalar(-ps_.rcPaint.top));
|
| + canvas->translate(
|
| + SkScalarRoundToInt(-ps_.rcPaint.left/ui::win::GetDeviceScaleFactor()),
|
| + SkScalarRoundToInt(-ps_.rcPaint.top/ui::win::GetDeviceScaleFactor()));
|
| }
|
|
|
| // If true, this canvas was created for a BeginPaint.
|
|
|