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

Issue 1315323006: webgl: optimize webgl.texSubImage2D(video) path. (Closed)

Created:
5 years, 3 months ago by dshwang
Modified:
5 years, 1 month ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, avayvod+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, wjia+watch_chromium.org, mlamouri+watch-media_chromium.org, oetuaho-nv
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

webgl: optimize webgl.texSubImage2D(video) path. Currently, texSubImage2D(video) requires glReadPixels to copy video texture to target texture. This CL makes infra structure to copy video texture to target texture directly. Blink will turn on the direct path. In addition, it will reduce WebGL video test flakiness significantly. TEST=video texture test on webgl_conformance ./content/test/gpu/run_gpu_test.py webgl_conformance --browser=release --story-filter=WebglConformance.conformance_textures_video_tex_image_and_sub_image_2d_with_video BUG=349871, 504773 Committed: https://crrev.com/01542ac6d0fbec6aa78e33e6c7ec49a582072ea9 Cr-Commit-Position: refs/heads/master@{#356390}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Merge Blink change to here. Unify full copy and sub copy path using struct. #

Total comments: 1

Patch Set 3 : Fix invalid ASSERT #

Patch Set 4 : fix canvas2d-webgl failures #

Total comments: 7

Patch Set 5 : don't use c++11 initialize-list #

Total comments: 2

Patch Set 6 : use function-local typedef for readability #

Patch Set 7 : Fix unnecessay slow-down of YUV path #

Total comments: 3

Patch Set 8 : share code in texImage2D and texSubImage2D. fix win build failure #

Total comments: 2

Patch Set 9 : remove redundant "CopyVideoTextureParams() = delete". rebase to ToT #

Patch Set 10 : rebase to ToT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+259 lines, -99 lines) Patch
M content/renderer/media/android/webmediaplayer_android.h View 1 2 3 4 5 1 chunk +1 line, -5 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.cc View 1 2 3 4 5 6 7 8 9 3 chunks +21 lines, -10 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -5 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.cc View 1 2 3 4 5 2 chunks +13 lines, -7 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -5 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 5 2 chunks +13 lines, -7 lines 0 comments Download
M media/renderers/skcanvas_video_renderer.h View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -5 lines 0 comments Download
M media/renderers/skcanvas_video_renderer.cc View 1 2 3 4 5 6 7 8 4 chunks +42 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLVideoElement.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLVideoElement.cpp View 1 2 1 chunk +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +58 lines, -25 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.h View 1 2 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp View 1 2 chunks +26 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp View 1 1 chunk +17 lines, -2 lines 0 comments Download
M third_party/WebKit/public/platform/WebMediaPlayer.h View 1 2 3 4 5 6 7 8 1 chunk +25 lines, -10 lines 0 comments Download

Messages

Total messages: 52 (17 generated)
dshwang
piman, could you review content/? dalecurtis, could you review media/?
5 years, 3 months ago (2015-09-04 09:12:53 UTC) #2
dshwang
On 2015/09/04 09:12:53, dshwang_ooo_5.9-27.9 wrote: > piman, could you review content/? > dalecurtis, could you ...
5 years, 3 months ago (2015-09-04 11:05:54 UTC) #3
DaleCurtis
Haven't looked closely at the other CL yet, but this seems to add a ton ...
5 years, 3 months ago (2015-09-04 17:08:58 UTC) #4
piman
RS LGTM for content, modulo Dale's review. Agreed that there seems to be a fair ...
5 years, 3 months ago (2015-09-04 17:34:29 UTC) #5
dshwang
I come back from vacation. Thanks for reviewing. About duplication, we can have one unified ...
5 years, 2 months ago (2015-09-28 11:14:19 UTC) #6
DaleCurtis
Without looking too closely, struct sgtm, we use that pattern elsewhere in WMPI (see WebMediaPlayerParams)
5 years, 2 months ago (2015-09-28 20:16:07 UTC) #7
Ken Russell (switch to Gerrit)
On 2015/09/28 20:16:07, DaleCurtis wrote: > Without looking too closely, struct sgtm, we use that ...
5 years, 2 months ago (2015-09-28 22:34:42 UTC) #8
Ken Russell (switch to Gerrit)
Also: now that Blink has been rolled into Chromium, this CL can be combined with ...
5 years, 2 months ago (2015-10-01 05:08:04 UTC) #9
Ken Russell (switch to Gerrit)
+Olli as FYI
5 years, 2 months ago (2015-10-01 05:08:27 UTC) #10
oetuaho-nv
Really nice to see this change! A few comments inline. https://codereview.chromium.org/1315323006/diff/1/content/renderer/media/android/webmediaplayer_android.h File content/renderer/media/android/webmediaplayer_android.h (right): https://codereview.chromium.org/1315323006/diff/1/content/renderer/media/android/webmediaplayer_android.h#newcode157 ...
5 years, 2 months ago (2015-10-01 07:46:21 UTC) #12
dshwang
I'm sorry for taking so long to get to this too. I had long vacation ...
5 years, 2 months ago (2015-10-21 16:12:16 UTC) #13
DaleCurtis
media/ lgtm % removal of potential of c++11 feature. https://codereview.chromium.org/1315323006/diff/60001/content/renderer/media/android/webmediaplayer_android.cc File content/renderer/media/android/webmediaplayer_android.cc (right): https://codereview.chromium.org/1315323006/diff/60001/content/renderer/media/android/webmediaplayer_android.cc#newcode639 content/renderer/media/android/webmediaplayer_android.cc:639: ...
5 years, 2 months ago (2015-10-21 18:35:50 UTC) #14
dshwang
Thank you for reviewing! https://codereview.chromium.org/1315323006/diff/60001/content/renderer/media/android/webmediaplayer_android.cc File content/renderer/media/android/webmediaplayer_android.cc (right): https://codereview.chromium.org/1315323006/diff/60001/content/renderer/media/android/webmediaplayer_android.cc#newcode639 content/renderer/media/android/webmediaplayer_android.cc:639: {CopyVideoTextureParams::FullCopy, GL_TEXTURE_2D, textureId, GL_RGBA, On ...
5 years, 2 months ago (2015-10-21 19:31:07 UTC) #15
DaleCurtis
https://codereview.chromium.org/1315323006/diff/60001/content/renderer/media/android/webmediaplayer_android.cc File content/renderer/media/android/webmediaplayer_android.cc (right): https://codereview.chromium.org/1315323006/diff/60001/content/renderer/media/android/webmediaplayer_android.cc#newcode639 content/renderer/media/android/webmediaplayer_android.cc:639: {CopyVideoTextureParams::FullCopy, GL_TEXTURE_2D, textureId, GL_RGBA, On 2015/10/21 19:31:07, dshwang wrote: ...
5 years, 2 months ago (2015-10-22 00:35:28 UTC) #16
dshwang
kbr, could you review third_party/WebKit? piman, could you conform again content/? https://codereview.chromium.org/1315323006/diff/60001/content/renderer/media/android/webmediaplayer_android.cc File content/renderer/media/android/webmediaplayer_android.cc (right): ...
5 years, 2 months ago (2015-10-22 13:23:03 UTC) #17
piman
lgtm https://codereview.chromium.org/1315323006/diff/80001/content/renderer/media/webmediaplayer_ms.cc File content/renderer/media/webmediaplayer_ms.cc (right): https://codereview.chromium.org/1315323006/diff/80001/content/renderer/media/webmediaplayer_ms.cc#newcode373 content/renderer/media/webmediaplayer_ms.cc:373: media::SkCanvasVideoRenderer::CopyFrameSingleTextureParams( nit: you may help readability with a ...
5 years, 2 months ago (2015-10-22 21:30:23 UTC) #18
dshwang
kbr, could you review third_party/WebKit? https://codereview.chromium.org/1315323006/diff/80001/content/renderer/media/webmediaplayer_ms.cc File content/renderer/media/webmediaplayer_ms.cc (right): https://codereview.chromium.org/1315323006/diff/80001/content/renderer/media/webmediaplayer_ms.cc#newcode373 content/renderer/media/webmediaplayer_ms.cc:373: media::SkCanvasVideoRenderer::CopyFrameSingleTextureParams( On 2015/10/22 21:30:23, ...
5 years, 2 months ago (2015-10-23 11:09:27 UTC) #20
Ken Russell (switch to Gerrit)
Thanks for this contribution. LGTM https://codereview.chromium.org/1315323006/diff/140001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1315323006/diff/140001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode4710 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp:4710: if (Extensions3DUtil::canUseCopyTextureCHROMIUM(target, GL_RGBA, type, ...
5 years, 2 months ago (2015-10-25 01:08:40 UTC) #21
dshwang
dpranke@, could you review WebKit/public? kbr reviewed WebKit part already. https://codereview.chromium.org/1315323006/diff/140001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1315323006/diff/140001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode4710 ...
5 years, 1 month ago (2015-10-26 14:17:32 UTC) #23
dshwang
dpranke@, could you review WebKit/public? kbr reviewed WebKit part already. https://codereview.chromium.org/1315323006/diff/140001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1315323006/diff/140001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode4710 ...
5 years, 1 month ago (2015-10-26 17:45:15 UTC) #24
Dirk Pranke
On 2015/10/26 17:45:15, dshwang wrote: > dpranke@, could you review WebKit/public? kbr reviewed WebKit part ...
5 years, 1 month ago (2015-10-26 18:51:12 UTC) #26
dshwang
On 2015/10/26 18:51:12, Dirk Pranke wrote: > On 2015/10/26 17:45:15, dshwang wrote: > > dpranke@, ...
5 years, 1 month ago (2015-10-26 19:12:21 UTC) #27
philipj_slow
third_party/WebKit/public/platform/WebMediaPlayer.h LGTM https://codereview.chromium.org/1315323006/diff/160001/third_party/WebKit/public/platform/WebMediaPlayer.h File third_party/WebKit/public/platform/WebMediaPlayer.h (right): https://codereview.chromium.org/1315323006/diff/160001/third_party/WebKit/public/platform/WebMediaPlayer.h#newcode173 third_party/WebKit/public/platform/WebMediaPlayer.h:173: CopyVideoTextureParams() = delete; Is this actually needed, ...
5 years, 1 month ago (2015-10-27 16:02:17 UTC) #28
dshwang
thank you for reviewing! https://codereview.chromium.org/1315323006/diff/160001/third_party/WebKit/public/platform/WebMediaPlayer.h File third_party/WebKit/public/platform/WebMediaPlayer.h (right): https://codereview.chromium.org/1315323006/diff/160001/third_party/WebKit/public/platform/WebMediaPlayer.h#newcode173 third_party/WebKit/public/platform/WebMediaPlayer.h:173: CopyVideoTextureParams() = delete; On 2015/10/27 ...
5 years, 1 month ago (2015-10-27 16:18:01 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1315323006/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1315323006/180001
5 years, 1 month ago (2015-10-27 16:18:19 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/86442) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 1 month ago (2015-10-27 16:19:33 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1315323006/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1315323006/220001
5 years, 1 month ago (2015-10-27 16:46:38 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/86455) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 1 month ago (2015-10-27 16:47:24 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1315323006/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1315323006/240001
5 years, 1 month ago (2015-10-27 17:03:49 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/131856)
5 years, 1 month ago (2015-10-27 17:52:55 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1315323006/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1315323006/240001
5 years, 1 month ago (2015-10-27 19:35:22 UTC) #48
commit-bot: I haz the power
Committed patchset #10 (id:240001)
5 years, 1 month ago (2015-10-27 20:43:50 UTC) #49
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/01542ac6d0fbec6aa78e33e6c7ec49a582072ea9 Cr-Commit-Position: refs/heads/master@{#356390}
5 years, 1 month ago (2015-10-27 20:45:11 UTC) #50
dcaiafa
A revert of this CL (patchset #10 id:240001) has been created in https://codereview.chromium.org/1418513016/ by dcaiafa@chromium.org. ...
5 years, 1 month ago (2015-10-27 22:27:06 UTC) #51
dshwang
5 years, 1 month ago (2015-10-28 14:49:35 UTC) #52
Message was sent while issue was closed.
On 2015/10/27 22:27:06, dcaiafa wrote:
> A revert of this CL (patchset #10 id:240001) has been created in
> https://codereview.chromium.org/1418513016/ by mailto:dcaiafa@chromium.org.
> 
> The reason for reverting is: Reverting to address webgl_conformance_tests
break
> in:
> 
>
https://build.chromium.org/p/chromium.gpu/builders/Android%20Debug%20%28Nexus....

Thank you for reverting, and sorry for careless landing.

I reproduce it on my Nexus 5. My chromebook is fine with this patch. So android
code should have bug. Let me fix and re-land.

Powered by Google App Engine
This is Rietveld 408576698