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
Review-Url: https://codereview.chromium.org/2165913003
Cr-Commit-Position: refs/heads/master@{#406660}
3 files changed