OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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. |
| 4 |
| 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_IMAGE_FACTORY_H_ |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_IMAGE_FACTORY_H_ |
| 7 |
| 8 #include <GLES2/gl2.h> |
| 9 |
| 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "gles2_impl_export.h" |
| 13 |
| 14 namespace gpu { |
| 15 class GpuMemoryBuffer; |
| 16 |
| 17 namespace gles2 { |
| 18 |
| 19 class GLES2_IMPL_EXPORT ImageFactory |
| 20 : public base::RefCountedThreadSafe<ImageFactory> { |
| 21 public: |
| 22 virtual ~ImageFactory() {} |
| 23 |
| 24 // Create a GpuMemoryBuffer and makes it available to the |
| 25 // service side by inserting it to the ImageManager. |
| 26 virtual scoped_ptr<GpuMemoryBuffer> CreateGpuMemoryBuffer( |
| 27 int width, int height, GLenum internalformat, unsigned* image_id) = 0; |
| 28 virtual void DeleteGpuMemoryBuffer(unsigned image_id) = 0; |
| 29 private: |
| 30 friend class base::RefCountedThreadSafe<ImageFactory>; |
| 31 }; |
| 32 |
| 33 } // namespace gles2 |
| 34 } // namespace gpu |
| 35 |
| 36 #endif // GPU_COMMAND_BUFFER_CLIENT_IMAGE_FACTORY_H_ |
OLD | NEW |