diff options
author | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-28 23:37:14 +0000 |
---|---|---|
committer | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-28 23:37:14 +0000 |
commit | ef16c174a500a841cf6a120dc4ef9fca89fac9f9 (patch) | |
tree | 8491a815c314e161a462f42c41c374403ce6ec8c /ppapi/c | |
parent | d0a7409f5ad0c075d5208ea0eb93ff07868c6168 (diff) | |
download | chromium_src-ef16c174a500a841cf6a120dc4ef9fca89fac9f9.zip chromium_src-ef16c174a500a841cf6a120dc4ef9fca89fac9f9.tar.gz chromium_src-ef16c174a500a841cf6a120dc4ef9fca89fac9f9.tar.bz2 |
Rework FlushSync to return early if commands have been processed since the last update
BUG=80480
TEST=
Review URL: http://codereview.chromium.org/6883179
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83442 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r-- | ppapi/c/dev/ppb_context_3d_trusted_dev.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ppapi/c/dev/ppb_context_3d_trusted_dev.h b/ppapi/c/dev/ppb_context_3d_trusted_dev.h index afc860f..ce4d8d6 100644 --- a/ppapi/c/dev/ppb_context_3d_trusted_dev.h +++ b/ppapi/c/dev/ppb_context_3d_trusted_dev.h @@ -11,9 +11,9 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_stdint.h" -#define PPB_CONTEXT_3D_TRUSTED_DEV_INTERFACE_0_3 "PPB_Context3DTrusted(Dev);0.3" +#define PPB_CONTEXT_3D_TRUSTED_DEV_INTERFACE_0_4 "PPB_Context3DTrusted(Dev);0.4" #define PPB_CONTEXT_3D_TRUSTED_DEV_INTERFACE \ - PPB_CONTEXT_3D_TRUSTED_DEV_INTERFACE_0_3 + PPB_CONTEXT_3D_TRUSTED_DEV_INTERFACE_0_4 typedef enum { kNoError, @@ -44,6 +44,11 @@ struct PP_Context3DTrustedState { // Error status. PPB_Context3DTrustedError 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; }; struct PPB_Context3DTrusted_Dev { @@ -89,6 +94,13 @@ struct PPB_Context3DTrusted_Dev { int32_t id, int* shm_handle, uint32_t* shm_size); + + // 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_Context3DTrustedState (*FlushSyncFast)(PP_Resource context, + int32_t put_offset, + int32_t last_known_get); }; #endif // PPAPI_C_DEV_PPB_CONTEXT_3D_TRUSTED_DEV_H_ |