New issue
Advanced search Search tips

Issue 851972 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

Skia pattern shader leaves cracks with sub-unit scale

Project Member Reported by schenney@chromium.org, Jun 12 2018

Issue description

Open third_party/WebKit/LayoutTests/fast/backgrounds/tiny-tile-zoomed.html in the browser and note the crack through the middle.

The background is being drawn with:
Image size "2x100"
Scale factor "0.5x0.5"
Giving a skia matrix of
 0.5 0   8
 0   0.5 8
 0   0   1

Filling Dest Rect 8,8 100,100

Repeating x and y

0 space size

The result should be a perfect crack free tiling, but it's not.
 
Labels: -Pri-2 Target-69 Pri-1
This is causing a lot of tests to fail with more precise background image positioning/sizing. See, for example:

 css2.1/t140201-c534-bgreps-00-c-ag.html
 css2.1/t140201-c534-bgreps-01-c-ag.html
 css2.1/t140201-c534-bgreps-02-c-ag.html
 css2.1/t140201-c534-bgreps-03-c-ag.html
 css2.1/t140201-c534-bgreps-05-c-ag.html
Looks like an issue with the encoded bitmap (see attached):

 * size: 2x100
 * color: all transparent except the top two pixel rows, which are (183,184,186,55) and (214,215,217,143), respectively

Likely an resizing artifact?

So the seam is due to these two rows (repeated horizontally).
img.png
87 bytes View Download
Same test with a corrected (all-transparent bg image): https://codepen.io/fmalita/pen/yEbREv

The css2.1 tests are likely exercising different seaming issues.
Components: -Internals>Skia Tests
Owner: fmalita@chromium.org
Status: Started (was: Untriaged)
Ha, and it looks like I authored the test :)  I'll update the png such that it passes even without zooming out.
Ahh, didn't think to check that.

And it looks like I've fixed the cs2.1 tests by fixing phase calculation, so cancel that one.
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/98a1ae8ab778d441d796648883492c0613a4ffd8

commit 98a1ae8ab778d441d796648883492c0613a4ffd8
Author: Florin Malita <fmalita@chromium.org>
Date: Wed Jun 13 13:48:56 2018

Update tiny-tile-zoomed.html

The embedded 2x100 PNG is supposed to be all transparent, but it
contains some resizing artifacts in the top two rows.

This is not problematic for layout tests because when zoomed-out we skip
drawing the background altogether.  But if opened in a browser, without
zooming out, the result shows a misleading seam in the middle.

Update to all-transparent 2x100 PNG.

Bug:  851972 
Change-Id: I8bf14ad9101967afc2c9046a2eea09a2370d0476
Reviewed-on: https://chromium-review.googlesource.com/1097618
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566821}
[modify] https://crrev.com/98a1ae8ab778d441d796648883492c0613a4ffd8/third_party/WebKit/LayoutTests/fast/backgrounds/tiny-tile-zoomed.html

Status: Fixed (was: Started)

Sign in to add a comment