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

Unified Diff: content/child/child_gpu_memory_buffer_manager.h

Issue 2490503002: gpu: A common GpuMemoryBufferManager implemenetation for clients. (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
« no previous file with comments | « no previous file | content/child/child_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_gpu_memory_buffer_manager.h
diff --git a/content/child/child_gpu_memory_buffer_manager.h b/content/child/child_gpu_memory_buffer_manager.h
index e550dca8170ec7e731d04f2cc7288a6524125131..8007fffc5ef76d0e72575f309bd918b06aa6a6c2 100644
--- a/content/child/child_gpu_memory_buffer_manager.h
+++ b/content/child/child_gpu_memory_buffer_manager.h
@@ -9,32 +9,31 @@
#include "base/macros.h"
#include "content/child/thread_safe_sender.h"
-#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
+#include "gpu/ipc/client/client_gpu_memory_buffer_manager.h"
namespace content {
-class ChildGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager {
+class ChildGpuMemoryBufferManager
+ : public gpu::ClientGpuMemoryBufferManager::Delegate {
public:
explicit ChildGpuMemoryBufferManager(ThreadSafeSender* sender);
~ChildGpuMemoryBufferManager() override;
- // Overridden from gpu::GpuMemoryBufferManager:
- std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
+ gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() {
+ return gpu_memory_buffer_manager_.get();
+ }
+
+ private:
+ // gpu::ClientGpuMemoryBufferManager::Delegate:
+ gfx::GpuMemoryBufferHandle GetSharedMemoryHandle(
const gfx::Size& size,
gfx::BufferFormat format,
- gfx::BufferUsage usage,
- gpu::SurfaceHandle surface_handle) override;
- std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
- const gfx::GpuMemoryBufferHandle& handle,
- const gfx::Size& size,
- gfx::BufferFormat format) override;
- gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer(
- ClientBuffer buffer) override;
- void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer,
- const gpu::SyncToken& sync_token) override;
+ gfx::BufferUsage usage) override;
+ void DeletedGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
+ const gpu::SyncToken& token) override;
- private:
scoped_refptr<ThreadSafeSender> sender_;
+ scoped_refptr<gpu::ClientGpuMemoryBufferManager> gpu_memory_buffer_manager_;
DISALLOW_COPY_AND_ASSIGN(ChildGpuMemoryBufferManager);
};
« no previous file with comments | « no previous file | content/child/child_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698