Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / child / child_gpu_memory_buffer_manager.h
blob8df46cf5bf798db97d1e8e575712b1f9899fdb24
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_CHILD_CHILD_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define CONTENT_CHILD_CHILD_GPU_MEMORY_BUFFER_MANAGER_H_
8 #include "content/child/thread_safe_sender.h"
9 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
11 namespace content {
13 class ChildGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager {
14 public:
15 explicit ChildGpuMemoryBufferManager(ThreadSafeSender* sender);
16 ~ChildGpuMemoryBufferManager() override;
18 // Overridden from gpu::GpuMemoryBufferManager:
19 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
20 const gfx::Size& size,
21 gfx::BufferFormat format,
22 gfx::BufferUsage usage) override;
23 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer(
24 ClientBuffer buffer) override;
25 void SetDestructionSyncPoint(gfx::GpuMemoryBuffer* buffer,
26 uint32 sync_point) override;
28 private:
29 scoped_refptr<ThreadSafeSender> sender_;
31 DISALLOW_COPY_AND_ASSIGN(ChildGpuMemoryBufferManager);
34 } // namespace content
36 #endif // CONTENT_CHILD_CHILD_GPU_MEMORY_BUFFER_MANAGER_H_