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

Unified Diff: gpu/command_buffer/common/gles2_cmd_format.h

Issue 116863003: gpu: Reuse transfer buffers more aggresively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Unset texture and texture_ref after deleting Created 6 years, 9 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/command_buffer/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/gles2_cmd_format_autogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/gles2_cmd_format.h
diff --git a/gpu/command_buffer/common/gles2_cmd_format.h b/gpu/command_buffer/common/gles2_cmd_format.h
index 736c15bd73c9e4f4a3c0376b07255fb3713d41c5..f11b1e926e9b64e350bf770781662febbde41acf 100644
--- a/gpu/command_buffer/common/gles2_cmd_format.h
+++ b/gpu/command_buffer/common/gles2_cmd_format.h
@@ -152,6 +152,25 @@ struct QuerySync {
uint64 result;
};
+struct AsyncUploadSync {
+ void Reset() {
+ base::subtle::Release_Store(&async_upload_token, 0);
+ }
+
+ void SetAsyncUploadToken(uint32 token) {
+ DCHECK_NE(token, 0u);
+ base::subtle::Release_Store(&async_upload_token, token);
+ }
+
+ bool HasAsyncUploadTokenPassed(uint32 token) {
+ DCHECK_NE(token, 0u);
+ uint32_t current_token = base::subtle::Acquire_Load(&async_upload_token);
+ return (current_token - token < 0x80000000);
+ }
+
+ base::subtle::Atomic32 async_upload_token;
+};
+
COMPILE_ASSERT(sizeof(ProgramInput) == 20, ProgramInput_size_not_20);
COMPILE_ASSERT(offsetof(ProgramInput, type) == 0,
OffsetOf_ProgramInput_type_not_0);
« no previous file with comments | « gpu/command_buffer/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/gles2_cmd_format_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698