New issue
Advanced search Search tips
Starred by 3 users
Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 563816



Sign in to add a comment
Use Linear filter algorithm in texture object for OffscreenCanvas 2d
Project Member Reported by xlai@chromium.org, Dec 22 2016 Back to list
When implementing the OffscreenCanvas resizing, we notice that the 
current OffscreenCanvas 2d rendering context does not use nearest
neighbor in texture object. The webgl rendering context is doing it
correctly.

The code should be something like
TextureMailbox::set_nearest_neighbor(false).

In canvas it is fixed via CSS. But in OffscreenCanvas this is going to
be a bit tricky.

When this bug is fixed, the gpu reference image  of test Pixel_OffscreenCanvas2DResizeOnWorker should show soft edge of red
rectangle inside green rectangle (Currently it is sharp edge).

 
Comment 1 by xlai@chromium.org, Dec 22 2016
Blocking: 563816
It is not necessary to fix this via CSS for shipping. But at least we need to make sure the rendering result for 2d context is same as that for webgl context
for offscreencanvas shipping.
Comment 2 by xlai@chromium.org, Jan 2 2017
Owner: xlai@chromium.org
Status: Started
I'm having a WIP CL for this now: https://codereview.chromium.org/2607373002
Comment 3 by xlai@chromium.org, Jan 3 2017
For records:

By running webgl and 2d cases on all four commit cases, we note that the current situation is that the resizing works properly for all the other cases (i.e. blurred image when resizing is applied) except the single case when 2d rendering context is accelerated with gpu compositing enabled, which happens to be the default case of 2d rendering context.
Project Member Comment 4 by bugdroid1@chromium.org, Jan 11 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7a66a4125991912014552fd1edbb58c37e9feede

commit 7a66a4125991912014552fd1edbb58c37e9feede
Author: xlai <xlai@chromium.org>
Date: Wed Jan 11 04:40:50 2017

Linear filter for texture object in 2d context

This is a temporary fix to enforce linear filter for texture object
in OffscreenCanvasRenderingContext2D in commit(). An ideal solution, which is
not urgent for OffscreenCanvas launch, is to adapt the filter to respect
image-rendering CSS property, as indicated in crbug.com/645590.

BUG= 676666 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2607373002
Cr-Commit-Position: refs/heads/master@{#442803}

[modify] https://crrev.com/7a66a4125991912014552fd1edbb58c37e9feede/content/test/gpu/gpu_tests/pixel_expectations.py
[modify] https://crrev.com/7a66a4125991912014552fd1edbb58c37e9feede/content/test/gpu/gpu_tests/pixel_test_pages.py
[modify] https://crrev.com/7a66a4125991912014552fd1edbb58c37e9feede/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp

Project Member Comment 5 by bugdroid1@chromium.org, Jan 12 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d310ed6a3cb42969b1353c81737325eef2f06c58

commit d310ed6a3cb42969b1353c81737325eef2f06c58
Author: xlai <xlai@chromium.org>
Date: Thu Jan 12 19:08:25 2017

Remove failed gpu pixel tests

The images generated on gpu reference archive are correctly showing blurry
edge on enlarged canvas.

TBR=zmo@chromium.org
BUG= 676666 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2625393002
Cr-Commit-Position: refs/heads/master@{#443314}

[modify] https://crrev.com/d310ed6a3cb42969b1353c81737325eef2f06c58/content/test/gpu/gpu_tests/pixel_expectations.py

Comment 6 by xlai@chromium.org, Jan 12 2017
Status: Fixed
Summary: Use Linear filter algorithm in texture object for OffscreenCanvas 2d (was: Use Nearest_Neighbor in texture object for OffscreenCanvas 2d)
This issue is fixed. The original title was wrong; we are using linear filter algorithm, not nearest-neighbor algorithm.
Sign in to add a comment