Chromium Code Reviews| Index: content/common/gpu/gpu_memory_buffer_factory.h |
| diff --git a/content/common/gpu/gpu_memory_buffer_factory.h b/content/common/gpu/gpu_memory_buffer_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3e2d8f46fb2f8feea60e4ac9e6ff5cd4c5da9315 |
| --- /dev/null |
| +++ b/content/common/gpu/gpu_memory_buffer_factory.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ |
| +#define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ |
| + |
| +#include "ui/gfx/geometry/size.h" |
| +#include "ui/gfx/gpu_memory_buffer.h" |
| + |
| +namespace content { |
| + |
| +class GpuMemoryBufferFactory { |
| + public: |
| + static void Initialize(); |
|
alexst (slow to review)
2014/06/18 22:54:49
What if we made this static GpuMemoryBufferFactory
reveman
2014/06/19 14:56:12
Not a fan of the idea of another struct with ifdef
|
| + static bool CreateGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle, |
| + const gfx::Size& size, |
| + unsigned internalformat, |
| + unsigned usage); |
| + static void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle); |
| + static bool RequestAccessToGpuMemoryBuffer( |
| + const gfx::GpuMemoryBufferHandle& handle, |
| + int client_id); |
| + |
| + protected: |
| + virtual ~GpuMemoryBufferFactory() {} |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ |