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"
13 class ChildGpuMemoryBufferManager
: public gpu::GpuMemoryBufferManager
{
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::GpuMemoryBuffer::Format format
,
22 gfx::GpuMemoryBuffer::Usage usage
) override
;
23 gfx::GpuMemoryBuffer
* GpuMemoryBufferFromClientBuffer(
24 ClientBuffer buffer
) override
;
25 void SetDestructionSyncPoint(gfx::GpuMemoryBuffer
* buffer
,
26 uint32 sync_point
) override
;
29 scoped_refptr
<ThreadSafeSender
> sender_
;
31 DISALLOW_COPY_AND_ASSIGN(ChildGpuMemoryBufferManager
);
34 } // namespace content
36 #endif // CONTENT_CHILD_CHILD_GPU_MEMORY_BUFFER_MANAGER_H_