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

Issue 1901103002: Compensate for source scaling in hidpi mode (Closed)

Created:
4 years, 8 months ago by davve
Modified:
4 years, 8 months ago
Reviewers:
fs
CC:
blink-reviews, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, jfernandez, Manuel Rego, slimming-paint-reviews_chromium.org, svillar
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Compensate for source scaling in hidpi mode In crrev.com/379801 scaling of hidpi nine piece image grids was changed from using the real image size to using the "layout'ed" image size (i.e. image size compensated by image scale factor) since that is what Image::imageSize() returns. Instead the computed source rect was scaled afterwards, right before drawing. If GraphicsContext.drawTiledImage() is called with (stretch, stretch) as tile rules, it ignores the passed scale factor and computes the scale factor between source and destination itself. However, if one rule is stretch and the other one repeat, or if both are repeat, the tile scale factor is used when drawing and the relation between the sizes of source and dest ignored. What was missing from crrev.com/379801 was to compensate for the image scale factor by adjusting tileScale. That meant that the (stretch, stretch) worked fine but as soon as one repeat was specified, the scale factor was wrong. BUG=601544 Committed: https://crrev.com/ecead9a073907d4a2ba8b98527c9cb22125d6fa8 Cr-Commit-Position: refs/heads/master@{#388451}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Add DOCTYPE to added test. #

Messages

Total messages: 16 (8 generated)
davve
PTAL. The core of the change is: drawInfo.tileScale.scale(1 / imageScaleFactor); The rest is just moving ...
4 years, 8 months ago (2016-04-19 14:45:13 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1901103002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1901103002/1
4 years, 8 months ago (2016-04-19 14:48:33 UTC) #5
fs
lgtm https://codereview.chromium.org/1901103002/diff/1/third_party/WebKit/LayoutTests/fast/hidpi/image-set-border-image-button-expected.html File third_party/WebKit/LayoutTests/fast/hidpi/image-set-border-image-button-expected.html (right): https://codereview.chromium.org/1901103002/diff/1/third_party/WebKit/LayoutTests/fast/hidpi/image-set-border-image-button-expected.html#newcode1 third_party/WebKit/LayoutTests/fast/hidpi/image-set-border-image-button-expected.html:1: <script src="resources/srcset-helper.js"></script> Ditto. https://codereview.chromium.org/1901103002/diff/1/third_party/WebKit/LayoutTests/fast/hidpi/image-set-border-image-button.html File third_party/WebKit/LayoutTests/fast/hidpi/image-set-border-image-button.html (right): https://codereview.chromium.org/1901103002/diff/1/third_party/WebKit/LayoutTests/fast/hidpi/image-set-border-image-button.html#newcode1 ...
4 years, 8 months ago (2016-04-19 14:59:34 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-19 16:05:51 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1901103002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1901103002/20001
4 years, 8 months ago (2016-04-20 07:37:28 UTC) #12
davve
https://codereview.chromium.org/1901103002/diff/1/third_party/WebKit/LayoutTests/fast/hidpi/image-set-border-image-button.html File third_party/WebKit/LayoutTests/fast/hidpi/image-set-border-image-button.html (right): https://codereview.chromium.org/1901103002/diff/1/third_party/WebKit/LayoutTests/fast/hidpi/image-set-border-image-button.html#newcode1 third_party/WebKit/LayoutTests/fast/hidpi/image-set-border-image-button.html:1: <title>border-image with border-image-repeat in hidpi setting</title> On 2016/04/19 14:59:34, ...
4 years, 8 months ago (2016-04-20 07:40:19 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-20 09:06:35 UTC) #14
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:21:51 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ecead9a073907d4a2ba8b98527c9cb22125d6fa8
Cr-Commit-Position: refs/heads/master@{#388451}

Powered by Google App Engine
This is Rietveld 408576698