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

Issue 7206016: Convert most remaining resources to use the API/thunk system. The significant (Closed)

Created:
9 years, 6 months ago by brettw
Modified:
9 years, 6 months ago
Reviewers:
piman, alokp
CC:
chromium-reviews, piman+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Convert most remaining resources to use the API/thunk system. The significant changes here are around the 3D API. Having separate files for the texture mapping interface is no longer necessary for the proxy and the implementation. This also removes the uses of the "old" dynamic casting system (using "GetAs") for other resources that I could find. TEST=ui tests BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=90096

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 8

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2187 lines, -2065 lines) Patch
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 2 3 4 9 chunks +32 lines, -17 lines 0 comments Download
M ppapi/c/dev/ppb_context_3d_trusted_dev.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/ppapi_proxy.gypi View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M ppapi/ppapi_shared.gypi View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M ppapi/proxy/dispatcher.cc View 1 2 3 4 3 chunks +1 line, -2 lines 0 comments Download
M ppapi/proxy/interface_id.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M ppapi/proxy/ppb_context_3d_proxy.h View 1 2 3 4 5 chunks +45 lines, -22 lines 0 comments Download
M ppapi/proxy/ppb_context_3d_proxy.cc View 1 2 3 4 10 chunks +234 lines, -159 lines 0 comments Download
M ppapi/proxy/ppb_flash_menu_proxy.cc View 1 2 3 4 1 chunk +3 lines, -11 lines 0 comments Download
M ppapi/proxy/ppb_font_proxy.cc View 1 2 3 4 2 chunks +4 lines, -7 lines 0 comments Download
D ppapi/proxy/ppb_gles_chromium_texture_mapping_proxy.h View 1 2 3 4 1 chunk +0 lines, -36 lines 0 comments Download
D ppapi/proxy/ppb_gles_chromium_texture_mapping_proxy.cc View 1 2 3 4 1 chunk +0 lines, -80 lines 0 comments Download
M ppapi/proxy/ppb_opengles2_proxy.cc View 1 2 3 4 3 chunks +196 lines, -302 lines 0 comments Download
M ppapi/proxy/ppb_surface_3d_proxy.h View 1 2 3 4 4 chunks +17 lines, -16 lines 0 comments Download
M ppapi/proxy/ppb_surface_3d_proxy.cc View 1 2 3 4 5 chunks +90 lines, -93 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.h View 1 2 3 4 3 chunks +15 lines, -0 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.cc View 1 2 3 4 5 chunks +40 lines, -3 lines 0 comments Download
M ppapi/shared_impl/resource_object_base.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_context_3d_api.h View 1 2 1 chunk +53 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_context_3d_thunk.cc View 1 2 1 chunk +72 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_context_3d_trusted_thunk.cc View 1 2 1 chunk +124 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc View 1 2 1 chunk +54 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_graphics_3d_api.h View 1 chunk +23 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_graphics_3d_thunk.cc View 1 chunk +91 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_layer_compositor_api.h View 1 2 1 chunk +27 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_layer_compositor_thunk.cc View 1 2 1 chunk +70 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_transport_api.h View 1 chunk +30 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_transport_thunk.cc View 1 chunk +102 lines, -0 lines 0 comments Download
M ppapi/thunk/resource_creation_api.h View 1 2 3 4 3 chunks +15 lines, -0 lines 0 comments Download
M ppapi/thunk/thunk.h View 1 2 3 4 4 chunks +17 lines, -0 lines 0 comments Download
M webkit/glue/webkit_glue.gypi View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/plugin_module.cc View 1 2 3 4 7 chunks +17 lines, -21 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.cc View 1 2 3 4 5 chunks +30 lines, -15 lines 0 comments Download
M webkit/plugins/ppapi/ppb_broker_impl.h View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_broker_impl.cc View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M webkit/plugins/ppapi/ppb_context_3d_impl.h View 1 2 3 4 2 chunks +56 lines, -24 lines 0 comments Download
M webkit/plugins/ppapi/ppb_context_3d_impl.cc View 1 2 3 4 8 chunks +166 lines, -210 lines 0 comments Download
M webkit/plugins/ppapi/ppb_directory_reader_impl.h View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_directory_reader_impl.cc View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M webkit/plugins/ppapi/ppb_flash_file_impl.cc View 1 2 3 4 4 chunks +10 lines, -6 lines 0 comments Download
M webkit/plugins/ppapi/ppb_flash_impl.cc View 1 2 3 4 3 chunks +8 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_flash_impl_linux.cc View 1 2 3 4 3 chunks +9 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_font_impl.h View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_font_impl.cc View 1 2 3 4 4 chunks +9 lines, -8 lines 0 comments Download
D webkit/plugins/ppapi/ppb_gles_chromium_texture_mapping_impl.h View 1 2 3 4 1 chunk +0 lines, -22 lines 0 comments Download
D webkit/plugins/ppapi/ppb_gles_chromium_texture_mapping_impl.cc View 1 2 3 4 1 chunk +0 lines, -53 lines 0 comments Download
M webkit/plugins/ppapi/ppb_graphics_2d_impl.cc View 1 2 3 4 6 chunks +18 lines, -10 lines 0 comments Download
M webkit/plugins/ppapi/ppb_graphics_3d_impl.h View 1 2 3 4 1 chunk +17 lines, -7 lines 0 comments Download
M webkit/plugins/ppapi/ppb_graphics_3d_impl.cc View 1 2 3 4 1 chunk +24 lines, -67 lines 0 comments Download
M webkit/plugins/ppapi/ppb_image_data_impl.h View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_image_data_impl.cc View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M webkit/plugins/ppapi/ppb_layer_compositor_impl.h View 1 2 3 4 2 chunks +14 lines, -11 lines 0 comments Download
M webkit/plugins/ppapi/ppb_layer_compositor_impl.cc View 1 2 3 4 4 chunks +6 lines, -60 lines 0 comments Download
M webkit/plugins/ppapi/ppb_opengles_impl.cc View 1 2 3 4 2 chunks +198 lines, -444 lines 0 comments Download
M webkit/plugins/ppapi/ppb_proxy_impl.cc View 1 2 3 4 2 chunks +9 lines, -5 lines 0 comments Download
M webkit/plugins/ppapi/ppb_scrollbar_impl.h View 1 2 3 4 1 chunk +10 lines, -7 lines 0 comments Download
M webkit/plugins/ppapi/ppb_scrollbar_impl.cc View 1 2 3 4 1 chunk +15 lines, -20 lines 0 comments Download
M webkit/plugins/ppapi/ppb_surface_3d_impl.h View 1 2 3 4 3 chunks +18 lines, -10 lines 0 comments Download
M webkit/plugins/ppapi/ppb_surface_3d_impl.cc View 1 2 3 4 4 chunks +42 lines, -74 lines 0 comments Download
M webkit/plugins/ppapi/ppb_transport_impl.h View 1 2 3 4 3 chunks +22 lines, -14 lines 0 comments Download
M webkit/plugins/ppapi/ppb_transport_impl.cc View 1 2 3 4 4 chunks +17 lines, -81 lines 0 comments Download
M webkit/plugins/ppapi/ppb_video_decoder_impl.cc View 1 2 3 4 4 chunks +14 lines, -9 lines 0 comments Download
M webkit/plugins/ppapi/ppb_widget_impl.h View 1 2 3 4 1 chunk +18 lines, -13 lines 0 comments Download
M webkit/plugins/ppapi/ppb_widget_impl.cc View 1 2 3 4 2 chunks +16 lines, -63 lines 0 comments Download
M webkit/plugins/ppapi/resource.h View 1 2 3 4 1 chunk +3 lines, -27 lines 0 comments Download
M webkit/plugins/ppapi/resource_creation_impl.h View 1 2 3 4 3 chunks +15 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/resource_creation_impl.cc View 1 2 3 4 5 chunks +36 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
brettw
9 years, 6 months ago (2011-06-19 21:13:16 UTC) #1
alokp
GL part lgtm. May be piman should look at the trusted 3D API. http://codereview.chromium.org/7206016/diff/1073/ppapi/proxy/ppb_context_3d_proxy.h File ...
9 years, 6 months ago (2011-06-20 16:36:03 UTC) #2
brettw
http://codereview.chromium.org/7206016/diff/1073/ppapi/proxy/ppb_context_3d_proxy.h File ppapi/proxy/ppb_context_3d_proxy.h (right): http://codereview.chromium.org/7206016/diff/1073/ppapi/proxy/ppb_context_3d_proxy.h#newcode38 ppapi/proxy/ppb_context_3d_proxy.h:38: public ::ppapi::thunk::PPB_Context3D_API { Nope, got used to doing it ...
9 years, 6 months ago (2011-06-20 19:31:03 UTC) #3
brettw
+piman for trusted 3D API
9 years, 6 months ago (2011-06-20 19:43:51 UTC) #4
alokp
http://codereview.chromium.org/7206016/diff/1073/ppapi/proxy/ppb_opengles2_proxy.cc File ppapi/proxy/ppb_opengles2_proxy.cc (right): http://codereview.chromium.org/7206016/diff/1073/ppapi/proxy/ppb_opengles2_proxy.cc#newcode16 ppapi/proxy/ppb_opengles2_proxy.cc:16: #include "ppapi/shared_impl/resource_object_base.h" It is generated using gpu/command_buffer/build_gles2_cmd_buffer.py. Sorry the ...
9 years, 6 months ago (2011-06-20 19:50:46 UTC) #5
brettw
I updated the generation script and added a comment about what generates the files. Then ...
9 years, 6 months ago (2011-06-20 20:23:36 UTC) #6
piman
http://codereview.chromium.org/7206016/diff/1073/ppapi/thunk/ppb_context_3d_api.h File ppapi/thunk/ppb_context_3d_api.h (right): http://codereview.chromium.org/7206016/diff/1073/ppapi/thunk/ppb_context_3d_api.h#newcode37 ppapi/thunk/ppb_context_3d_api.h:37: // GLESChromiumTextureMapping. Why are these piggy-backing on the PPB_Context3D_API ...
9 years, 6 months ago (2011-06-20 20:26:14 UTC) #7
brettw
9 years, 6 months ago (2011-06-20 21:37:11 UTC) #8
http://codereview.chromium.org/7206016/diff/1073/ppapi/thunk/ppb_context_3d_a...
File ppapi/thunk/ppb_context_3d_api.h (right):

http://codereview.chromium.org/7206016/diff/1073/ppapi/thunk/ppb_context_3d_a...
ppapi/thunk/ppb_context_3d_api.h:37: // GLESChromiumTextureMapping.
Everything "should" be like this and go through the thunk layer. The advantage
of the thunk layer is that it saves you from having to implement the resource
conversion multiple times, and allows you to write object-oriented code in the
impl and the proxy.

But if I were to do that for the GL calls, that would be >100 virtual functions
in each of these places which can't be autogenerated. I can do things, like
maybe autogenerate a header file with a define for the declaration of all of
these functions, and then use that in both the proxy and the impl, then
autogenerate another file to forward these from the Context to the gles_impl.

It seemed less complexity overall to treat the autogenerated GL functions as
special and bypass the thunk layer.

Powered by Google App Engine
This is Rietveld 408576698