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

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

Created:
4 years, 8 months ago by pdr.
Modified:
4 years, 8 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2704
Target Ref:
refs/pending/branch-heads/2704
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 Review URL: https://codereview.chromium.org/1901103002 Cr-Commit-Position: refs/heads/master@{#388451} (cherry picked from commit ecead9a073907d4a2ba8b98527c9cb22125d6fa8) Committed: https://chromium.googlesource.com/chromium/src/+/e4c8a71cfd74d07cd9ae15f7be899f24ded225e1

Patch Set 1 #

Messages

Total messages: 2 (1 generated)
pdr.
4 years, 8 months ago (2016-04-20 23:04:47 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
e4c8a71cfd74d07cd9ae15f7be899f24ded225e1 (tree was closed).

Powered by Google App Engine
This is Rietveld 408576698