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

Unified Diff: ppapi/c/dev/ppb_context_3d_trusted_dev.h

Issue 6883179: Rework FlushSync to return early if commands have been processed since the last update (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/pgl/pgl_proc_address.cc ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/dev/ppb_context_3d_trusted_dev.h
diff --git a/ppapi/c/dev/ppb_context_3d_trusted_dev.h b/ppapi/c/dev/ppb_context_3d_trusted_dev.h
index afc860feb685d2eff657a19713e05001e6f10e7f..ce4d8d67554f788b1cd1d0fea66f7d79872ae732 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_
« no previous file with comments | « gpu/pgl/pgl_proc_address.cc ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698