diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-27 20:28:18 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-27 20:28:18 +0000 |
commit | 246fc49935cd37deba43624861f236acc016aa48 (patch) | |
tree | 8dbc89fc8304cfa0409dc83ccb8b94b01d3def8f /gpu | |
parent | 906960ba1d7a27bb458fca480a20aa33c61ebdb6 (diff) | |
download | chromium_src-246fc49935cd37deba43624861f236acc016aa48.zip chromium_src-246fc49935cd37deba43624861f236acc016aa48.tar.gz chromium_src-246fc49935cd37deba43624861f236acc016aa48.tar.bz2 |
PPAPI/NaCl: Make NaClIPCAdapter transfer handles more generally
This does a couple of things:
- It defines a new wrapper for passing any kind of handle through the PPAPI proxy (SerializedHandle).
- It updates nacl_ipc_adapter to have a more general way to pick apart messages based on their static types (which include the types of all the params).
- It adds support for PPB_Graphics2D and PPB_Graphics3D to the NaCl IPC proxy (e.g., NaCl SDK examples pi_generator and tumbler work in the new proxy with this patch).
The downside is it requires pulling parts of ppapi/shared_impl and ppapi/proxy in to the NaCl Win64 build.
BUG=116317
TEST=
Review URL: https://chromiumcodereview.appspot.com/10828023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153531 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/common/command_buffer.h | 5 | ||||
-rw-r--r-- | gpu/gpu.gyp | 30 | ||||
-rw-r--r-- | gpu/gpu_export.h | 2 | ||||
-rw-r--r-- | gpu/gpu_ipc.gypi | 16 | ||||
-rw-r--r-- | gpu/gpu_untrusted.gyp | 2 |
5 files changed, 54 insertions, 1 deletions
diff --git a/gpu/command_buffer/common/command_buffer.h b/gpu/command_buffer/common/command_buffer.h index 6a2da68..6b19ea2 100644 --- a/gpu/command_buffer/common/command_buffer.h +++ b/gpu/command_buffer/common/command_buffer.h @@ -135,11 +135,16 @@ class GPU_EXPORT CommandBuffer { // call this first. virtual void SetContextLostReason(error::ContextLostReason) = 0; +// The NaCl Win64 build only really needs the struct definitions above; having +// GetLastError declared would mean we'd have to also define it, and pull more +// of gpu in to the NaCl Win64 build. +#if !defined(NACL_WIN64) // TODO(apatrick): this is a temporary optimization while skia is calling // RendererGLContext::MakeCurrent prior to every GL call. It saves returning 6 // ints redundantly when only the error is needed for the CommandBufferProxy // implementation. virtual error::Error GetLastError(); +#endif private: DISALLOW_COPY_AND_ASSIGN(CommandBuffer); diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp index acb3b68..712f7aa 100644 --- a/gpu/gpu.gyp +++ b/gpu/gpu.gyp @@ -3,6 +3,9 @@ # found in the LICENSE file. { + 'variables': { + 'nacl_win64_target': 0, + }, 'includes': [ 'gpu_common.gypi', ], @@ -407,5 +410,32 @@ }, ], }], + ['disable_nacl!=1' and 'OS=="win"', { + 'targets': [ + { + 'target_name': 'gpu_ipc_win64', + 'type': 'static_library', + 'variables': { + 'nacl_win64_target': 1, + }, + 'includes': [ + 'gpu_ipc.gypi', + ], + 'dependencies': [ + '../base/base.gyp:base_nacl_win64', + '../ipc/ipc.gyp:ipc_win64', + ], + 'defines': [ + '<@(nacl_win64_defines)', + 'GPU_IMPLEMENTATION', + ], + 'configurations': { + 'Common_Base': { + 'msvs_target_platform': 'x64', + }, + }, + }, + ], + }], ], } diff --git a/gpu/gpu_export.h b/gpu/gpu_export.h index ac6e878..69aea7b 100644 --- a/gpu/gpu_export.h +++ b/gpu/gpu_export.h @@ -5,7 +5,7 @@ #ifndef GPU_GPU_EXPORT_H_ #define GPU_GPU_EXPORT_H_ -#if defined(COMPONENT_BUILD) +#if defined(COMPONENT_BUILD) && !defined(NACL_WIN64) #if defined(WIN32) #if defined(GPU_IMPLEMENTATION) diff --git a/gpu/gpu_ipc.gypi b/gpu/gpu_ipc.gypi index 33845f23..8bf0ac1 100644 --- a/gpu/gpu_ipc.gypi +++ b/gpu/gpu_ipc.gypi @@ -16,4 +16,20 @@ 'ipc/gpu_command_buffer_traits.cc', 'ipc/gpu_command_buffer_traits.h', ], + 'conditions': [ + # This section applies to gpu_ipc_win64, used by the NaCl Win64 helper + # (nacl64.exe). + ['nacl_win64_target==1', { + # gpu_ipc_win64 must only link against the 64-bit ipc target. + 'dependencies!': [ + '../ipc/ipc.gyp:ipc', + ], + # The NaCl Win64 build only needs the ParamTraits, so we exclude + # command_buffer_proxy.*. + 'sources!': [ + 'ipc/command_buffer_proxy.h', + 'ipc/command_buffer_proxy.cc', + ], + }], + ], } diff --git a/gpu/gpu_untrusted.gyp b/gpu/gpu_untrusted.gyp index e0efb8e..0d4a434 100644 --- a/gpu/gpu_untrusted.gyp +++ b/gpu/gpu_untrusted.gyp @@ -5,6 +5,8 @@ { 'variables': { 'chromium_code': 1, + # nacl_win64_target is for building the trusted Win64 NaCl broker. + 'nacl_win64_target': 0, }, 'includes': [ '../build/common_untrusted.gypi', |