| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ | 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/common/content_export.h" |
| 10 #include "ui/gfx/geometry/size.h" | 11 #include "ui/gfx/geometry/size.h" |
| 11 #include "ui/gfx/gpu_memory_buffer.h" | 12 #include "ui/gfx/gpu_memory_buffer.h" |
| 12 | 13 |
| 13 namespace gfx { | 14 namespace gfx { |
| 14 class GLImage; | 15 class GLImage; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace gpu { | 18 namespace gpu { |
| 18 class ImageFactory; | 19 class ImageFactory; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace content { | 22 namespace content { |
| 22 | 23 |
| 23 class GpuMemoryBufferFactory { | 24 class CONTENT_EXPORT GpuMemoryBufferFactory { |
| 24 public: | 25 public: |
| 25 GpuMemoryBufferFactory() {} | 26 GpuMemoryBufferFactory() {} |
| 26 virtual ~GpuMemoryBufferFactory() {} | 27 virtual ~GpuMemoryBufferFactory() {} |
| 27 | 28 |
| 28 // Creates a new platform specific factory instance. | 29 // Creates a new platform specific factory instance. |
| 29 static scoped_ptr<GpuMemoryBufferFactory> Create(); | 30 static scoped_ptr<GpuMemoryBufferFactory> Create(); |
| 30 | 31 |
| 31 // Creates a GPU memory buffer instance of |type|. A valid handle is | 32 // Creates a GPU memory buffer instance of |type|. A valid handle is |
| 32 // returned on success. | 33 // returned on success. |
| 33 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer( | 34 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 46 // Type-checking downcast routine. | 47 // Type-checking downcast routine. |
| 47 virtual gpu::ImageFactory* AsImageFactory() = 0; | 48 virtual gpu::ImageFactory* AsImageFactory() = 0; |
| 48 | 49 |
| 49 private: | 50 private: |
| 50 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory); | 51 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory); |
| 51 }; | 52 }; |
| 52 | 53 |
| 53 } // namespace content | 54 } // namespace content |
| 54 | 55 |
| 55 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ | 56 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ |
| OLD | NEW |