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

Issue 2791813003: Fix broken draw/upload paths from videos to 2D canvas and WebGL. (Closed)

Created:
3 years, 8 months ago by Ken Russell (switch to Gerrit)
Modified:
3 years, 8 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, Justin Novosad, Kai Ninomiya, piman+watch_chromium.org, posciak+watch_chromium.org, qiankun, Zhenyao Mo
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix broken draw/upload paths from videos to 2D canvas and WebGL. The fix for Issue 672895 made these video rendering and upload paths fragile if the video's metadata caused the natural size to differ in certain ways from the coded size. Make the code robust to this case by reverting to CopyTextureCHROMIUM in most cases, and allocating the texture to the correct sizes in others. Tested with new WebGL conformance test to be incorporated in a forthcoming roll: https://github.com/KhronosGroup/WebGL/pull/2359 . BUG=701060 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;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/2791813003 Cr-Original-Commit-Position: refs/heads/master@{#463925} Committed: https://chromium.googlesource.com/chromium/src/+/0cc4c62a163318c06636916b7e2b2c6a56f16b74 Review-Url: https://codereview.chromium.org/2791813003 Cr-Commit-Position: refs/heads/master@{#464253} Committed: https://chromium.googlesource.com/chromium/src/+/0986e62026891425cb209b61092d091d44ec8812

Patch Set 1 #

Patch Set 2 : Removed debug logging. #

Patch Set 3 : Rebased. #

Total comments: 4

Patch Set 4 : Redo fix, undoing some of crbug.com/672895. #

Patch Set 5 : Fixed bug in error checking code. #

Total comments: 6

Patch Set 6 : Start running corner case video tests. #

Patch Set 7 : Fix per review feedback from sandersd@. #

Total comments: 10

Patch Set 8 : Fixed compile. #

Patch Set 9 : Rebased and re-added suppression for Windows NVIDIA. #

Patch Set 10 : Pass format as well as internalformat to WebMediaPlayer for correctness. #

Patch Set 11 : Disable GPU-GPU copies for GL_RED destination textures. #

Patch Set 12 : Remove failure expectations on Win/NVIDIA. #

Patch Set 13 : Disallow GPU-GPU copies for GL_RED_INTEGER format textures too. #

Patch Set 14 : Disable GPU-GPU copies to floating-point textures on Android. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -65 lines) Patch
M content/renderer/media/webmediaplayer_ms.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -1 line 0 comments Download
M content/test/gpu/gpu_tests/webgl2_conformance_expectations.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -4 lines 0 comments Download
M content/test/gpu/gpu_tests/webgl_conformance_expectations.py View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -4 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -1 line 0 comments Download
M media/renderers/skcanvas_video_renderer.h View 1 2 3 4 5 6 7 8 9 2 chunks +15 lines, -6 lines 0 comments Download
M media/renderers/skcanvas_video_renderer.cc View 1 2 3 4 5 6 7 8 9 7 chunks +85 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLVideoElement.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLVideoElement.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +33 lines, -16 lines 0 comments Download
M third_party/WebKit/public/platform/WebMediaPlayer.h View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -6 lines 0 comments Download

Messages

Total messages: 80 (41 generated)
Ken Russell (switch to Gerrit)
dalecurtis or sandersd: please review. Thanks. Note I'm not sure this fix is correct in ...
3 years, 8 months ago (2017-04-01 04:32:24 UTC) #4
DaleCurtis
VideoResourceUpdater just always uses the coded size and GpuMemoryBufferVideoFramePool uses the slice of coded_size defined ...
3 years, 8 months ago (2017-04-03 18:40:21 UTC) #9
sandersd (OOO until July 31)
https://codereview.chromium.org/2791813003/diff/40001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/40001/media/renderers/skcanvas_video_renderer.cc#newcode172 media/renderers/skcanvas_video_renderer.cc:172: // incorrect. This wording is misleading; it implies that ...
3 years, 8 months ago (2017-04-03 18:56:21 UTC) #10
Ken Russell (switch to Gerrit)
On 2017/04/03 18:40:21, DaleCurtis wrote: > VideoResourceUpdater just always uses the coded size and > ...
3 years, 8 months ago (2017-04-03 20:36:26 UTC) #11
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/2791813003/diff/40001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/40001/media/renderers/skcanvas_video_renderer.cc#newcode172 media/renderers/skcanvas_video_renderer.cc:172: // incorrect. On 2017/04/03 18:56:21, sandersd wrote: > This ...
3 years, 8 months ago (2017-04-03 20:43:32 UTC) #12
sandersd (OOO until July 31)
https://codereview.chromium.org/2791813003/diff/40001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/40001/media/renderers/skcanvas_video_renderer.cc#newcode172 media/renderers/skcanvas_video_renderer.cc:172: // incorrect. > I'll restructure this fix so that ...
3 years, 8 months ago (2017-04-03 21:19:10 UTC) #13
Ken Russell (switch to Gerrit)
dalecurtis, sandersd: please take another look. zmo, kainino, qiankun.miao: FYI. Note: working on rolling in ...
3 years, 8 months ago (2017-04-07 07:03:29 UTC) #15
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/2791813003/diff/40001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/40001/media/renderers/skcanvas_video_renderer.cc#newcode172 media/renderers/skcanvas_video_renderer.cc:172: // incorrect. On 2017/04/03 21:19:10, sandersd wrote: > > ...
3 years, 8 months ago (2017-04-07 07:16:00 UTC) #18
sandersd (OOO until July 31)
One quick comment, I have not reviewed anything else. https://codereview.chromium.org/2791813003/diff/80001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/80001/media/renderers/skcanvas_video_renderer.cc#newcode173 media/renderers/skcanvas_video_renderer.cc:173: ...
3 years, 8 months ago (2017-04-07 19:07:13 UTC) #23
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/2791813003/diff/80001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/80001/media/renderers/skcanvas_video_renderer.cc#newcode173 media/renderers/skcanvas_video_renderer.cc:173: return video_frame->natural_size() != video_frame->coded_size(); On 2017/04/07 19:07:13, sandersd wrote: ...
3 years, 8 months ago (2017-04-07 19:27:23 UTC) #24
sandersd (OOO until July 31)
https://codereview.chromium.org/2791813003/diff/80001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/80001/media/renderers/skcanvas_video_renderer.cc#newcode173 media/renderers/skcanvas_video_renderer.cc:173: return video_frame->natural_size() != video_frame->coded_size(); On 2017/04/07 19:27:23, Ken Russell ...
3 years, 8 months ago (2017-04-07 20:58:06 UTC) #25
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/2791813003/diff/80001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/80001/media/renderers/skcanvas_video_renderer.cc#newcode173 media/renderers/skcanvas_video_renderer.cc:173: return video_frame->natural_size() != video_frame->coded_size(); On 2017/04/07 20:58:06, sandersd wrote: ...
3 years, 8 months ago (2017-04-07 21:15:27 UTC) #26
sandersd (OOO until July 31)
https://codereview.chromium.org/2791813003/diff/80001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/80001/media/renderers/skcanvas_video_renderer.cc#newcode173 media/renderers/skcanvas_video_renderer.cc:173: return video_frame->natural_size() != video_frame->coded_size(); > Can the coded size ...
3 years, 8 months ago (2017-04-07 21:41:58 UTC) #29
Ken Russell (switch to Gerrit)
sandersd@: please take another look. dglazkov@ or esprehn@: OWNERS review of WebMediaPlayer.h please. https://codereview.chromium.org/2791813003/diff/80001/media/renderers/skcanvas_video_renderer.cc File ...
3 years, 8 months ago (2017-04-07 23:22:09 UTC) #31
sandersd (OOO until July 31)
lgtm % nits. https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc#newcode174 media/renderers/skcanvas_video_renderer.cc:174: return video_frame->visible_rect().size() != video_frame->coded_size(); Might be ...
3 years, 8 months ago (2017-04-07 23:40:59 UTC) #34
dglazkov
lgtm
3 years, 8 months ago (2017-04-07 23:42:57 UTC) #35
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc#newcode174 media/renderers/skcanvas_video_renderer.cc:174: return video_frame->visible_rect().size() != video_frame->coded_size(); On 2017/04/07 23:40:59, sandersd wrote: ...
3 years, 8 months ago (2017-04-07 23:48:18 UTC) #36
sandersd (OOO until July 31)
https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc#newcode174 media/renderers/skcanvas_video_renderer.cc:174: return video_frame->visible_rect().size() != video_frame->coded_size(); On 2017/04/07 23:48:18, Ken Russell ...
3 years, 8 months ago (2017-04-07 23:51:53 UTC) #37
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc#newcode174 media/renderers/skcanvas_video_renderer.cc:174: return video_frame->visible_rect().size() != video_frame->coded_size(); On 2017/04/07 23:51:53, sandersd wrote: ...
3 years, 8 months ago (2017-04-07 23:54:52 UTC) #38
sandersd (OOO until July 31)
https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc#newcode174 media/renderers/skcanvas_video_renderer.cc:174: return video_frame->visible_rect().size() != video_frame->coded_size(); On 2017/04/07 23:54:51, Ken Russell ...
3 years, 8 months ago (2017-04-08 00:01:25 UTC) #39
sandersd (OOO until July 31)
https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc#newcode174 media/renderers/skcanvas_video_renderer.cc:174: return video_frame->visible_rect().size() != video_frame->coded_size(); On 2017/04/08 00:01:25, sandersd wrote: ...
3 years, 8 months ago (2017-04-08 00:05:05 UTC) #40
sandersd (OOO until July 31)
https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc File media/renderers/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/2791813003/diff/120001/media/renderers/skcanvas_video_renderer.cc#newcode174 media/renderers/skcanvas_video_renderer.cc:174: return video_frame->visible_rect().size() != video_frame->coded_size(); On 2017/04/08 00:05:04, sandersd wrote: ...
3 years, 8 months ago (2017-04-08 00:07:15 UTC) #41
DaleCurtis
+liberato who might know of a device where a transform matrix is needed or have ...
3 years, 8 months ago (2017-04-10 19:37:10 UTC) #46
liberato (no reviews please)
On 2017/04/10 19:37:10, DaleCurtis wrote: > +liberato who might know of a device where a ...
3 years, 8 months ago (2017-04-10 19:58:42 UTC) #48
Ken Russell (switch to Gerrit)
All: thanks for your reviews. This CL gets the associated code back into a working ...
3 years, 8 months ago (2017-04-11 02:49:37 UTC) #49
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/2791813003/150001
3 years, 8 months ago (2017-04-11 02:50:43 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: mac_optional_gpu_tests_rel on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_optional_gpu_tests_rel/builds/8877)
3 years, 8 months ago (2017-04-11 03:41:48 UTC) #54
DaleCurtis
lgtm
3 years, 8 months ago (2017-04-11 18:19:49 UTC) #55
Ken Russell (switch to Gerrit)
Test failures should now be addressed. CQ'ing again.
3 years, 8 months ago (2017-04-12 00:23:01 UTC) #56
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/2791813003/210001
3 years, 8 months ago (2017-04-12 00:23:57 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: mac_optional_gpu_tests_rel on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_optional_gpu_tests_rel/builds/8930)
3 years, 8 months ago (2017-04-12 01:23:12 UTC) #61
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/2791813003/230001
3 years, 8 months ago (2017-04-12 02:26:23 UTC) #64
commit-bot: I haz the power
Committed patchset #13 (id:230001) as https://chromium.googlesource.com/chromium/src/+/0cc4c62a163318c06636916b7e2b2c6a56f16b74
3 years, 8 months ago (2017-04-12 03:59:23 UTC) #67
Ken Russell (switch to Gerrit)
A revert of this CL (patchset #13 id:230001) has been created in https://codereview.chromium.org/2818493002/ by kbr@chromium.org. ...
3 years, 8 months ago (2017-04-12 16:22:13 UTC) #68
Ken Russell (switch to Gerrit)
All: apologies for re-landing this under the same CL -- I usually avoid doing this ...
3 years, 8 months ago (2017-04-13 00:12:46 UTC) #69
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/2791813003/250001
3 years, 8 months ago (2017-04-13 00:14:21 UTC) #73
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/404235)
3 years, 8 months ago (2017-04-13 01:22:36 UTC) #75
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/2791813003/250001
3 years, 8 months ago (2017-04-13 01:42:25 UTC) #77
commit-bot: I haz the power
3 years, 8 months ago (2017-04-13 02:35:57 UTC) #80
Message was sent while issue was closed.
Committed patchset #14 (id:250001) as
https://chromium.googlesource.com/chromium/src/+/0986e62026891425cb209b61092d...

Powered by Google App Engine
This is Rietveld 408576698