Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / common / gpu / client / gpu_memory_buffer_factory_host.h
blob9e616e27e650ada5805626dc1ea8d94d54c73fb7
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_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_
8 #include "base/callback.h"
9 #include "content/common/content_export.h"
11 namespace gfx {
12 class Size;
13 struct GpuMemoryBufferHandle;
16 namespace content {
18 class CONTENT_EXPORT GpuMemoryBufferFactoryHost {
19 public:
20 typedef base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)>
21 CreateGpuMemoryBufferCallback;
23 static GpuMemoryBufferFactoryHost* GetInstance();
25 virtual void CreateGpuMemoryBuffer(
26 const gfx::GpuMemoryBufferHandle& handle,
27 const gfx::Size& size,
28 unsigned internalformat,
29 unsigned usage,
30 const CreateGpuMemoryBufferCallback& callback) = 0;
31 virtual void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
32 int32 sync_point) = 0;
34 protected:
35 GpuMemoryBufferFactoryHost();
36 virtual ~GpuMemoryBufferFactoryHost();
39 } // namespace content
41 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_