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

Issue 2165913003: Invalidate m_image after GPU-GPU texture copy (Closed)

Created:
4 years, 5 months ago by xidachen
Modified:
4 years, 5 months ago
CC:
chromium-reviews, krit, pdr+graphicswatchlist_chromium.org, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, dshwang, jbroman, Rik, f(malita), blink-reviews, Stephen Chennney, ajuma+watch_chromium.org, danakj+watch_chromium.org, rwlbuis, Ken Russell (switch to Gerrit)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Invalidate m_image after GPU-GPU texture copy The image_bitmap_from_canvas conformance1 tests are failing with WebGL 2.0. It fails in this case: Call texImage2D(ImageBitmap), which does GPU-GPU texture copy. Then call texSubImage2D(ImageBitmap), which does GPU readback. In the call to texSubImage2D, there is a error says glTexSubImage2D: invalid internalformat/format/type combination, which doesn't make sense. The solution here is to set m_image to be null after GPU-GPU texture copy. So next time when m_image is needed, it has to use a new context provider to consume the mailbox to get a new m_image. To make sure this CL does the right thing, I have tested the following: conformance1 tests with WebGL 1.0 and 2.0 (with GPU accelerated canvas) conformance2 tests (with GPU accelerated canvas, WebGL 2.0 only) layout tests: fast/canvas/, virtual/gpu/fast/canvas, virtual/display_list_2d_canvas/fast/canvas. All the above tests pass. When committing this CL, we should add the optional GPU bots to make sure they are green. BUG=628954 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 Committed: https://crrev.com/f5c988930b7a2f2aacd7cabf2573caeed2770b69 Cr-Commit-Position: refs/heads/master@{#406660}

Patch Set 1 #

Total comments: 4

Patch Set 2 : address comments #

Patch Set 3 : update WebGL2 expectation #

Patch Set 4 : 3 formats still fails on windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -18 lines) Patch
M content/test/gpu/gpu_tests/webgl2_conformance_expectations.py View 1 2 3 1 chunk +3 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp View 1 4 chunks +5 lines, -7 lines 0 comments Download

Messages

Total messages: 27 (14 generated)
xidachen
PTAL
4 years, 5 months ago (2016-07-20 14:36:58 UTC) #4
Justin Novosad
https://codereview.chromium.org/2165913003/diff/1/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp File third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp (right): https://codereview.chromium.org/2165913003/diff/1/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp#newcode116 third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp:116: m_image = nullptr; I think a better place for ...
4 years, 5 months ago (2016-07-20 15:07:53 UTC) #5
xidachen
https://codereview.chromium.org/2165913003/diff/1/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp File third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp (right): https://codereview.chromium.org/2165913003/diff/1/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp#newcode116 third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp:116: m_image = nullptr; On 2016/07/20 15:07:52, Justin Novosad wrote: ...
4 years, 5 months ago (2016-07-20 15:28:24 UTC) #6
Justin Novosad
https://codereview.chromium.org/2165913003/diff/1/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp File third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp (right): https://codereview.chromium.org/2165913003/diff/1/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp#newcode116 third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp:116: m_image = nullptr; Sorry. Here you need to call ...
4 years, 5 months ago (2016-07-20 15:51:59 UTC) #7
xidachen
https://codereview.chromium.org/2165913003/diff/1/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp File third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp (right): https://codereview.chromium.org/2165913003/diff/1/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp#newcode116 third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp:116: m_image = nullptr; On 2016/07/20 15:51:59, Justin Novosad wrote: ...
4 years, 5 months ago (2016-07-20 16:47:28 UTC) #8
Justin Novosad
lgtm
4 years, 5 months ago (2016-07-20 16:59:14 UTC) #9
Zhenyao Mo
Thank you! Can you also remove the related test expectations in content/test/gpu/gpu_tests/webgl2_conformance_expectations.py?
4 years, 5 months ago (2016-07-20 17:02:58 UTC) #12
xidachen
zmo@, kbr@: could you also LGTM now that I have changed the webgl2_expectation file? Mac ...
4 years, 5 months ago (2016-07-20 18:35:26 UTC) #16
Zhenyao Mo
On 2016/07/20 18:35:26, xidachen wrote: > zmo@, kbr@: could you also LGTM now that I ...
4 years, 5 months ago (2016-07-20 19:02:29 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2165913003/60001
4 years, 5 months ago (2016-07-20 20:32:46 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-07-20 20:49:00 UTC) #24
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/f5c988930b7a2f2aacd7cabf2573caeed2770b69 Cr-Commit-Position: refs/heads/master@{#406660}
4 years, 5 months ago (2016-07-20 20:51:40 UTC) #26
Ken Russell (switch to Gerrit)
4 years, 5 months ago (2016-07-21 00:05:51 UTC) #27
Message was sent while issue was closed.
LGTM after the fact. Sorry for the delay reviewing.

Powered by Google App Engine
This is Rietveld 408576698