| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ | 5 #ifndef PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ |
| 6 #define PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ | 6 #define PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 struct PPB_Graphics3DTrusted { | 54 struct PPB_Graphics3DTrusted { |
| 55 // Creates a raw Graphics3D resource. A raw Graphics3D is intended to be used | 55 // Creates a raw Graphics3D resource. A raw Graphics3D is intended to be used |
| 56 // with the trusted interface, through the command buffer (for proxying). | 56 // with the trusted interface, through the command buffer (for proxying). |
| 57 PP_Resource (*CreateRaw)(PP_Instance instance_id, | 57 PP_Resource (*CreateRaw)(PP_Instance instance_id, |
| 58 PP_Resource share_context, | 58 PP_Resource share_context, |
| 59 const int32_t* attrib_list); | 59 const int32_t* attrib_list); |
| 60 | 60 |
| 61 // Initializes the command buffer with the given size. | 61 // Initializes the command buffer with the given size. |
| 62 PP_Bool (*InitCommandBuffer)(PP_Resource context_id, int32_t size); | 62 PP_Bool (*InitCommandBuffer)(PP_Resource context_id); |
| 63 | 63 |
| 64 // Gets the ring buffer for the command buffer. | 64 // Sets the buffer used for commands. |
| 65 PP_Bool (*GetRingBuffer)(PP_Resource context_id, | 65 PP_Bool (*SetGetBuffer)(PP_Resource context, int32_t transfer_buffer_id); |
| 66 int* shm_handle, | |
| 67 uint32_t* shm_size); | |
| 68 | 66 |
| 69 // Returns the current state. | 67 // Returns the current state. |
| 70 struct PP_Graphics3DTrustedState (*GetState)(PP_Resource context); | 68 struct PP_Graphics3DTrustedState (*GetState)(PP_Resource context); |
| 71 | 69 |
| 72 // Create a transfer buffer and return a handle that uniquely | 70 // Create a transfer buffer and return a handle that uniquely |
| 73 // identifies it or -1 on error. | 71 // identifies it or -1 on error. |
| 74 int32_t (*CreateTransferBuffer)(PP_Resource context, uint32_t size); | 72 int32_t (*CreateTransferBuffer)(PP_Resource context, uint32_t size); |
| 75 | 73 |
| 76 // Destroy a transfer buffer and recycle the handle. | 74 // Destroy a transfer buffer and recycle the handle. |
| 77 PP_Bool (*DestroyTransferBuffer)(PP_Resource context, int32_t id); | 75 PP_Bool (*DestroyTransferBuffer)(PP_Resource context, int32_t id); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 96 // Like FlushSync, but returns before processing commands if the get offset is | 94 // Like FlushSync, but returns before processing commands if the get offset is |
| 97 // different than last_known_get. Allows synchronization with the command | 95 // different than last_known_get. Allows synchronization with the command |
| 98 // processor without forcing immediate command execution. | 96 // processor without forcing immediate command execution. |
| 99 struct PP_Graphics3DTrustedState (*FlushSyncFast)(PP_Resource context, | 97 struct PP_Graphics3DTrustedState (*FlushSyncFast)(PP_Resource context, |
| 100 int32_t put_offset, | 98 int32_t put_offset, |
| 101 int32_t last_known_get); | 99 int32_t last_known_get); |
| 102 }; | 100 }; |
| 103 | 101 |
| 104 #endif // PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ | 102 #endif // PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ |
| 105 | 103 |
| OLD | NEW |