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

Issue 8680002: Added minimal support to command buffer for GL_ARB_texture_rectangle (Closed)

Created:
9 years, 1 month ago by Ken Russell (switch to Gerrit)
Modified:
9 years ago
CC:
chromium-reviews, jam, apatrick_chromium, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Added minimal support to command buffer for GL_ARB_texture_rectangle textures, and added Mac OS X-specific extension for binding IOSurfaces to textures. This is infrastructure work for rendering Core Animation plugins via Chrome's compositor. Refactored the texture initialization in the command buffer and associated unit tests. Added unit tests for rectangular textures. These changes will be hooked up in a subsequent CL. They were split off for easier review. There are ongoing discussions about unifying the various mechanisms for sharing textures across processes, but it's been agreed that those should not block this work. BUG=38967 TEST=GPU unit tests; manual testing with forthcoming changes Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=111426

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+842 lines, -132 lines) Patch
M content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M gpu/GLES2/gl2ext.h View 1 chunk +35 lines, -0 lines 0 comments Download
M gpu/command_buffer/build_gles2_cmd_buffer.py View 3 chunks +8 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_c_lib_autogen.h View 1 chunk +6 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_cmd_helper_autogen.h View 1 chunk +8 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_autogen.h View 1 chunk +16 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_autogen.h View 1 chunk +55 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_test_autogen.h View 1 chunk +22 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_ids_autogen.h View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_utils.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h View 2 chunks +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/feature_info.h View 2 chunks +3 lines, -1 line 0 comments Download
M gpu/command_buffer/service/feature_info.cc View 2 chunks +27 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 15 chunks +201 lines, -12 lines 3 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_autogen.h View 1 chunk +25 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc View 1 chunk +208 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/test_helper.h View 2 chunks +9 lines, -4 lines 0 comments Download
M gpu/command_buffer/service/test_helper.cc View 2 chunks +88 lines, -50 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.h View 5 chunks +13 lines, -1 line 0 comments Download
M gpu/command_buffer/service/texture_manager.cc View 7 chunks +81 lines, -54 lines 0 comments Download
M gpu/command_buffer/service/texture_manager_unittest.cc View 2 chunks +0 lines, -10 lines 0 comments Download
M webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h View 1 chunk +4 lines, -0 lines 0 comments Download
M webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/gpu/webgraphicscontext3d_in_process_impl.h View 1 chunk +4 lines, -0 lines 0 comments Download
M webkit/gpu/webgraphicscontext3d_in_process_impl.cc View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Ken Russell (switch to Gerrit)
Please review. Thanks. If it seems undesirable to expose this legacy texture format (I personally ...
9 years, 1 month ago (2011-11-23 06:19:39 UTC) #1
apatrick_chromium
lgtm
9 years, 1 month ago (2011-11-23 20:12:41 UTC) #2
Ken Russell (switch to Gerrit)
Thanks. Gregg, sorry for committing this before you got a chance to look at it, ...
9 years, 1 month ago (2011-11-23 20:15:03 UTC) #3
greggman
http://codereview.chromium.org/8680002/diff/1/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): http://codereview.chromium.org/8680002/diff/1/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode7576 gpu/command_buffer/service/gles2_cmd_decoder.cc:7576: if (it != texture_to_io_surface_map_.end()) { I don't know the ...
9 years ago (2011-11-28 22:58:11 UTC) #4
Ken Russell (switch to Gerrit)
9 years ago (2011-11-29 01:34:49 UTC) #5
On 2011/11/28 22:58:11, greggman wrote:
>
http://codereview.chromium.org/8680002/diff/1/gpu/command_buffer/service/gles...
> File gpu/command_buffer/service/gles2_cmd_decoder.cc (right):
> 
>
http://codereview.chromium.org/8680002/diff/1/gpu/command_buffer/service/gles...
> gpu/command_buffer/service/gles2_cmd_decoder.cc:7576: if (it !=
> texture_to_io_surface_map_.end()) {
> I don't know the use case but is there any issue with
texture_to_io_surface_map
> being in GLES2DecoderImpl instead of ContextGroup or TextureManager or
> IOSurfaceManager? If you have a shared resource then you can delete the
texture
> in another context and this map will be invalid.
> 
> I know that you probably aren't using in in that way but it seems wrong to
make
> the decoder brittle and at the mercy of the clients not using it correctly.

Thanks, good point; I've filed http://crbug.com/105662 to clean this up.


> 
>
http://codereview.chromium.org/8680002/diff/1/gpu/command_buffer/service/gles...
> gpu/command_buffer/service/gles2_cmd_decoder.cc:7619: if (info ==
> texture_manager()->GetDefaultTextureInfo(target)) {
> This check is not needed. GetTextureInfoForTarget will never return an info
for
> the default texture.

Will fix.

>
http://codereview.chromium.org/8680002/diff/1/gpu/command_buffer/service/gles...
> gpu/command_buffer/service/gles2_cmd_decoder.cc:7669: GL_BGRA,
> GL_UNSIGNED_INT_8_8_8_8_REV, true);
> Do you need to check in feature_info that GL_BGRA support exists before
turning
> on this feature? Otherwise, passing in GL_BGRA here will mean you can get
enums
> from glGetIntergerv that won't validate later
> 
> Same with GL_UNSIGNED_INT_8_8_8_8_REV, it's not been added to the validators.

Argh, thanks, good point. Can we discuss this one offline? I really wanted to
avoid adding these enums to the public API. Maybe we can lie about the format
and internal format of the texture, since its contents can intentionally only be
set up with this entry point and not with TexImage2D / TexSubImage2D.

Powered by Google App Engine
This is Rietveld 408576698