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

Issue 374193002: gpu: Optimize and cleanup code used for CHROMIUM_copy_texture. (Closed)

Created:
6 years, 5 months ago by dshwang
Modified:
6 years, 4 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

gpu: Optimize and cleanup code used for CHROMIUM_copy_texture. When source target and destination target is GL_TEXTURE_2D, we can use glCopyTexImage2D() directly. It avoids gl state changes, program binding and drawing call. |dest_target| of DoCopyTexture() is always GL_TEXTURE_2D, so remove the redundant argument. Perf data are as follows: Linux (Intel IvyBridge i7-3520M): 16 us vs 6 us -> 260% faster Android (Nexus 5): 331.8 us vs 252.7 us -> 31% faster BUG=N/A Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289160

Patch Set 1 #

Total comments: 6

Patch Set 2 : DoCopyTexture() branchs into fast path #

Total comments: 12

Patch Set 3 : Address reviewers commnets #

Total comments: 9

Patch Set 4 : Improve comments and DCHECK #

Total comments: 6

Patch Set 5 : Address nits #

Total comments: 2

Patch Set 6 : Fix window's webgl conformance test #

Total comments: 9

Patch Set 7 : Simplify format selecting logic and support GL_BGRA_EXT #

Total comments: 5

Patch Set 8 : remove redundant function and dcheck and tab #

Unified diffs Side-by-side diffs Delta from patch set Stats (+208 lines, -64 lines) Patch
M content/common/gpu/media/android_video_decode_accelerator.cc View 1 2 3 4 1 chunk +17 lines, -4 lines 0 comments Download
M gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt View 1 2 3 4 5 6 7 1 chunk +12 lines, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h View 1 2 3 4 5 2 chunks +20 lines, -8 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc View 1 2 3 4 5 6 7 7 chunks +124 lines, -38 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 6 7 3 chunks +35 lines, -13 lines 0 comments Download

Messages

Total messages: 45 (0 generated)
dshwang
could you review?
6 years, 5 months ago (2014-07-08 19:24:57 UTC) #1
no sievers
I'm not fully sure. Is it maybe better left to the client? There is something ...
6 years, 5 months ago (2014-07-08 22:59:13 UTC) #2
no sievers
On 2014/07/08 22:59:13, sievers wrote: > I'm not fully sure. Is it maybe better left ...
6 years, 5 months ago (2014-07-08 23:00:04 UTC) #3
dshwang
On 2014/07/08 23:00:04, sievers wrote: > On 2014/07/08 22:59:13, sievers wrote: > > I'm not ...
6 years, 5 months ago (2014-07-09 06:45:49 UTC) #4
no sievers
On 2014/07/09 06:45:49, dshwang wrote: > On 2014/07/08 23:00:04, sievers wrote: > > On 2014/07/08 ...
6 years, 5 months ago (2014-07-09 18:15:35 UTC) #5
reveman
https://codereview.chromium.org/374193002/diff/1/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://codereview.chromium.org/374193002/diff/1/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode278 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:278: GLsizei height) { Does this need to be limited ...
6 years, 5 months ago (2014-07-09 18:33:28 UTC) #6
dshwang
Thank you for review! https://codereview.chromium.org/374193002/diff/1/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://codereview.chromium.org/374193002/diff/1/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode278 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:278: GLsizei height) { Do you ...
6 years, 5 months ago (2014-07-09 18:53:12 UTC) #7
reveman
https://codereview.chromium.org/374193002/diff/1/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://codereview.chromium.org/374193002/diff/1/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode278 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:278: GLsizei height) { On 2014/07/09 18:53:12, dshwang wrote: > ...
6 years, 5 months ago (2014-07-09 19:45:08 UTC) #8
dshwang
Thank you for deep review. I addressed your comments. I measured performance on both desktop ...
6 years, 5 months ago (2014-07-10 15:19:46 UTC) #9
reveman
https://codereview.chromium.org/374193002/diff/20001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (left): https://codereview.chromium.org/374193002/diff/20001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#oldcode293 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:293: } On 2014/07/10 15:19:46, dshwang wrote: > Not really, ...
6 years, 5 months ago (2014-07-10 18:13:18 UTC) #10
dshwang
Thank you for review again. https://codereview.chromium.org/374193002/diff/40001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://codereview.chromium.org/374193002/diff/40001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode265 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:265: DCHECK(!buffer_id_ && !framebuffer_); Done. ...
6 years, 5 months ago (2014-07-10 19:45:35 UTC) #11
reveman
lgtm with nit https://codereview.chromium.org/374193002/diff/40001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h (right): https://codereview.chromium.org/374193002/diff/40001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h#newcode36 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h:36: bool unpremultiply_alpha); On 2014/07/10 19:45:34, dshwang ...
6 years, 5 months ago (2014-07-10 20:20:50 UTC) #12
no sievers
lgtm https://codereview.chromium.org/374193002/diff/60001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://codereview.chromium.org/374193002/diff/60001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode326 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:326: bool premultiply_alpha_change = premultiply_alpha ^ unpremultiply_alpha; != for ...
6 years, 5 months ago (2014-07-10 21:04:32 UTC) #13
dshwang
https://codereview.chromium.org/374193002/diff/60001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://codereview.chromium.org/374193002/diff/60001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode326 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:326: bool premultiply_alpha_change = premultiply_alpha ^ unpremultiply_alpha; On 2014/07/10 21:04:32, ...
6 years, 5 months ago (2014-07-10 22:00:19 UTC) #14
dshwang
Thank you for review. Could you check one more time, because I changed this CL ...
6 years, 5 months ago (2014-07-10 22:08:23 UTC) #15
reveman
still lgtm
6 years, 5 months ago (2014-07-10 23:46:32 UTC) #16
no sievers
https://codereview.chromium.org/374193002/diff/60001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://codereview.chromium.org/374193002/diff/60001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode326 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:326: bool premultiply_alpha_change = premultiply_alpha ^ unpremultiply_alpha; On 2014/07/10 22:00:19, ...
6 years, 5 months ago (2014-07-11 00:02:24 UTC) #17
reveman
https://codereview.chromium.org/374193002/diff/60001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://codereview.chromium.org/374193002/diff/60001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode326 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:326: bool premultiply_alpha_change = premultiply_alpha ^ unpremultiply_alpha; On 2014/07/11 00:02:23, ...
6 years, 5 months ago (2014-07-11 00:34:54 UTC) #18
no sievers
On 2014/07/11 00:34:54, reveman wrote: > https://codereview.chromium.org/374193002/diff/60001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc > File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): > > https://codereview.chromium.org/374193002/diff/60001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode326 > ...
6 years, 5 months ago (2014-07-11 00:36:04 UTC) #19
dshwang
Thank you all for great review!
6 years, 5 months ago (2014-07-11 10:06:00 UTC) #20
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 5 months ago (2014-07-11 10:06:04 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/374193002/80001
6 years, 5 months ago (2014-07-11 10:06:39 UTC) #22
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-11 11:27:54 UTC) #23
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-11 12:15:47 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/27215)
6 years, 5 months ago (2014-07-11 12:15:48 UTC) #25
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 5 months ago (2014-07-11 15:03:49 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/374193002/80001
6 years, 5 months ago (2014-07-11 15:04:25 UTC) #27
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 5 months ago (2014-07-11 15:54:28 UTC) #28
dshwang
On 2014/07/11 15:54:28, I haz the power (commit-bot) wrote: > FYI, CQ is re-trying this ...
6 years, 5 months ago (2014-07-11 16:46:09 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-11 16:51:27 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/27284)
6 years, 5 months ago (2014-07-11 16:51:28 UTC) #31
dshwang
Hi, sorry for delay to re-upload. It took time to get windows machine. Fortunately, win ...
6 years, 4 months ago (2014-08-11 14:08:12 UTC) #32
reveman
https://codereview.chromium.org/374193002/diff/100001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt File gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt (right): https://codereview.chromium.org/374193002/diff/100001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt#newcode50 gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt:50: specified by <internal_format>. Must be one of the following ...
6 years, 4 months ago (2014-08-11 18:37:21 UTC) #33
dshwang
Thank you for quick review. win and mac bot failed because source texture format can ...
6 years, 4 months ago (2014-08-11 19:48:08 UTC) #34
reveman
lgtm with a nit and some optional adjustments https://codereview.chromium.org/374193002/diff/120001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt File gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt (right): https://codereview.chromium.org/374193002/diff/120001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt#newcode61 gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt:61: GL_RGBA ...
6 years, 4 months ago (2014-08-11 20:48:46 UTC) #35
dshwang
On 2014/08/11 20:48:46, reveman wrote: > lgtm with a nit and some optional adjustments Thank ...
6 years, 4 months ago (2014-08-12 07:03:01 UTC) #36
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 4 months ago (2014-08-12 07:03:15 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/374193002/140001
6 years, 4 months ago (2014-08-12 07:04:02 UTC) #38
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium.win ...
6 years, 4 months ago (2014-08-12 10:32:06 UTC) #39
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-12 12:33:31 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel/builds/5836)
6 years, 4 months ago (2014-08-12 12:33:32 UTC) #41
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 4 months ago (2014-08-12 12:45:42 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/374193002/140001
6 years, 4 months ago (2014-08-12 12:47:16 UTC) #43
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_x64_rel on tryserver.chromium.win ...
6 years, 4 months ago (2014-08-12 14:43:13 UTC) #44
commit-bot: I haz the power
6 years, 4 months ago (2014-08-13 02:52:10 UTC) #45
Message was sent while issue was closed.
Change committed as 289160

Powered by Google App Engine
This is Rietveld 408576698