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

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

Issue 2448983003: gpu: Refactor memory buffer handling code out of content.
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
« no previous file with comments | « services/ui/public/cpp/gpu_service.cc ('k') | services/ui/public/cpp/mojo_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/mojo_gpu_memory_buffer_manager.h
diff --git a/services/ui/public/cpp/mojo_gpu_memory_buffer_manager.h b/services/ui/public/cpp/mojo_gpu_memory_buffer_manager.h
index a390ff61a15a04ac62179b7fba4e72424cb6bfb0..6b9899df3d1b0c6d4758df9fa6f33e130872f607 100644
--- a/services/ui/public/cpp/mojo_gpu_memory_buffer_manager.h
+++ b/services/ui/public/cpp/mojo_gpu_memory_buffer_manager.h
@@ -8,13 +8,15 @@
#include <memory>
#include "base/macros.h"
+#include "base/single_thread_task_runner.h"
#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
+#include "services/ui/public/interfaces/gpu_service.mojom.h"
namespace ui {
class MojoGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager {
public:
- MojoGpuMemoryBufferManager();
+ explicit MojoGpuMemoryBufferManager(mojom::GpuService* gpu_service);
~MojoGpuMemoryBufferManager() override;
// Overridden from gpu::GpuMemoryBufferManager:
@@ -33,6 +35,18 @@ class MojoGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager {
const gpu::SyncToken& sync_token) override;
private:
+ void EnsureGpuServiceConnection();
+
+ void AllocateGpuMemoryBufferOnMain(gfx::GpuMemoryBufferId id,
+ const gfx::Size& size,
+ gfx::BufferFormat format,
+ gfx::BufferUsage usage,
+ gfx::GpuMemoryBufferHandle* handle,
+ base::WaitableEvent* event);
+
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
+ mojom::GpuService* gpu_service_;
+
DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager);
};
« no previous file with comments | « services/ui/public/cpp/gpu_service.cc ('k') | services/ui/public/cpp/mojo_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698