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

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: cleanup, fix tests 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
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 f8a0d9cf0f660a0e37b3084ffe32bee07bef134e..6b7ed822f04163a25566b9ed73486aeb7984f917 100644
--- a/ppapi/c/dev/ppb_context_3d_trusted_dev.h
+++ b/ppapi/c/dev/ppb_context_3d_trusted_dev.h
@@ -42,6 +42,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 {
@@ -87,6 +92,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,
piman 2011/04/27 21:28:39 This was added instead of replacing FlushSync beca
+ int32_t put_offset,
+ int32_t last_known_get);
};
#endif // PPAPI_C_DEV_PPB_CONTEXT_3D_TRUSTED_DEV_H_

Powered by Google App Engine
This is Rietveld 408576698