DescriptionCompensate 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)
|