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

Unified Diff: services/ui/public/cpp/gpu/mojo_gpu_memory_buffer_manager.h

Issue 2516943002: mus-gpu: Fix a couple of issues with MojoGpuMemoryBufferManager. (Closed)
Patch Set: 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/public/cpp/gpu/mojo_gpu_memory_buffer_manager.h
diff --git a/services/ui/public/cpp/gpu/mojo_gpu_memory_buffer_manager.h b/services/ui/public/cpp/gpu/mojo_gpu_memory_buffer_manager.h
index a727d891aca9ce148000078b3634964de88a1cd7..df83a4130347f3a933a287d23a1752e7f4a735c5 100644
--- a/services/ui/public/cpp/gpu/mojo_gpu_memory_buffer_manager.h
+++ b/services/ui/public/cpp/gpu/mojo_gpu_memory_buffer_manager.h
@@ -31,11 +31,11 @@ class GpuService;
class MojoGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager {
public:
- explicit MojoGpuMemoryBufferManager(service_manager::Connector* connector);
+ explicit MojoGpuMemoryBufferManager(mojom::GpuServicePtr gpu_service);
~MojoGpuMemoryBufferManager() override;
private:
- void InitThread();
+ void InitThread(mojo::InterfacePtrInfo<mojom::GpuService> gpu_service_info);
void TearDownThread();
void AllocateGpuMemoryBufferOnThread(const gfx::Size& size,
gfx::BufferFormat format,
@@ -61,7 +61,7 @@ class MojoGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager {
// TODO(sad): Explore the option of doing this from an existing thread.
base::Thread thread_;
mojom::GpuServicePtr gpu_service_;
- std::unique_ptr<service_manager::Connector> connector_;
+ base::WeakPtr<MojoGpuMemoryBufferManager> weak_ptr_;
base::WeakPtrFactory<MojoGpuMemoryBufferManager> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager);
« no previous file with comments | « services/ui/public/cpp/gpu/gpu_service.cc ('k') | services/ui/public/cpp/gpu/mojo_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698