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

Unified Diff: gpu/command_buffer/client/cmd_buffer_helper.h

Issue 869433003: (not for commit) Simplified multi-threaded Ganesh with lock on Flush only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 11 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 | « content/test/fake_compositor_dependencies.cc ('k') | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/cmd_buffer_helper.h
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.h b/gpu/command_buffer/client/cmd_buffer_helper.h
index 053c1c9f2a9e5e2b0cd570e5631921575546b966..5799874ee6dbf3108232b94addc10521e8af99a4 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper.h
+++ b/gpu/command_buffer/client/cmd_buffer_helper.h
@@ -10,6 +10,7 @@
#include <string.h>
#include <time.h>
+#include "base/synchronization/lock.h"
#include "base/time/time.h"
#include "gpu/command_buffer/common/cmd_buffer_common.h"
#include "gpu/command_buffer/common/command_buffer.h"
@@ -71,6 +72,9 @@ class GPU_EXPORT CommandBufferHelper {
// disconnected.
bool Finish();
+ void SetSafeFlushPoint();
+ void SafeFlush();
+
// Waits until a given number of available entries are available.
// Parameters:
// count: number of entries needed. This value must be at most
@@ -320,8 +324,10 @@ class GPU_EXPORT CommandBufferHelper {
int32 total_entry_count_; // the total number of entries
int32 immediate_entry_count_;
int32 token_;
+ base::Lock flush_lock_;
int32 put_;
int32 last_put_sent_;
+ int32 safe_put_point_;
#if defined(CMD_HELPER_PERIODIC_FLUSH_CHECK)
int commands_issued_;
« no previous file with comments | « content/test/fake_compositor_dependencies.cc ('k') | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698