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

Unified Diff: content/common/gpu/gpu_channel_manager.h

Issue 1308913004: GPU Channel's now maintain a global order number for each processed IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated command buffer stub to use 32 bit order numbers Created 5 years, 4 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: content/common/gpu/gpu_channel_manager.h
diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h
index 8122c2bde1c012411eac80e5704c16965bf37613..e9c3f918dbb4e6190226bf96138e656608ccc468 100644
--- a/content/common/gpu/gpu_channel_manager.h
+++ b/content/common/gpu/gpu_channel_manager.h
@@ -13,6 +13,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/threading/thread_checker.h"
#include "build/build_config.h"
#include "content/common/content_export.h"
#include "content/common/content_param_traits.h"
@@ -83,7 +84,7 @@ class CONTENT_EXPORT GpuChannelManager : public IPC::Listener,
bool Send(IPC::Message* msg) override;
bool HandleMessagesScheduled();
- uint64 MessagesProcessed();
+ uint32_t ProcessedOrderNumber();
void LoseAllContexts();
@@ -91,6 +92,8 @@ class CONTENT_EXPORT GpuChannelManager : public IPC::Listener,
void AddRoute(int32 routing_id, IPC::Listener* listener);
void RemoveRoute(int32 routing_id);
+ uint32_t GenerateGlobalOrderNumber();
+
gpu::gles2::ProgramCache* program_cache();
gpu::gles2::ShaderTranslatorCache* shader_translator_cache();
gpu::gles2::FramebufferCompletenessCache* framebuffer_completeness_cache();
@@ -153,9 +156,13 @@ class CONTENT_EXPORT GpuChannelManager : public IPC::Listener,
const gpu::ValueState& state);
void OnLoseAllContexts();
+ // Thread Checkers.
+ base::ThreadChecker io_thread_checker_;
+
// Used to send and receive IPC messages from the browser process.
IPC::SyncChannel* const channel_;
MessageRouter router_;
+ uint32_t global_order_counter_;
piman 2015/08/31 23:15:04 Use a AtomicSequenceNumber, then you don't need ex
David Yen 2015/09/01 02:01:52 This number is only operated on from the IO thread
GpuWatchdog* watchdog_;

Powered by Google App Engine
This is Rietveld 408576698