| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 UI_GL_GL_IMAGE_IO_SURFACE_H_ | 5 #ifndef UI_GL_GL_IMAGE_IO_SURFACE_H_ |
| 6 #define UI_GL_GL_IMAGE_IO_SURFACE_H_ | 6 #define UI_GL_GL_IMAGE_IO_SURFACE_H_ |
| 7 | 7 |
| 8 #include <IOSurface/IOSurface.h> | 8 #include <IOSurface/IOSurface.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
| 11 #include "base/threading/thread_checker.h" | 11 #include "base/threading/thread_checker.h" |
| 12 #include "ui/gfx/buffer_types.h" | 12 #include "ui/gfx/buffer_types.h" |
| 13 #include "ui/gfx/generic_shared_memory_id.h" | 13 #include "ui/gfx/generic_shared_memory_id.h" |
| 14 #include "ui/gl/gl_image.h" | 14 #include "ui/gl/gl_image.h" |
| 15 | 15 |
| 16 #if defined(__OBJC__) | 16 #if defined(__OBJC__) |
| 17 @class CALayer; | 17 @class CALayer; |
| 18 #else | 18 #else |
| 19 typedef void* CALayer; | 19 typedef void* CALayer; |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 namespace gfx { | 22 namespace gfx { |
| 23 | 23 |
| 24 class GL_EXPORT GLImageIOSurface : public GLImage { | 24 class GL_EXPORT GLImageIOSurface : public gl::GLImage { |
| 25 public: | 25 public: |
| 26 GLImageIOSurface(const Size& size, unsigned internalformat); | 26 GLImageIOSurface(const Size& size, unsigned internalformat); |
| 27 | 27 |
| 28 bool Initialize(IOSurfaceRef io_surface, | 28 bool Initialize(IOSurfaceRef io_surface, |
| 29 GenericSharedMemoryId io_surface_id, | 29 GenericSharedMemoryId io_surface_id, |
| 30 BufferFormat format); | 30 BufferFormat format); |
| 31 | 31 |
| 32 // Overridden from GLImage: | 32 // Overridden from GLImage: |
| 33 void Destroy(bool have_context) override; | 33 void Destroy(bool have_context) override; |
| 34 Size GetSize() override; | 34 Size GetSize() override; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 62 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; | 62 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; |
| 63 GenericSharedMemoryId io_surface_id_; | 63 GenericSharedMemoryId io_surface_id_; |
| 64 base::ThreadChecker thread_checker_; | 64 base::ThreadChecker thread_checker_; |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(GLImageIOSurface); | 66 DISALLOW_COPY_AND_ASSIGN(GLImageIOSurface); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace gfx | 69 } // namespace gfx |
| 70 | 70 |
| 71 #endif // UI_GL_GL_IMAGE_IO_SURFACE_H_ | 71 #endif // UI_GL_GL_IMAGE_IO_SURFACE_H_ |
| OLD | NEW |