diff options
author | olaru@adobe.com <olaru@adobe.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-22 13:37:44 +0000 |
---|---|---|
committer | olaru@adobe.com <olaru@adobe.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-22 13:37:44 +0000 |
commit | aa7e7a108caf6a77991fd2c99068687726bb4b21 (patch) | |
tree | b9184a656872aa8f995cd24b32b00a194ce11f1a | |
parent | 406e972fced045f7598fb78e9c24b0b38880a351 (diff) | |
download | chromium_src-aa7e7a108caf6a77991fd2c99068687726bb4b21.zip chromium_src-aa7e7a108caf6a77991fd2c99068687726bb4b21.tar.gz chromium_src-aa7e7a108caf6a77991fd2c99068687726bb4b21.tar.bz2 |
Setting a custom background on a HiDPI display will result in the background only being applied to the top left corner of the view. Scaling the canvas to the device scale factor before applying the clip rect for painting the background fixes the issue.
BUG=175698
Review URL: https://chromiumcodereview.appspot.com/12249002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184100 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | AUTHORS | 2 | ||||
-rw-r--r-- | content/renderer/render_widget.cc | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -224,3 +224,5 @@ Sungmann Cho <sungmann.cho@gmail.com> Evan Peterson <evan.peterson.ep@gmail.com> J. Ryan Stinnett <jryans@chromium.org> Matheus Bratfisch <matheusbrat@gmail.com> +Horia Olaru <olaru@adobe.com> +Horia Olaru <horia.olaru@gmail.com>
\ No newline at end of file diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 0c3f5e5..ef034da 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -774,6 +774,7 @@ void RenderWidget::PaintRect(const gfx::Rect& rect, // Canvas could contain multiple update rects. Clip to given rect so that // we don't accidentally clear other update rects. canvas->save(); + canvas->scale(device_scale_factor_, device_scale_factor_); canvas->clipRect(gfx::RectToSkRect(rect)); canvas->drawPaint(paint); canvas->restore(); |