Issue metadata
Sign in to add a comment
|
Can not display large image with gpu rasterization
Reported by
zljj0...@gmail.com,
Nov 1 2017
|
||||||||||||||||||||||
Issue descriptionExample URL: Steps to reproduce the problem: visit the tao.html in attachement What is the expected behavior? image display normal What went wrong? can not display image with background-position: xpx, 0; but OK with background-position: x%, 0 Does it occur on multiple sites: N/A Is it a problem with a plugin? N/A Did this work before? N/A Does this work in other browsers? N/A Chrome version: 61.0.3163.98 Channel: stable OS Version: 8.0 Flash Version: 1. image size: 23200x600 2. OK using cpu rasterization ps:if use background-position: xpx 0, it's draw command using SkCanvas::drawRect, and can not upload texture successfully; if use background-position: x%, 0, it's draw command is SkCanvas::drawImageRect, and SkGpuDevice::drawTiledBitmap, so it's OK.
,
Nov 2 2017
@sandeepkumars: hi, i tried #62.0.3202.73, but issue still exist. Plsease see the attachments, cpu_raster.png is right effect, gpu_raster.png is wrong, the different is the image below can not display with gpu rasterization. and i debugged chromium, found that: if use background-position: xpx 0, it's draw command using SkCanvas::drawRect, and can not upload texture successfully; if use background-position: x%, 0, it's draw command is SkCanvas::drawImageRect, and SkGpuDevice::drawTiledBitmap, so it's OK. Please confirm it. Thank you.
,
Nov 2 2017
Thank you for providing more feedback. Adding requester "sandeepkumars@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 2 2017
If image size exceed max texture size that gpu supports, and image is draw by SkCanvas::drawRect with gpu rasterization, this issue will occurs.
,
Nov 3 2017
Tested the issue using #61.0.3163.98 on Android 8.0.0 Nexus 5X Build/OPR1 and could observe the mentioned behavior in gpu_raster.png. Observed the same behavior since M55 using the mentioned html file. @zljj0818: Could you please confirm, are you using any other file to get cpu_raster.png behavior or the same file? If so please mention the Chrome good version and the other file for further triaging of the issue? Thanks!!
,
Nov 3 2017
@sandeepkumars: use same file and device, i just force close gpu rasterization in chrome://flags
,
Nov 3 2017
Thank you for providing more feedback. Adding requester "sandeepkumars@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 4 2017
It's same issue as https://bugs.chromium.org/p/chromium/issues/detail?id=676636
,
Nov 7 2017
This issue was not seen when gpu rasterization flag was disabled from Chrome://Flags. Issue is observed only when gpu rasterization flag was enabled. Adding appropriate component and CC'ing the respective dev from issue 676636 as this issue looks same as issue 676636 . Thanks!!
,
Nov 7 2017
,
Dec 7 2017
@zljj0818 the issue here is you're forcing tiling for the second div background, which causes us to use shaders, and fail the texture upload. - div size: 400 x 250 - image size: <huge> x 250 - |position| runs in [0,190] - then you set background-position: |position|px 0; So the left edge of the background is always in [0,190] => one image tile doesn't fully cover the div => we must draw two tiles => image shader => kaboom. The trick to avoiding this sort of problem is to ensure a single image tile covers your dest area completely. In this particular case, I believe setting background-position: |position|px; is not what you want anyway, as it only slides the first frame in the viewport - for any meaningful animation, you probably want a large |position| multiplier, to ensure advancing between frames. Then if background-position is larger that the div width, the wrap-around tile will fully cover and we avoid tiling. E.g.: https://codepen.io/fmalita/full/XzLday/ Alternatively, ignoring meaningful animation, you can also avoid tiling by setting background-repeat: no-repeat; - e.g. https://codepen.io/fmalita/full/wPLGVp/
,
Dec 7 2017
Re-opening this bug as the testcase given is not yet fixed.
,
Dec 7 2017
We might be able to work around the issue of maximum texture size in cc, by taking advantage of the fact that cc knows the final texture after clipping etc is much smaller. Khushal is going to give it a shot.
,
Feb 15 2018
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by sandeepkumars@chromium.org
, Nov 2 2017Labels: Needs-triage-Mobile Triaged-Mobile Needs-Feedback