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

Unified Diff: services/ui/common/mus_gpu_memory_buffer_manager.h

Issue 2532763003: mus: Simplify generation of memory-buffer ids. (Closed)
Patch Set: tot merge Created 4 years, 1 month 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: services/ui/common/mus_gpu_memory_buffer_manager.h
diff --git a/services/ui/common/mus_gpu_memory_buffer_manager.h b/services/ui/common/mus_gpu_memory_buffer_manager.h
index cb1bd850c3b0a067f4de82047e138399fc5f0c0e..768e1c971939ff7825a77ad1a440e8db4b21cb85 100644
--- a/services/ui/common/mus_gpu_memory_buffer_manager.h
+++ b/services/ui/common/mus_gpu_memory_buffer_manager.h
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "base/threading/thread_checker.h"
#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
#include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h"
@@ -16,7 +17,8 @@ namespace ui {
// This GpuMemoryBufferManager is for establishing a GpuChannelHost used by
// mus locally.
-class MusGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager {
+class MusGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager,
+ public base::ThreadChecker {
public:
MusGpuMemoryBufferManager(mojom::GpuServiceInternal* gpu_service,
int client_id);
@@ -44,6 +46,7 @@ class MusGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager {
mojom::GpuServiceInternal* gpu_service_;
const int client_id_;
+ int next_gpu_memory_id_ = 1;
base::WeakPtrFactory<MusGpuMemoryBufferManager> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MusGpuMemoryBufferManager);
« no previous file with comments | « services/ui/common/generic_shared_memory_id_generator.cc ('k') | services/ui/common/mus_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698