diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-01 00:17:22 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-01 00:17:22 +0000 |
commit | 914f5269eed1c8651d53f93d4181738f1344a108 (patch) | |
tree | 6ae9ea60cbccafaec2899eaf1ea7a4f958220302 /ppapi | |
parent | 0fafc8de47e8aa377e3fb96fc914fbe7399fe9c6 (diff) | |
download | chromium_src-914f5269eed1c8651d53f93d4181738f1344a108.zip chromium_src-914f5269eed1c8651d53f93d4181738f1344a108.tar.gz chromium_src-914f5269eed1c8651d53f93d4181738f1344a108.tar.bz2 |
Remove unused trusted interfaces.
Several trusted interfaces were originally used internally by the IPC proxy and
the NaCl srpc proxy.
The IPC proxy switched to using C++ *_API classes directly, and the srpc proxy
is no more, so there's no user of these anymore.
BUG=None
Review URL: https://chromiumcodereview.appspot.com/16253003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203526 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
25 files changed, 18 insertions, 975 deletions
diff --git a/ppapi/api/trusted/ppb_audio_trusted.idl b/ppapi/api/trusted/ppb_audio_trusted.idl deleted file mode 100644 index 6ea74b7..0000000 --- a/ppapi/api/trusted/ppb_audio_trusted.idl +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (c) 2012 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/** - * This file defines the trusted audio interface. - */ - -[generate_thunk] - -label Chrome { - M14 = 0.6 -}; - -/** - * This interface is to be used by proxy implementations. All - * functions should be called from the main thread only. The - * resource returned is an Audio resource; most of the PPB_Audio - * interface is also usable on this resource. - */ -[mainthread, macro="PPB_AUDIO_TRUSTED_INTERFACE"] -interface PPB_AudioTrusted { - /** Returns an audio resource. */ - PP_Resource CreateTrusted( - [in] PP_Instance instance); - - /** - * Opens a paused audio interface, used by trusted side of proxy. - * Returns PP_ERROR_WOULD_BLOCK on success, and invokes - * the |create_callback| asynchronously to complete. - * As this function should always be invoked from the main thread, - * do not use the blocking variant of PP_CompletionCallback. - */ - int32_t Open( - [in] PP_Resource audio, - [in] PP_Resource config, - [in] PP_CompletionCallback create_callback); - - /** - * Get the sync socket. Use once Open has completed. - * Returns PP_OK on success. - */ - int32_t GetSyncSocket( - [in] PP_Resource audio, - [out] handle_t sync_socket); - - /** - * Get the shared memory interface. Use once Open has completed. - * Returns PP_OK on success. - */ - int32_t GetSharedMemory( - [in] PP_Resource audio, - [out] handle_t shm_handle, - [out] uint32_t shm_size); -}; - diff --git a/ppapi/api/trusted/ppb_buffer_trusted.idl b/ppapi/api/trusted/ppb_buffer_trusted.idl deleted file mode 100644 index 94d2b79..0000000 --- a/ppapi/api/trusted/ppb_buffer_trusted.idl +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (c) 2012 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/** - * This file defines the trusted buffer interface. - */ - -[generate_thunk] - -label Chrome { - M14 = 0.1 -}; - -[macro="PPB_BUFFER_TRUSTED_INTERFACE"] -interface PPB_BufferTrusted { - /** - * Returns the internal shared memory pointer associated with the given - * Buffer resource. Used for proxying. Returns PP_OK on success, or - * PP_ERROR_* on failure. On success, the size in bytes of the shared - * memory region will be placed into |*byte_count|, and the handle for - * the shared memory in |*handle|. - */ - int32_t GetSharedMemory([in] PP_Resource buffer, [out] handle_t handle); -}; - diff --git a/ppapi/api/trusted/ppb_graphics_3d_trusted.idl b/ppapi/api/trusted/ppb_graphics_3d_trusted.idl deleted file mode 100644 index 174e59f..0000000 --- a/ppapi/api/trusted/ppb_graphics_3d_trusted.idl +++ /dev/null @@ -1,100 +0,0 @@ -/* Copyright (c) 2012 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* Graphics 3D trusted interfaces. */ - -label Chrome { - M16 = 1.0 -}; - -enum PPB_Graphics3DTrustedError { - PPB_GRAPHICS3D_TRUSTED_ERROR_OK, - PPB_GRAPHICS3D_TRUSTED_ERROR_GENERICERROR, - PPB_GRAPHICS3D_TRUSTED_ERROR_INVALIDARGUMENTS, - PPB_GRAPHICS3D_TRUSTED_ERROR_INVALIDSIZE, - PPB_GRAPHICS3D_TRUSTED_ERROR_LOSTCONTEXT, - PPB_GRAPHICS3D_TRUSTED_ERROR_OUTOFBOUNDS, - PPB_GRAPHICS3D_TRUSTED_ERROR_UNKNOWNCOMMAND -}; - -[returnByValue] -struct PP_Graphics3DTrustedState { - // Size of the command buffer in command buffer entries. - int32_t num_entries; - - // The offset (in entries) from which the reader is reading. - int32_t get_offset; - - // The offset (in entries) at which the writer is writing. - int32_t put_offset; - - // The current token value. This is used by the writer to defer - // changes to shared memory objects until the reader has reached a certain - // point in the command buffer. The reader is responsible for updating the - // token value, for example in response to an asynchronous set token command - // embedded in the command buffer. The default token value is zero. - int32_t token; - - // Error status. - PPB_Graphics3DTrustedError error; - - // Generation index of this state. The generation index is incremented every - // time a new state is retrieved from the command processor, so that - // consistency can be kept even if IPC messages are processed out-of-order. - uint32_t generation; -}; - -[macro="PPB_GRAPHICS_3D_TRUSTED_INTERFACE"] -interface PPB_Graphics3DTrusted { - // Creates a raw Graphics3D resource. A raw Graphics3D is intended to be used - // with the trusted interface, through the command buffer (for proxying). - PP_Resource CreateRaw([in] PP_Instance instance_id, - [in] PP_Resource share_context, - [in] int32_t[] attrib_list); - - // Initializes the command buffer with the given size. - PP_Bool InitCommandBuffer([in] PP_Resource context_id); - - // Sets the buffer used for commands. - PP_Bool SetGetBuffer([in] PP_Resource context, - [in] int32_t transfer_buffer_id); - - // Returns the current state. - PP_Graphics3DTrustedState GetState([in] PP_Resource context); - - // Create a transfer buffer and return a handle that uniquely - // identifies it or -1 on error. - int32_t CreateTransferBuffer([in] PP_Resource context, - [in] uint32_t size); - - // Destroy a transfer buffer and recycle the handle. - PP_Bool DestroyTransferBuffer([in] PP_Resource context, - [in] int32_t id); - - // Get the transfer buffer associated with a handle. - PP_Bool GetTransferBuffer([in] PP_Resource context, - [in] int32_t id, - [out] handle_t shm_handle, - [out] uint32_t shm_size); - - // The writer calls this to update its put offset. - PP_Bool Flush([in] PP_Resource context, - [in] int32_t put_offset); - - // The writer calls this to update its put offset. This function returns the - // reader's most recent get offset. Does not return until after the put offset - // change callback has been invoked. - // Note: This function remains for backwards compatibility; FlushSyncFast - // is now the preferred way to sync. - PP_Graphics3DTrustedState FlushSync([in] PP_Resource context, - [in] int32_t put_offset); - - // Like FlushSync, but returns before processing commands if the get offset is - // different than last_known_get. Allows synchronization with the command - // processor without forcing immediate command execution. - PP_Graphics3DTrustedState FlushSyncFast([in] PP_Resource context, - [in] int32_t put_offset, - [in] int32_t last_known_get); -}; diff --git a/ppapi/api/trusted/ppb_image_data_trusted.idl b/ppapi/api/trusted/ppb_image_data_trusted.idl deleted file mode 100644 index 61e0d7b..0000000 --- a/ppapi/api/trusted/ppb_image_data_trusted.idl +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2012 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/** - * This file defines the trusted ImageData interface. - */ - -label Chrome { - M14 = 0.4 -}; - -/** Trusted interface */ -[macro="PPB_IMAGEDATA_TRUSTED_INTERFACE"] -interface PPB_ImageDataTrusted { - /** - * Returns the internal shared memory pointer associated with the given - * ImageData resource. Used for proxying. Returns PP_OK on success, or - * PP_ERROR_* on failure. On success, the size in bytes of the shared - * memory region will be placed into |*byte_count|, and the handle for - * the shared memory in |*handle|. - */ - int32_t GetSharedMemory( - [in] PP_Resource image_data, - [out] handle_t handle, - [out] uint32_t byte_count); -}; - diff --git a/ppapi/c/trusted/ppb_audio_trusted.h b/ppapi/c/trusted/ppb_audio_trusted.h deleted file mode 100644 index 72416df..0000000 --- a/ppapi/c/trusted/ppb_audio_trusted.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2012 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* From trusted/ppb_audio_trusted.idl modified Wed Oct 5 14:06:02 2011. */ - -#ifndef PPAPI_C_TRUSTED_PPB_AUDIO_TRUSTED_H_ -#define PPAPI_C_TRUSTED_PPB_AUDIO_TRUSTED_H_ - -#include "ppapi/c/pp_completion_callback.h" -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_resource.h" -#include "ppapi/c/pp_stdint.h" - -#define PPB_AUDIO_TRUSTED_INTERFACE_0_6 "PPB_AudioTrusted;0.6" -#define PPB_AUDIO_TRUSTED_INTERFACE PPB_AUDIO_TRUSTED_INTERFACE_0_6 - -/** - * @file - * This file defines the trusted audio interface. - */ - - -/** - * @addtogroup Interfaces - * @{ - */ -/** - * This interface is to be used by proxy implementations. All - * functions should be called from the main thread only. The - * resource returned is an Audio resource; most of the PPB_Audio - * interface is also usable on this resource. - */ -struct PPB_AudioTrusted_0_6 { - /** Returns an audio resource. */ - PP_Resource (*CreateTrusted)(PP_Instance instance); - /** - * Opens a paused audio interface, used by trusted side of proxy. - * Returns PP_ERROR_WOULD_BLOCK on success, and invokes - * the |create_callback| asynchronously to complete. - * As this function should always be invoked from the main thread, - * do not use the blocking variant of PP_CompletionCallback. - */ - int32_t (*Open)(PP_Resource audio, - PP_Resource config, - struct PP_CompletionCallback create_callback); - /** - * Get the sync socket. Use once Open has completed. - * Returns PP_OK on success. - */ - int32_t (*GetSyncSocket)(PP_Resource audio, int* sync_socket); - /** - * Get the shared memory interface. Use once Open has completed. - * Returns PP_OK on success. - */ - int32_t (*GetSharedMemory)(PP_Resource audio, - int* shm_handle, - uint32_t* shm_size); -}; - -typedef struct PPB_AudioTrusted_0_6 PPB_AudioTrusted; -/** - * @} - */ - -#endif /* PPAPI_C_TRUSTED_PPB_AUDIO_TRUSTED_H_ */ - diff --git a/ppapi/c/trusted/ppb_buffer_trusted.h b/ppapi/c/trusted/ppb_buffer_trusted.h deleted file mode 100644 index b24f340..0000000 --- a/ppapi/c/trusted/ppb_buffer_trusted.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2012 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* From trusted/ppb_buffer_trusted.idl modified Wed Oct 5 14:06:02 2011. */ - -#ifndef PPAPI_C_TRUSTED_PPB_BUFFER_TRUSTED_H_ -#define PPAPI_C_TRUSTED_PPB_BUFFER_TRUSTED_H_ - -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_resource.h" -#include "ppapi/c/pp_stdint.h" - -#define PPB_BUFFER_TRUSTED_INTERFACE_0_1 "PPB_BufferTrusted;0.1" -#define PPB_BUFFER_TRUSTED_INTERFACE PPB_BUFFER_TRUSTED_INTERFACE_0_1 - -/** - * @file - * This file defines the trusted buffer interface. - */ - - -/** - * @addtogroup Interfaces - * @{ - */ -struct PPB_BufferTrusted_0_1 { - /** - * Returns the internal shared memory pointer associated with the given - * Buffer resource. Used for proxying. Returns PP_OK on success, or - * PP_ERROR_* on failure. On success, the size in bytes of the shared - * memory region will be placed into |*byte_count|, and the handle for - * the shared memory in |*handle|. - */ - int32_t (*GetSharedMemory)(PP_Resource buffer, int* handle); -}; - -typedef struct PPB_BufferTrusted_0_1 PPB_BufferTrusted; -/** - * @} - */ - -#endif /* PPAPI_C_TRUSTED_PPB_BUFFER_TRUSTED_H_ */ - diff --git a/ppapi/c/trusted/ppb_graphics_3d_trusted.h b/ppapi/c/trusted/ppb_graphics_3d_trusted.h deleted file mode 100644 index 4f1497b..0000000 --- a/ppapi/c/trusted/ppb_graphics_3d_trusted.h +++ /dev/null @@ -1,121 +0,0 @@ -/* Copyright (c) 2012 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* From trusted/ppb_graphics_3d_trusted.idl, - * modified Mon Nov 26 15:49:46 2012. - */ - -#ifndef PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ -#define PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ - -#include "ppapi/c/pp_bool.h" -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_resource.h" -#include "ppapi/c/pp_stdint.h" - -#define PPB_GRAPHICS_3D_TRUSTED_INTERFACE_1_0 "PPB_Graphics3DTrusted;1.0" -#define PPB_GRAPHICS_3D_TRUSTED_INTERFACE PPB_GRAPHICS_3D_TRUSTED_INTERFACE_1_0 - -/** - * @file - * Graphics 3D trusted interfaces. */ - - -/** - * @addtogroup Enums - * @{ - */ -typedef enum { - PPB_GRAPHICS3D_TRUSTED_ERROR_OK, - PPB_GRAPHICS3D_TRUSTED_ERROR_GENERICERROR, - PPB_GRAPHICS3D_TRUSTED_ERROR_INVALIDARGUMENTS, - PPB_GRAPHICS3D_TRUSTED_ERROR_INVALIDSIZE, - PPB_GRAPHICS3D_TRUSTED_ERROR_LOSTCONTEXT, - PPB_GRAPHICS3D_TRUSTED_ERROR_OUTOFBOUNDS, - PPB_GRAPHICS3D_TRUSTED_ERROR_UNKNOWNCOMMAND -} PPB_Graphics3DTrustedError; -/** - * @} - */ - -/** - * @addtogroup Structs - * @{ - */ -struct PP_Graphics3DTrustedState { - /* Size of the command buffer in command buffer entries. */ - int32_t num_entries; - /* The offset (in entries) from which the reader is reading. */ - int32_t get_offset; - /* The offset (in entries) at which the writer is writing. */ - int32_t put_offset; - /* The current token value. This is used by the writer to defer - * changes to shared memory objects until the reader has reached a certain - * point in the command buffer. The reader is responsible for updating the - * token value, for example in response to an asynchronous set token command - * embedded in the command buffer. The default token value is zero. */ - int32_t token; - /* Error status. */ - PPB_Graphics3DTrustedError error; - /* Generation index of this state. The generation index is incremented every - * time a new state is retrieved from the command processor, so that - * consistency can be kept even if IPC messages are processed out-of-order. */ - uint32_t generation; -}; -/** - * @} - */ - -/** - * @addtogroup Interfaces - * @{ - */ -struct PPB_Graphics3DTrusted_1_0 { - /* Creates a raw Graphics3D resource. A raw Graphics3D is intended to be used - * with the trusted interface, through the command buffer (for proxying). */ - PP_Resource (*CreateRaw)(PP_Instance instance_id, - PP_Resource share_context, - const int32_t attrib_list[]); - /* Initializes the command buffer with the given size. */ - PP_Bool (*InitCommandBuffer)(PP_Resource context_id); - /* Sets the buffer used for commands. */ - PP_Bool (*SetGetBuffer)(PP_Resource context, int32_t transfer_buffer_id); - /* Returns the current state. */ - struct PP_Graphics3DTrustedState (*GetState)(PP_Resource context); - /* Create a transfer buffer and return a handle that uniquely - * identifies it or -1 on error. */ - int32_t (*CreateTransferBuffer)(PP_Resource context, uint32_t size); - /* Destroy a transfer buffer and recycle the handle. */ - PP_Bool (*DestroyTransferBuffer)(PP_Resource context, int32_t id); - /* Get the transfer buffer associated with a handle. */ - PP_Bool (*GetTransferBuffer)(PP_Resource context, - int32_t id, - int* shm_handle, - uint32_t* shm_size); - /* The writer calls this to update its put offset. */ - PP_Bool (*Flush)(PP_Resource context, int32_t put_offset); - /* The writer calls this to update its put offset. This function returns the - * reader's most recent get offset. Does not return until after the put offset - * change callback has been invoked. - * Note: This function remains for backwards compatibility; FlushSyncFast - * is now the preferred way to sync. */ - struct PP_Graphics3DTrustedState (*FlushSync)(PP_Resource context, - int32_t put_offset); - /* Like FlushSync, but returns before processing commands if the get offset is - * different than last_known_get. Allows synchronization with the command - * processor without forcing immediate command execution. */ - struct PP_Graphics3DTrustedState (*FlushSyncFast)(PP_Resource context, - int32_t put_offset, - int32_t last_known_get); -}; - -typedef struct PPB_Graphics3DTrusted_1_0 PPB_Graphics3DTrusted; -/** - * @} - */ - -#endif /* PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ */ - diff --git a/ppapi/c/trusted/ppb_image_data_trusted.h b/ppapi/c/trusted/ppb_image_data_trusted.h deleted file mode 100644 index c6b266c..0000000 --- a/ppapi/c/trusted/ppb_image_data_trusted.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2012 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* From trusted/ppb_image_data_trusted.idl modified Wed Oct 5 14:06:02 2011. */ - -#ifndef PPAPI_C_TRUSTED_PPB_IMAGE_DATA_TRUSTED_H_ -#define PPAPI_C_TRUSTED_PPB_IMAGE_DATA_TRUSTED_H_ - -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_resource.h" -#include "ppapi/c/pp_stdint.h" - -#define PPB_IMAGEDATA_TRUSTED_INTERFACE_0_4 "PPB_ImageDataTrusted;0.4" -#define PPB_IMAGEDATA_TRUSTED_INTERFACE PPB_IMAGEDATA_TRUSTED_INTERFACE_0_4 - -/** - * @file - * This file defines the trusted ImageData interface. - */ - - -/** - * @addtogroup Interfaces - * @{ - */ -/** Trusted interface */ -struct PPB_ImageDataTrusted_0_4 { - /** - * Returns the internal shared memory pointer associated with the given - * ImageData resource. Used for proxying. Returns PP_OK on success, or - * PP_ERROR_* on failure. On success, the size in bytes of the shared - * memory region will be placed into |*byte_count|, and the handle for - * the shared memory in |*handle|. - */ - int32_t (*GetSharedMemory)(PP_Resource image_data, - int* handle, - uint32_t* byte_count); -}; - -typedef struct PPB_ImageDataTrusted_0_4 PPB_ImageDataTrusted; -/** - * @} - */ - -#endif /* PPAPI_C_TRUSTED_PPB_IMAGE_DATA_TRUSTED_H_ */ - diff --git a/ppapi/generators/idl_c_header.py b/ppapi/generators/idl_c_header.py index ee2f256..a3b8688 100755 --- a/ppapi/generators/idl_c_header.py +++ b/ppapi/generators/idl_c_header.py @@ -178,8 +178,7 @@ def CheckPassByValue(filenode, releases): # http://crbug.com/233439 type_whitelist = ['PP_ArrayOutput', 'PP_CompletionCallback', 'PP_Ext_EventListener', 'PP_FloatPoint', - 'PP_Graphics3DTrustedState', 'PP_Point', 'PP_TouchPoint', - 'PP_Var'] + 'PP_Point', 'PP_TouchPoint', 'PP_Var'] nodes_to_check = filenode.GetListOf('Struct') nodes_to_check.extend(filenode.GetListOf('Union')) for node in nodes_to_check: diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c index cc3644c..f6da455 100644 --- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c +++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c @@ -107,15 +107,11 @@ #include "ppapi/c/private/ppp_content_decryptor_private.h" #include "ppapi/c/private/ppp_flash_browser_operations.h" #include "ppapi/c/private/ppp_instance_private.h" -#include "ppapi/c/trusted/ppb_audio_trusted.h" #include "ppapi/c/trusted/ppb_broker_trusted.h" #include "ppapi/c/trusted/ppb_browser_font_trusted.h" -#include "ppapi/c/trusted/ppb_buffer_trusted.h" #include "ppapi/c/trusted/ppb_char_set_trusted.h" #include "ppapi/c/trusted/ppb_file_chooser_trusted.h" #include "ppapi/c/trusted/ppb_file_io_trusted.h" -#include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" -#include "ppapi/c/trusted/ppb_image_data_trusted.h" #include "ppapi/c/trusted/ppb_url_loader_trusted.h" /* Use local strcmp to avoid dependency on libc. */ @@ -174,17 +170,13 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Instance_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Instance_1_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Messaging_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_MouseLock_1_0; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_AudioTrusted_0_6; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_BrokerTrusted_0_2; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_BrokerTrusted_0_3; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_BrowserFont_Trusted_1_0; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_BufferTrusted_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_CharSet_Trusted_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileChooserTrusted_0_5; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileChooserTrusted_0_6; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileIOTrusted_0_4; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_ImageDataTrusted_0_4; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_URLLoaderTrusted_0_3; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_AudioInput_Dev_0_2; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_AudioInput_Dev_0_3; @@ -1224,30 +1216,6 @@ static void Pnacl_M14_PPP_Messaging_HandleMessage(PP_Instance instance, struct P /* Not generating wrapper methods for PPP_MouseLock_1_0 */ -/* Begin wrapper methods for PPB_AudioTrusted_0_6 */ - -static PP_Resource Pnacl_M14_PPB_AudioTrusted_CreateTrusted(PP_Instance instance) { - const struct PPB_AudioTrusted_0_6 *iface = Pnacl_WrapperInfo_PPB_AudioTrusted_0_6.real_iface; - return iface->CreateTrusted(instance); -} - -static int32_t Pnacl_M14_PPB_AudioTrusted_Open(PP_Resource audio, PP_Resource config, struct PP_CompletionCallback* create_callback) { - const struct PPB_AudioTrusted_0_6 *iface = Pnacl_WrapperInfo_PPB_AudioTrusted_0_6.real_iface; - return iface->Open(audio, config, *create_callback); -} - -static int32_t Pnacl_M14_PPB_AudioTrusted_GetSyncSocket(PP_Resource audio, int* sync_socket) { - const struct PPB_AudioTrusted_0_6 *iface = Pnacl_WrapperInfo_PPB_AudioTrusted_0_6.real_iface; - return iface->GetSyncSocket(audio, sync_socket); -} - -static int32_t Pnacl_M14_PPB_AudioTrusted_GetSharedMemory(PP_Resource audio, int* shm_handle, uint32_t* shm_size) { - const struct PPB_AudioTrusted_0_6 *iface = Pnacl_WrapperInfo_PPB_AudioTrusted_0_6.real_iface; - return iface->GetSharedMemory(audio, shm_handle, shm_size); -} - -/* End wrapper methods for PPB_AudioTrusted_0_6 */ - /* Begin wrapper methods for PPB_BrokerTrusted_0_2 */ static PP_Resource Pnacl_M14_PPB_BrokerTrusted_CreateTrusted(PP_Instance instance) { @@ -1345,8 +1313,6 @@ static int32_t Pnacl_M19_PPB_BrowserFont_Trusted_PixelOffsetForCharacter(PP_Reso /* End wrapper methods for PPB_BrowserFont_Trusted_1_0 */ -/* Not generating wrapper methods for PPB_BufferTrusted_0_1 */ - /* Begin wrapper methods for PPB_CharSet_Trusted_1_0 */ static PP_Bool Pnacl_M18_PPB_CharSet_Trusted_UTF16ToCharSet(const uint16_t utf16[], uint32_t utf16_len, const char* output_char_set, PP_CharSet_Trusted_ConversionError on_error, char* output_buffer, uint32_t* output_length) { @@ -1403,62 +1369,6 @@ static int32_t Pnacl_M14_PPB_FileIOTrusted_WillSetLength(PP_Resource file_io, in /* End wrapper methods for PPB_FileIOTrusted_0_4 */ -/* Begin wrapper methods for PPB_Graphics3DTrusted_1_0 */ - -static PP_Resource Pnacl_M16_PPB_Graphics3DTrusted_CreateRaw(PP_Instance instance_id, PP_Resource share_context, const int32_t attrib_list[]) { - const struct PPB_Graphics3DTrusted_1_0 *iface = Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0.real_iface; - return iface->CreateRaw(instance_id, share_context, attrib_list); -} - -static PP_Bool Pnacl_M16_PPB_Graphics3DTrusted_InitCommandBuffer(PP_Resource context_id) { - const struct PPB_Graphics3DTrusted_1_0 *iface = Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0.real_iface; - return iface->InitCommandBuffer(context_id); -} - -static PP_Bool Pnacl_M16_PPB_Graphics3DTrusted_SetGetBuffer(PP_Resource context, int32_t transfer_buffer_id) { - const struct PPB_Graphics3DTrusted_1_0 *iface = Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0.real_iface; - return iface->SetGetBuffer(context, transfer_buffer_id); -} - -static void Pnacl_M16_PPB_Graphics3DTrusted_GetState(struct PP_Graphics3DTrustedState* _struct_result, PP_Resource context) { - const struct PPB_Graphics3DTrusted_1_0 *iface = Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0.real_iface; - *_struct_result = iface->GetState(context); -} - -static int32_t Pnacl_M16_PPB_Graphics3DTrusted_CreateTransferBuffer(PP_Resource context, uint32_t size) { - const struct PPB_Graphics3DTrusted_1_0 *iface = Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0.real_iface; - return iface->CreateTransferBuffer(context, size); -} - -static PP_Bool Pnacl_M16_PPB_Graphics3DTrusted_DestroyTransferBuffer(PP_Resource context, int32_t id) { - const struct PPB_Graphics3DTrusted_1_0 *iface = Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0.real_iface; - return iface->DestroyTransferBuffer(context, id); -} - -static PP_Bool Pnacl_M16_PPB_Graphics3DTrusted_GetTransferBuffer(PP_Resource context, int32_t id, int* shm_handle, uint32_t* shm_size) { - const struct PPB_Graphics3DTrusted_1_0 *iface = Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0.real_iface; - return iface->GetTransferBuffer(context, id, shm_handle, shm_size); -} - -static PP_Bool Pnacl_M16_PPB_Graphics3DTrusted_Flush(PP_Resource context, int32_t put_offset) { - const struct PPB_Graphics3DTrusted_1_0 *iface = Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0.real_iface; - return iface->Flush(context, put_offset); -} - -static void Pnacl_M16_PPB_Graphics3DTrusted_FlushSync(struct PP_Graphics3DTrustedState* _struct_result, PP_Resource context, int32_t put_offset) { - const struct PPB_Graphics3DTrusted_1_0 *iface = Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0.real_iface; - *_struct_result = iface->FlushSync(context, put_offset); -} - -static void Pnacl_M16_PPB_Graphics3DTrusted_FlushSyncFast(struct PP_Graphics3DTrustedState* _struct_result, PP_Resource context, int32_t put_offset, int32_t last_known_get) { - const struct PPB_Graphics3DTrusted_1_0 *iface = Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0.real_iface; - *_struct_result = iface->FlushSyncFast(context, put_offset, last_known_get); -} - -/* End wrapper methods for PPB_Graphics3DTrusted_1_0 */ - -/* Not generating wrapper methods for PPB_ImageDataTrusted_0_4 */ - /* Not generating wrapper methods for PPB_URLLoaderTrusted_0_3 */ /* Begin wrapper methods for PPB_AudioInput_Dev_0_2 */ @@ -4044,13 +3954,6 @@ struct PPP_Messaging_1_0 Pnacl_Wrappers_PPP_Messaging_1_0 = { /* Not generating wrapper interface for PPP_MouseLock_1_0 */ -struct PPB_AudioTrusted_0_6 Pnacl_Wrappers_PPB_AudioTrusted_0_6 = { - .CreateTrusted = (PP_Resource (*)(PP_Instance instance))&Pnacl_M14_PPB_AudioTrusted_CreateTrusted, - .Open = (int32_t (*)(PP_Resource audio, PP_Resource config, struct PP_CompletionCallback create_callback))&Pnacl_M14_PPB_AudioTrusted_Open, - .GetSyncSocket = (int32_t (*)(PP_Resource audio, int* sync_socket))&Pnacl_M14_PPB_AudioTrusted_GetSyncSocket, - .GetSharedMemory = (int32_t (*)(PP_Resource audio, int* shm_handle, uint32_t* shm_size))&Pnacl_M14_PPB_AudioTrusted_GetSharedMemory -}; - struct PPB_BrokerTrusted_0_2 Pnacl_Wrappers_PPB_BrokerTrusted_0_2 = { .CreateTrusted = (PP_Resource (*)(PP_Instance instance))&Pnacl_M14_PPB_BrokerTrusted_CreateTrusted, .IsBrokerTrusted = (PP_Bool (*)(PP_Resource resource))&Pnacl_M14_PPB_BrokerTrusted_IsBrokerTrusted, @@ -4077,8 +3980,6 @@ struct PPB_BrowserFont_Trusted_1_0 Pnacl_Wrappers_PPB_BrowserFont_Trusted_1_0 = .PixelOffsetForCharacter = (int32_t (*)(PP_Resource font, const struct PP_BrowserFont_Trusted_TextRun* text, uint32_t char_offset))&Pnacl_M19_PPB_BrowserFont_Trusted_PixelOffsetForCharacter }; -/* Not generating wrapper interface for PPB_BufferTrusted_0_1 */ - struct PPB_CharSet_Trusted_1_0 Pnacl_Wrappers_PPB_CharSet_Trusted_1_0 = { .UTF16ToCharSet = (PP_Bool (*)(const uint16_t utf16[], uint32_t utf16_len, const char* output_char_set, PP_CharSet_Trusted_ConversionError on_error, char* output_buffer, uint32_t* output_length))&Pnacl_M18_PPB_CharSet_Trusted_UTF16ToCharSet, .CharSetToUTF16 = (PP_Bool (*)(const char* input, uint32_t input_len, const char* input_char_set, PP_CharSet_Trusted_ConversionError on_error, uint16_t* output_buffer, uint32_t* output_utf16_length))&Pnacl_M18_PPB_CharSet_Trusted_CharSetToUTF16, @@ -4099,21 +4000,6 @@ struct PPB_FileIOTrusted_0_4 Pnacl_Wrappers_PPB_FileIOTrusted_0_4 = { .WillSetLength = (int32_t (*)(PP_Resource file_io, int64_t length, struct PP_CompletionCallback callback))&Pnacl_M14_PPB_FileIOTrusted_WillSetLength }; -struct PPB_Graphics3DTrusted_1_0 Pnacl_Wrappers_PPB_Graphics3DTrusted_1_0 = { - .CreateRaw = (PP_Resource (*)(PP_Instance instance_id, PP_Resource share_context, const int32_t attrib_list[]))&Pnacl_M16_PPB_Graphics3DTrusted_CreateRaw, - .InitCommandBuffer = (PP_Bool (*)(PP_Resource context_id))&Pnacl_M16_PPB_Graphics3DTrusted_InitCommandBuffer, - .SetGetBuffer = (PP_Bool (*)(PP_Resource context, int32_t transfer_buffer_id))&Pnacl_M16_PPB_Graphics3DTrusted_SetGetBuffer, - .GetState = (struct PP_Graphics3DTrustedState (*)(PP_Resource context))&Pnacl_M16_PPB_Graphics3DTrusted_GetState, - .CreateTransferBuffer = (int32_t (*)(PP_Resource context, uint32_t size))&Pnacl_M16_PPB_Graphics3DTrusted_CreateTransferBuffer, - .DestroyTransferBuffer = (PP_Bool (*)(PP_Resource context, int32_t id))&Pnacl_M16_PPB_Graphics3DTrusted_DestroyTransferBuffer, - .GetTransferBuffer = (PP_Bool (*)(PP_Resource context, int32_t id, int* shm_handle, uint32_t* shm_size))&Pnacl_M16_PPB_Graphics3DTrusted_GetTransferBuffer, - .Flush = (PP_Bool (*)(PP_Resource context, int32_t put_offset))&Pnacl_M16_PPB_Graphics3DTrusted_Flush, - .FlushSync = (struct PP_Graphics3DTrustedState (*)(PP_Resource context, int32_t put_offset))&Pnacl_M16_PPB_Graphics3DTrusted_FlushSync, - .FlushSyncFast = (struct PP_Graphics3DTrustedState (*)(PP_Resource context, int32_t put_offset, int32_t last_known_get))&Pnacl_M16_PPB_Graphics3DTrusted_FlushSyncFast -}; - -/* Not generating wrapper interface for PPB_ImageDataTrusted_0_4 */ - /* Not generating wrapper interface for PPB_URLLoaderTrusted_0_3 */ struct PPB_AudioInput_Dev_0_2 Pnacl_Wrappers_PPB_AudioInput_Dev_0_2 = { @@ -5017,12 +4903,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_MouseLock_1_0 = { .real_iface = NULL }; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_AudioTrusted_0_6 = { - .iface_macro = PPB_AUDIO_TRUSTED_INTERFACE_0_6, - .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_AudioTrusted_0_6, - .real_iface = NULL -}; - static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_BrokerTrusted_0_2 = { .iface_macro = PPB_BROKER_TRUSTED_INTERFACE_0_2, .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_BrokerTrusted_0_2, @@ -5041,12 +4921,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_BrowserFont_Trusted_1_0 = .real_iface = NULL }; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_BufferTrusted_0_1 = { - .iface_macro = PPB_BUFFER_TRUSTED_INTERFACE_0_1, - .wrapped_iface = NULL /* Still need slot for real_iface */, - .real_iface = NULL -}; - static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_CharSet_Trusted_1_0 = { .iface_macro = PPB_CHARSET_TRUSTED_INTERFACE_1_0, .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_CharSet_Trusted_1_0, @@ -5071,18 +4945,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileIOTrusted_0_4 = { .real_iface = NULL }; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0 = { - .iface_macro = PPB_GRAPHICS_3D_TRUSTED_INTERFACE_1_0, - .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Graphics3DTrusted_1_0, - .real_iface = NULL -}; - -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_ImageDataTrusted_0_4 = { - .iface_macro = PPB_IMAGEDATA_TRUSTED_INTERFACE_0_4, - .wrapped_iface = NULL /* Still need slot for real_iface */, - .real_iface = NULL -}; - static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_URLLoaderTrusted_0_3 = { .iface_macro = PPB_URLLOADERTRUSTED_INTERFACE_0_3, .wrapped_iface = NULL /* Still need slot for real_iface */, @@ -5714,17 +5576,13 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { &Pnacl_WrapperInfo_PPB_View_1_0, &Pnacl_WrapperInfo_PPB_View_1_1, &Pnacl_WrapperInfo_PPB_WebSocket_1_0, - &Pnacl_WrapperInfo_PPB_AudioTrusted_0_6, &Pnacl_WrapperInfo_PPB_BrokerTrusted_0_2, &Pnacl_WrapperInfo_PPB_BrokerTrusted_0_3, &Pnacl_WrapperInfo_PPB_BrowserFont_Trusted_1_0, - &Pnacl_WrapperInfo_PPB_BufferTrusted_0_1, &Pnacl_WrapperInfo_PPB_CharSet_Trusted_1_0, &Pnacl_WrapperInfo_PPB_FileChooserTrusted_0_5, &Pnacl_WrapperInfo_PPB_FileChooserTrusted_0_6, &Pnacl_WrapperInfo_PPB_FileIOTrusted_0_4, - &Pnacl_WrapperInfo_PPB_Graphics3DTrusted_1_0, - &Pnacl_WrapperInfo_PPB_ImageDataTrusted_0_4, &Pnacl_WrapperInfo_PPB_URLLoaderTrusted_0_3, &Pnacl_WrapperInfo_PPB_AudioInput_Dev_0_2, &Pnacl_WrapperInfo_PPB_AudioInput_Dev_0_3, diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi index 5f6ad46..f22d8e1 100644 --- a/ppapi/ppapi_shared.gypi +++ b/ppapi/ppapi_shared.gypi @@ -133,14 +133,12 @@ 'thunk/ppb_audio_input_api.h', 'thunk/ppb_audio_input_dev_thunk.cc', 'thunk/ppb_audio_thunk.cc', - 'thunk/ppb_audio_trusted_thunk.cc', 'thunk/ppb_broker_api.h', 'thunk/ppb_broker_thunk.cc', 'thunk/ppb_browser_font_trusted_api.h', 'thunk/ppb_browser_font_trusted_thunk.cc', 'thunk/ppb_buffer_api.h', 'thunk/ppb_buffer_thunk.cc', - 'thunk/ppb_buffer_trusted_thunk.cc', 'thunk/ppb_char_set_thunk.cc', 'thunk/ppb_console_thunk.cc', 'thunk/ppb_content_decryptor_private_thunk.cc', @@ -190,12 +188,10 @@ 'thunk/ppb_graphics_2d_thunk.cc', 'thunk/ppb_graphics_3d_api.h', 'thunk/ppb_graphics_3d_thunk.cc', - 'thunk/ppb_graphics_3d_trusted_thunk.cc', 'thunk/ppb_host_resolver_private_api.h', 'thunk/ppb_host_resolver_private_thunk.cc', 'thunk/ppb_image_data_api.h', 'thunk/ppb_image_data_thunk.cc', - 'thunk/ppb_image_data_trusted_thunk.cc', 'thunk/ppb_input_event_api.h', 'thunk/ppb_input_event_thunk.cc', 'thunk/ppb_instance_api.h', @@ -276,11 +272,9 @@ 'shared_impl/private/ppb_browser_font_trusted_shared.cc', 'shared_impl/private/ppb_char_set_shared.cc', 'thunk/ppb_audio_input_dev_thunk.cc', - 'thunk/ppb_audio_trusted_thunk.cc', 'thunk/ppb_broker_thunk.cc', 'thunk/ppb_browser_font_trusted_thunk.cc', 'thunk/ppb_buffer_thunk.cc', - 'thunk/ppb_buffer_trusted_thunk.cc', 'thunk/ppb_content_decryptor_private_thunk.cc', 'thunk/ppb_char_set_thunk.cc', 'thunk/ppb_file_io_trusted_thunk.cc', @@ -296,8 +290,6 @@ 'thunk/ppb_flash_thunk.cc', 'thunk/ppb_flash_message_loop_thunk.cc', 'thunk/ppb_gles_chromium_texture_mapping_thunk.cc', - 'thunk/ppb_graphics_3d_trusted_thunk.cc', - 'thunk/ppb_image_data_trusted_thunk.cc', 'thunk/ppb_pdf_thunk.cc', 'thunk/ppb_scrollbar_thunk.cc', 'thunk/ppb_talk_private_thunk.cc', diff --git a/ppapi/ppapi_sources.gypi b/ppapi/ppapi_sources.gypi index 950b628..f1104b9 100644 --- a/ppapi/ppapi_sources.gypi +++ b/ppapi/ppapi_sources.gypi @@ -127,14 +127,10 @@ 'c/dev/ppp_class_deprecated.h', # Trusted interfaces. - 'c/trusted/ppb_audio_trusted.h', 'c/trusted/ppb_broker_trusted.h', 'c/trusted/ppb_browser_font_trusted.h', - 'c/trusted/ppb_buffer_trusted.h', 'c/trusted/ppb_file_chooser_trusted.h', 'c/trusted/ppb_file_io_trusted.h', - 'c/trusted/ppb_graphics_3d_trusted.h', - 'c/trusted/ppb_image_data_trusted.h', 'c/trusted/ppb_url_loader_trusted.h', 'c/trusted/ppp_broker.h', diff --git a/ppapi/proxy/ppb_audio_proxy.cc b/ppapi/proxy/ppb_audio_proxy.cc index 22488cf..aae9a5d 100644 --- a/ppapi/proxy/ppb_audio_proxy.cc +++ b/ppapi/proxy/ppb_audio_proxy.cc @@ -11,7 +11,6 @@ #include "ppapi/c/ppb_audio.h" #include "ppapi/c/ppb_audio_config.h" #include "ppapi/c/ppb_var.h" -#include "ppapi/c/trusted/ppb_audio_trusted.h" #include "ppapi/proxy/enter_proxy.h" #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/ppapi_messages.h" diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc index 9bb90e6..7d18850 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.cc +++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc @@ -45,24 +45,12 @@ base::SharedMemoryHandle TransportSHMHandleFromInt(Dispatcher* dispatcher, return dispatcher->ShareHandleWithRemote(source, false); } -PP_Graphics3DTrustedState GetErrorState() { - PP_Graphics3DTrustedState error_state = { 0 }; - error_state.error = PPB_GRAPHICS3D_TRUSTED_ERROR_GENERICERROR; +gpu::CommandBuffer::State GetErrorState() { + gpu::CommandBuffer::State error_state; + error_state.error = gpu::error::kGenericError; return error_state; } -gpu::CommandBuffer::State GPUStateFromPPState( - const PP_Graphics3DTrustedState& s) { - gpu::CommandBuffer::State state; - state.num_entries = s.num_entries; - state.get_offset = s.get_offset; - state.put_offset = s.put_offset; - state.token = s.token; - state.error = static_cast<gpu::error::Error>(s.error); - state.generation = s.generation; - return state; -} - } // namespace // This class just wraps a CommandBuffer and optionally locks around every @@ -214,7 +202,7 @@ PP_Bool Graphics3D::SetGetBuffer(int32_t /* transfer_buffer_id */) { return PP_FALSE; } -PP_Graphics3DTrustedState Graphics3D::GetState() { +gpu::CommandBuffer::State Graphics3D::GetState() { return GetErrorState(); } @@ -222,7 +210,7 @@ PP_Bool Graphics3D::Flush(int32_t put_offset) { return PP_FALSE; } -PP_Graphics3DTrustedState Graphics3D::FlushSync(int32_t put_offset) { +gpu::CommandBuffer::State Graphics3D::FlushSync(int32_t put_offset) { return GetErrorState(); } @@ -240,7 +228,7 @@ PP_Bool Graphics3D::GetTransferBuffer(int32_t id, return PP_FALSE; } -PP_Graphics3DTrustedState Graphics3D::FlushSyncFast(int32_t put_offset, +gpu::CommandBuffer::State Graphics3D::FlushSyncFast(int32_t put_offset, int32_t last_known_get) { return GetErrorState(); } @@ -410,8 +398,7 @@ void PPB_Graphics3D_Proxy::OnMsgGetState(const HostResource& context, *success = false; return; } - PP_Graphics3DTrustedState pp_state = enter.object()->GetState(); - *state = GPUStateFromPPState(pp_state); + *state = enter.object()->GetState(); *success = true; } @@ -425,9 +412,7 @@ void PPB_Graphics3D_Proxy::OnMsgFlush(const HostResource& context, *success = false; return; } - PP_Graphics3DTrustedState pp_state = enter.object()->FlushSyncFast( - put_offset, last_known_get); - *state = GPUStateFromPPState(pp_state); + *state = enter.object()->FlushSyncFast(put_offset, last_known_get); *success = true; } diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.h b/ppapi/proxy/ppb_graphics_3d_proxy.h index 06fb308..1465539 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.h +++ b/ppapi/proxy/ppb_graphics_3d_proxy.h @@ -34,15 +34,15 @@ class Graphics3D : public PPB_Graphics3D_Shared { // Graphics3DTrusted API. These are not implemented in the proxy. virtual PP_Bool SetGetBuffer(int32_t shm_id) OVERRIDE; - virtual PP_Graphics3DTrustedState GetState() OVERRIDE; + virtual gpu::CommandBuffer::State GetState() OVERRIDE; virtual PP_Bool Flush(int32_t put_offset) OVERRIDE; - virtual PP_Graphics3DTrustedState FlushSync(int32_t put_offset) OVERRIDE; + virtual gpu::CommandBuffer::State FlushSync(int32_t put_offset) OVERRIDE; virtual int32_t CreateTransferBuffer(uint32_t size) OVERRIDE; virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; virtual PP_Bool GetTransferBuffer(int32_t id, int* shm_handle, uint32_t* shm_size) OVERRIDE; - virtual PP_Graphics3DTrustedState FlushSyncFast( + virtual gpu::CommandBuffer::State FlushSyncFast( int32_t put_offset, int32_t last_known_get) OVERRIDE; virtual uint32_t InsertSyncPoint() OVERRIDE; diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc index b15f23d..363ac7a 100644 --- a/ppapi/proxy/resource_creation_proxy.cc +++ b/ppapi/proxy/resource_creation_proxy.cc @@ -6,7 +6,6 @@ #include "ppapi/c/pp_errors.h" #include "ppapi/c/pp_size.h" -#include "ppapi/c/trusted/ppb_image_data_trusted.h" #include "ppapi/proxy/audio_input_resource.h" #include "ppapi/proxy/browser_font_resource_trusted.h" #include "ppapi/proxy/connection.h" diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h index b878e22..53196d1 100644 --- a/ppapi/tests/all_c_includes.h +++ b/ppapi/tests/all_c_includes.h @@ -122,10 +122,7 @@ #include "ppapi/c/private/ppb_x509_certificate_private.h" #include "ppapi/c/private/ppp_content_decryptor_private.h" #include "ppapi/c/private/ppp_instance_private.h" -#include "ppapi/c/trusted/ppb_audio_trusted.h" #include "ppapi/c/trusted/ppb_file_io_trusted.h" -#include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" -#include "ppapi/c/trusted/ppb_image_data_trusted.h" #include "ppapi/c/trusted/ppb_url_loader_trusted.h" #endif /* PPAPI_TESTS_ALL_C_INCLUDES_H_ */ diff --git a/ppapi/thunk/DEPS b/ppapi/thunk/DEPS index 554e15c..9509d54 100644 --- a/ppapi/thunk/DEPS +++ b/ppapi/thunk/DEPS @@ -1,4 +1,6 @@ include_rules = [ + # For gpu::CommandBuffer::State + "+gpu/command_buffer/common/command_buffer.h", "-ppapi/cpp", "-ppapi/proxy", ] diff --git a/ppapi/thunk/interfaces_legacy.h b/ppapi/thunk/interfaces_legacy.h index 9d03bbe..6e53ea4 100644 --- a/ppapi/thunk/interfaces_legacy.h +++ b/ppapi/thunk/interfaces_legacy.h @@ -5,14 +5,6 @@ #define LEGACY_IFACE(iface_str, function_name) #endif -LEGACY_IFACE(PPB_AUDIO_TRUSTED_INTERFACE_0_6, - ::ppapi::thunk::GetPPB_AudioTrusted_0_6_Thunk()) -LEGACY_IFACE(PPB_BUFFER_TRUSTED_INTERFACE_0_1, - ::ppapi::thunk::GetPPB_BufferTrusted_0_1_Thunk()) -LEGACY_IFACE(PPB_GRAPHICS_3D_TRUSTED_INTERFACE_1_0, - ::ppapi::thunk::GetPPB_Graphics3DTrusted_1_0_Thunk()) -LEGACY_IFACE(PPB_IMAGEDATA_TRUSTED_INTERFACE_0_4, - ::ppapi::thunk::GetPPB_ImageDataTrusted_0_4_Thunk()) LEGACY_IFACE(PPB_INPUT_EVENT_INTERFACE_1_0, ::ppapi::thunk::GetPPB_InputEvent_1_0_Thunk()) LEGACY_IFACE(PPB_INSTANCE_PRIVATE_INTERFACE_0_1, diff --git a/ppapi/thunk/ppb_audio_trusted_thunk.cc b/ppapi/thunk/ppb_audio_trusted_thunk.cc deleted file mode 100644 index 6f70a53..0000000 --- a/ppapi/thunk/ppb_audio_trusted_thunk.cc +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// From trusted/ppb_audio_trusted.idl modified Mon Apr 22 12:01:08 2013. - -#include "ppapi/c/pp_completion_callback.h" -#include "ppapi/c/pp_errors.h" -#include "ppapi/c/trusted/ppb_audio_trusted.h" -#include "ppapi/shared_impl/tracked_callback.h" -#include "ppapi/thunk/enter.h" -#include "ppapi/thunk/ppb_audio_api.h" -#include "ppapi/thunk/ppb_instance_api.h" -#include "ppapi/thunk/resource_creation_api.h" -#include "ppapi/thunk/thunk.h" - -namespace ppapi { -namespace thunk { - -namespace { - -PP_Resource CreateTrusted(PP_Instance instance) { - VLOG(4) << "PPB_AudioTrusted::CreateTrusted()"; - EnterResourceCreation enter(instance); - if (enter.failed()) - return 0; - return enter.functions()->CreateAudioTrusted(instance); -} - -int32_t Open(PP_Resource audio, - PP_Resource config, - struct PP_CompletionCallback create_callback) { - VLOG(4) << "PPB_AudioTrusted::Open()"; - EnterResource<PPB_Audio_API> enter(audio, create_callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->Open(config, enter.callback())); -} - -int32_t GetSyncSocket(PP_Resource audio, int* sync_socket) { - VLOG(4) << "PPB_AudioTrusted::GetSyncSocket()"; - EnterResource<PPB_Audio_API> enter(audio, true); - if (enter.failed()) - return enter.retval(); - return enter.object()->GetSyncSocket(sync_socket); -} - -int32_t GetSharedMemory(PP_Resource audio, - int* shm_handle, - uint32_t* shm_size) { - VLOG(4) << "PPB_AudioTrusted::GetSharedMemory()"; - EnterResource<PPB_Audio_API> enter(audio, true); - if (enter.failed()) - return enter.retval(); - return enter.object()->GetSharedMemory(shm_handle, shm_size); -} - -const PPB_AudioTrusted_0_6 g_ppb_audiotrusted_thunk_0_6 = { - &CreateTrusted, - &Open, - &GetSyncSocket, - &GetSharedMemory -}; - -} // namespace - -const PPB_AudioTrusted_0_6* GetPPB_AudioTrusted_0_6_Thunk() { - return &g_ppb_audiotrusted_thunk_0_6; -} - -} // namespace thunk -} // namespace ppapi diff --git a/ppapi/thunk/ppb_buffer_trusted_thunk.cc b/ppapi/thunk/ppb_buffer_trusted_thunk.cc deleted file mode 100644 index 86505e08..0000000 --- a/ppapi/thunk/ppb_buffer_trusted_thunk.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// From trusted/ppb_buffer_trusted.idl modified Thu Feb 28 11:58:17 2013. - -#include "ppapi/c/pp_errors.h" -#include "ppapi/c/trusted/ppb_buffer_trusted.h" -#include "ppapi/shared_impl/tracked_callback.h" -#include "ppapi/thunk/enter.h" -#include "ppapi/thunk/ppb_buffer_api.h" -#include "ppapi/thunk/ppb_instance_api.h" -#include "ppapi/thunk/resource_creation_api.h" -#include "ppapi/thunk/thunk.h" - -namespace ppapi { -namespace thunk { - -namespace { - -int32_t GetSharedMemory(PP_Resource buffer, int* handle) { - VLOG(4) << "PPB_BufferTrusted::GetSharedMemory()"; - EnterResource<PPB_Buffer_API> enter(buffer, true); - if (enter.failed()) - return enter.retval(); - return enter.object()->GetSharedMemory(handle); -} - -const PPB_BufferTrusted_0_1 g_ppb_buffertrusted_thunk_0_1 = { - &GetSharedMemory -}; - -} // namespace - -const PPB_BufferTrusted_0_1* GetPPB_BufferTrusted_0_1_Thunk() { - return &g_ppb_buffertrusted_thunk_0_1; -} - -} // namespace thunk -} // namespace ppapi diff --git a/ppapi/thunk/ppb_graphics_3d_api.h b/ppapi/thunk/ppb_graphics_3d_api.h index e7b98d2..6c6a241 100644 --- a/ppapi/thunk/ppb_graphics_3d_api.h +++ b/ppapi/thunk/ppb_graphics_3d_api.h @@ -6,8 +6,8 @@ #define PPAPI_THUNK_PPB_GRAPHICS_3D_API_H_ #include "base/memory/ref_counted.h" +#include "gpu/command_buffer/common/command_buffer.h" #include "ppapi/c/ppb_graphics_3d.h" -#include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" #include "ppapi/thunk/ppapi_thunk_export.h" @@ -31,15 +31,15 @@ class PPAPI_THUNK_EXPORT PPB_Graphics3D_API { // Graphics3DTrusted API. virtual PP_Bool SetGetBuffer(int32_t shm_id) = 0; - virtual PP_Graphics3DTrustedState GetState() = 0; + virtual gpu::CommandBuffer::State GetState() = 0; virtual int32_t CreateTransferBuffer(uint32_t size) = 0; virtual PP_Bool DestroyTransferBuffer(int32_t id) = 0; virtual PP_Bool GetTransferBuffer(int32_t id, int* shm_handle, uint32_t* shm_size) = 0; virtual PP_Bool Flush(int32_t put_offset) = 0; - virtual PP_Graphics3DTrustedState FlushSync(int32_t put_offset) = 0; - virtual PP_Graphics3DTrustedState FlushSyncFast(int32_t put_offset, + virtual gpu::CommandBuffer::State FlushSync(int32_t put_offset) = 0; + virtual gpu::CommandBuffer::State FlushSyncFast(int32_t put_offset, int32_t last_known_get) = 0; // GLESChromiumTextureMapping. diff --git a/ppapi/thunk/ppb_graphics_3d_trusted_thunk.cc b/ppapi/thunk/ppb_graphics_3d_trusted_thunk.cc deleted file mode 100644 index e3fe422..0000000 --- a/ppapi/thunk/ppb_graphics_3d_trusted_thunk.cc +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ppapi/thunk/thunk.h" -#include "ppapi/thunk/enter.h" -#include "ppapi/thunk/ppb_graphics_3d_api.h" -#include "ppapi/thunk/resource_creation_api.h" - -namespace ppapi { -namespace thunk { - -namespace { - -typedef EnterResource<PPB_Graphics3D_API> EnterGraphics3D; - -PP_Graphics3DTrustedState GetErrorState() { - PP_Graphics3DTrustedState error_state = { 0 }; - error_state.error = PPB_GRAPHICS3D_TRUSTED_ERROR_GENERICERROR; - return error_state; -} - -PP_Resource CreateRaw(PP_Instance instance, - PP_Resource share_context, - const int32_t* attrib_list) { - EnterResourceCreation enter(instance); - if (enter.failed()) - return 0; - return enter.functions()->CreateGraphics3DRaw( - instance, share_context, attrib_list); -} - -PP_Bool InitCommandBuffer(PP_Resource context) { - EnterGraphics3D enter(context, true); - if (enter.failed()) - return PP_FALSE; - return PP_TRUE; -} - -PP_Bool SetGetBuffer(PP_Resource context, int32_t transfer_buffer_id) { - EnterGraphics3D enter(context, true); - if (enter.failed()) - return PP_FALSE; - return enter.object()->SetGetBuffer(transfer_buffer_id); -} - -PP_Graphics3DTrustedState GetState(PP_Resource context) { - EnterGraphics3D enter(context, true); - if (enter.failed()) - return GetErrorState(); - return enter.object()->GetState(); -} - -int32_t CreateTransferBuffer(PP_Resource context, uint32_t size) { - EnterGraphics3D enter(context, true); - if (enter.failed()) - return PP_FALSE; - return enter.object()->CreateTransferBuffer(size); -} - -PP_Bool DestroyTransferBuffer(PP_Resource context, int32_t id) { - EnterGraphics3D enter(context, true); - if (enter.failed()) - return PP_FALSE; - return enter.object()->DestroyTransferBuffer(id); -} - -PP_Bool GetTransferBuffer(PP_Resource context, - int32_t id, - int* shm_handle, - uint32_t* shm_size) { - EnterGraphics3D enter(context, true); - if (enter.failed()) - return PP_FALSE; - return enter.object()->GetTransferBuffer(id, shm_handle, shm_size); -} - -PP_Bool Flush(PP_Resource context, int32_t put_offset) { - EnterGraphics3D enter(context, true); - if (enter.failed()) - return PP_FALSE; - return enter.object()->Flush(put_offset); -} - -PP_Graphics3DTrustedState FlushSync(PP_Resource context, int32_t put_offset) { - EnterGraphics3D enter(context, true); - if (enter.failed()) - return GetErrorState(); - return enter.object()->FlushSync(put_offset); -} - -PP_Graphics3DTrustedState FlushSyncFast(PP_Resource context, - int32_t put_offset, - int32_t last_known_get) { - EnterGraphics3D enter(context, true); - if (enter.failed()) - return GetErrorState(); - return enter.object()->FlushSyncFast(put_offset, last_known_get); -} - -const PPB_Graphics3DTrusted g_ppb_graphics_3d_trusted_thunk = { - &CreateRaw, - &InitCommandBuffer, - &SetGetBuffer, - &GetState, - &CreateTransferBuffer, - &DestroyTransferBuffer, - &GetTransferBuffer, - &Flush, - &FlushSync, - &FlushSyncFast, -}; - -} // namespace - -const PPB_Graphics3DTrusted_1_0* GetPPB_Graphics3DTrusted_1_0_Thunk() { - return &g_ppb_graphics_3d_trusted_thunk; -} - -} // namespace thunk -} // namespace ppapi diff --git a/ppapi/thunk/ppb_image_data_trusted_thunk.cc b/ppapi/thunk/ppb_image_data_trusted_thunk.cc deleted file mode 100644 index 86554a7..0000000 --- a/ppapi/thunk/ppb_image_data_trusted_thunk.cc +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ppapi/c/pp_errors.h" -#include "ppapi/c/trusted/ppb_image_data_trusted.h" -#include "ppapi/thunk/enter.h" -#include "ppapi/thunk/ppb_image_data_api.h" -#include "ppapi/thunk/thunk.h" - -namespace ppapi { -namespace thunk { - -namespace { - -int32_t GetSharedMemory(PP_Resource resource, - int* handle, - uint32_t* byte_count) { - EnterResource<PPB_ImageData_API> enter(resource, true); - if (enter.failed()) - return enter.retval(); - return enter.object()->GetSharedMemory(handle, byte_count); -} - -const PPB_ImageDataTrusted g_ppb_image_data_trusted_thunk = { - &GetSharedMemory -}; - -} // namespace - -const PPB_ImageDataTrusted_0_4* GetPPB_ImageDataTrusted_0_4_Thunk() { - return &g_ppb_image_data_trusted_thunk; -} - -} // namespace thunk -} // namespace ppapi diff --git a/ppapi/thunk/thunk.h b/ppapi/thunk/thunk.h index 2e31d2a..f454be7 100644 --- a/ppapi/thunk/thunk.h +++ b/ppapi/thunk/thunk.h @@ -6,10 +6,6 @@ #define PPAPI_THUNK_THUNK_H_ #include "ppapi/c/private/ppb_instance_private.h" -#include "ppapi/c/trusted/ppb_audio_trusted.h" -#include "ppapi/c/trusted/ppb_buffer_trusted.h" -#include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" -#include "ppapi/c/trusted/ppb_image_data_trusted.h" #include "ppapi/thunk/ppapi_thunk_export.h" // Declares a getter for the interface thunk of the form: @@ -40,13 +36,6 @@ namespace thunk { // Old-style thunk getters. Only put trusted/private stuff here (it hasn't // yet been converted to the new system). Otherwise, add the declaration to // the appropriate interfaces_*.h file. -PPAPI_THUNK_EXPORT const PPB_AudioTrusted_0_6* GetPPB_AudioTrusted_0_6_Thunk(); -PPAPI_THUNK_EXPORT const PPB_BufferTrusted_0_1* - GetPPB_BufferTrusted_0_1_Thunk(); -PPAPI_THUNK_EXPORT const PPB_Graphics3DTrusted_1_0* - GetPPB_Graphics3DTrusted_1_0_Thunk(); -PPAPI_THUNK_EXPORT const PPB_ImageDataTrusted_0_4* - GetPPB_ImageDataTrusted_0_4_Thunk(); PPAPI_THUNK_EXPORT const PPB_Instance_Private_0_1* GetPPB_Instance_Private_0_1_Thunk(); |