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

Issue 9968113: Addition of GL_CHROMIUM_copy_texture extension. (Closed)

Created:
8 years, 8 months ago by Jeff Timanus
Modified:
8 years, 8 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip+watch_chromium.org, apatrick_chromium
Visibility:
Public.

Description

Introduction of CHROMIUM_copy_texture extension that respects pixel-store semantics, and allows copying of BGRA textures. OpenGL ES does not natively allow for copying textures with a BGRA format. The EXT_texture_format_BGRA8888 extension does not specify support for glCopyTexImage calls on these textures. This extension provides a routine to perform texture copies to/from BGRA-backed textures that also respects the following CHROMIUM pixel storage modifiers: UNPACK_FLIP_Y_CHROMIUM UNPACK_PREMULTIPLY_ALPHA_CHROMIUM This extension will be useful for the following purposes: - Copying accelerated Canvas2D contents to WebGL textures without a software readback. (And potentially the same for video-webgl texture copies.) - Copying Canvas2D contents to the compositor backing store. BUG=101051 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=132934 Reverted: https://chromiumcodereview.appspot.com/10078006

Patch Set 1 #

Patch Set 2 : Adding extension implementation files. #

Total comments: 14

Patch Set 3 : #

Total comments: 10

Patch Set 4 : Addressing comments. #

Patch Set 5 : Correcting tear-down wrt state of the decoder context. #

Patch Set 6 : Updating and correcting GLES2ImplementationTest.SubImageUnpack #

Patch Set 7 : Re-include gles2_cmd_copy_texture_chromium.* #

Patch Set 8 : Lint error cleanup. #

Patch Set 9 : More lint error cleanup. #

Total comments: 10

Patch Set 10 : Addressing review comments. #

Patch Set 11 : Correcting glEnableVertexAttribArray state. #

Total comments: 16

Patch Set 12 : Addressing review comments. #

Patch Set 13 : Correct RestoreStateForAttrib. #

Patch Set 14 : Remove unnecessary white-space. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+987 lines, -42 lines) Patch
A gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt View 1 2 6 7 8 9 1 chunk +66 lines, -0 lines 0 comments Download
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_c_lib_autogen.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_cmd_helper_autogen.h View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_implementation_autogen.h View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest.cc View 1 2 3 4 5 6 7 8 9 11 chunks +13 lines, -5 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest_autogen.h View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -0 lines 0 comments Download
M gpu/command_buffer/cmd_buffer_functions.txt View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_autogen.h View 1 2 3 4 5 6 7 8 9 1 chunk +48 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_test_autogen.h View 1 2 3 4 5 6 7 8 9 1 chunk +19 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_ids_autogen.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -3 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/feature_info.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/gl_utils.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h View 1 2 3 4 5 6 7 8 9 1 chunk +41 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +250 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 22 chunks +168 lines, -8 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_autogen.h View 1 2 3 4 5 6 7 8 9 2 chunks +11 lines, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc View 1 2 3 4 5 6 7 8 9 15 chunks +56 lines, -15 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h View 1 2 3 4 5 6 7 8 9 5 chunks +25 lines, -4 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 chunks +206 lines, -5 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/command_buffer_service.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/khronos/GLES2/gl2ext.h View 1 2 3 4 5 6 7 8 9 1 chunk +18 lines, -0 lines 0 comments Download
M third_party/khronos/README.chromium View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
Jeff Timanus
Hi Gregg & Al, Can you guys please take a look at this? It is ...
8 years, 8 months ago (2012-04-04 15:58:32 UTC) #1
apatrick_chromium
I haven't looked at this in detail yet but, for the purpose of copying a ...
8 years, 8 months ago (2012-04-04 19:40:14 UTC) #2
greggman
unit tests? https://chromiumcodereview.appspot.com/9968113/diff/7001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://chromiumcodereview.appspot.com/9968113/diff/7001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode7 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:7: //#include "gpu/command_buffer/common/gles2_cmd_format.h" remove? https://chromiumcodereview.appspot.com/9968113/diff/7001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode169 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:169: for (int ...
8 years, 8 months ago (2012-04-04 20:12:24 UTC) #3
Jeff Timanus
On 2012/04/04 19:40:14, apatrick_chromium wrote: > I haven't looked at this in detail yet but, ...
8 years, 8 months ago (2012-04-04 20:21:10 UTC) #4
apatrick_chromium
Scissor rectangle as well off the top of my head. Have you seen this extension? ...
8 years, 8 months ago (2012-04-04 20:33:29 UTC) #5
Jeff Timanus
On 2012/04/04 20:33:29, apatrick_chromium wrote: > Scissor rectangle as well off the top of my ...
8 years, 8 months ago (2012-04-04 21:43:57 UTC) #6
Jeff Timanus
I've addressed most of the comments. I'm adding a new unit test that will ensure ...
8 years, 8 months ago (2012-04-04 22:34:14 UTC) #7
apatrick_chromium
https://chromiumcodereview.appspot.com/9968113/diff/15001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://chromiumcodereview.appspot.com/9968113/diff/15001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode99 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:99: FreeResources(); What if the wrong GL context is current ...
8 years, 8 months ago (2012-04-05 21:58:39 UTC) #8
Jeff Timanus
Thanks for your reviews. I saw the GL-unittest change went through. Would it be possible ...
8 years, 8 months ago (2012-04-13 00:13:29 UTC) #9
greggman
I'm fine with waiting on the gl_tests assuming you need them. Up to this point ...
8 years, 8 months ago (2012-04-13 00:19:15 UTC) #10
Jeff Timanus
Please have a final look. I updated the new test, SubImageUnpack, which was also failing ...
8 years, 8 months ago (2012-04-13 04:13:45 UTC) #11
greggman
https://chromiumcodereview.appspot.com/9968113/diff/36001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://chromiumcodereview.appspot.com/9968113/diff/36001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode161 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:161: void CopyTextureCHROMIUMResourceManager::Destroy() { nit: if I do this c ...
8 years, 8 months ago (2012-04-15 22:22:41 UTC) #12
apatrick_chromium
A few nits. https://chromiumcodereview.appspot.com/9968113/diff/36001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://chromiumcodereview.appspot.com/9968113/diff/36001/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc#newcode100 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:100: GLfloat texture_vertices[] = { -1.0f, -1.0f, ...
8 years, 8 months ago (2012-04-16 19:17:21 UTC) #13
Jeff Timanus
Thanks again for the reviews. I addressed the comments, and corrected the state that was ...
8 years, 8 months ago (2012-04-17 01:27:34 UTC) #14
Jeff Timanus
Oh, and I also re-added the extension summary file, which had been lost while shifting ...
8 years, 8 months ago (2012-04-17 01:28:47 UTC) #15
greggman
Sorry Jeff, I missed something before. https://chromiumcodereview.appspot.com/9968113/diff/44002/gpu/command_buffer/client/gles2_implementation_unittest.cc File gpu/command_buffer/client/gles2_implementation_unittest.cc (right): https://chromiumcodereview.appspot.com/9968113/diff/44002/gpu/command_buffer/client/gles2_implementation_unittest.cc#newcode299 gpu/command_buffer/client/gles2_implementation_unittest.cc:299: static const int32 ...
8 years, 8 months ago (2012-04-17 04:58:06 UTC) #16
greggman
https://chromiumcodereview.appspot.com/9968113/diff/44002/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://chromiumcodereview.appspot.com/9968113/diff/44002/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode8331 gpu/command_buffer/service/gles2_cmd_decoder.cc:8331: dest_info->GetLevelType(GL_TEXTURE_2D, level, &type, &internal_format); Hi Jeff, continued from the ...
8 years, 8 months ago (2012-04-18 01:04:30 UTC) #17
Jeff Timanus
Thanks again for the review, Gregg. I made the changes that you suggested. I'm working ...
8 years, 8 months ago (2012-04-18 14:59:08 UTC) #18
greggman
lgtm https://chromiumcodereview.appspot.com/9968113/diff/44002/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h (right): https://chromiumcodereview.appspot.com/9968113/diff/44002/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h#newcode25 gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h:25: static const GLuint kVertexTextureAttrib = 1; On 2012/04/18 ...
8 years, 8 months ago (2012-04-19 00:39:38 UTC) #19
apatrick_chromium
lgtm
8 years, 8 months ago (2012-04-19 00:43:47 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/twiz@chromium.org/9968113/53005
8 years, 8 months ago (2012-04-19 00:53:20 UTC) #21
commit-bot: I haz the power
8 years, 8 months ago (2012-04-19 03:20:32 UTC) #22
Change committed as 132934

Powered by Google App Engine
This is Rietveld 408576698