| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ | 5 #ifndef UI_GL_IO_SURFACE_SUPPORT_MAC_H_ |
| 6 #define UI_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ | 6 #define UI_GL_IO_SURFACE_SUPPORT_MAC_H_ |
| 7 | 7 |
| 8 #include <CoreFoundation/CoreFoundation.h> | 8 #include <CoreFoundation/CoreFoundation.h> |
| 9 #include <CoreVideo/CoreVideo.h> | 9 #include <CoreVideo/CoreVideo.h> |
| 10 #include <mach/mach.h> | 10 #include <mach/mach.h> |
| 11 #include <OpenGL/OpenGL.h> | 11 #include <OpenGL/OpenGL.h> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "ui/surface/surface_export.h" | 14 #include "ui/gl/gl_export.h" |
| 15 | 15 |
| 16 // This Mac OS X-specific class provides dynamically-linked access to | 16 // This Mac OS X-specific class provides dynamically-linked access to |
| 17 // IOSurface.framework, which is only available on 10.6 and later. | 17 // IOSurface.framework, which is only available on 10.6 and later. |
| 18 // Since Chromium is built on 10.5 we must dynamically look up all of | 18 // Since Chromium is built on 10.5 we must dynamically look up all of |
| 19 // the entry points we need in this framework. | 19 // the entry points we need in this framework. |
| 20 | 20 |
| 21 // See IOSurface/IOSurfaceAPI.h and OpenGL/CGLIOSurface.h on 10.6 for | 21 // See IOSurface/IOSurfaceAPI.h and OpenGL/CGLIOSurface.h on 10.6 for |
| 22 // documentation of the fields and methods of this class. | 22 // documentation of the fields and methods of this class. |
| 23 | 23 |
| 24 class SURFACE_EXPORT IOSurfaceSupport { | 24 class GL_EXPORT IOSurfaceSupport { |
| 25 public: | 25 public: |
| 26 // Returns an instance of the IOSurfaceSupport class if the | 26 // Returns an instance of the IOSurfaceSupport class if the |
| 27 // operating system supports it, NULL otherwise. It is safe to call | 27 // operating system supports it, NULL otherwise. It is safe to call |
| 28 // this multiple times. | 28 // this multiple times. |
| 29 static IOSurfaceSupport* Initialize(); | 29 static IOSurfaceSupport* Initialize(); |
| 30 | 30 |
| 31 virtual CFStringRef GetKIOSurfaceWidth() = 0; | 31 virtual CFStringRef GetKIOSurfaceWidth() = 0; |
| 32 virtual CFStringRef GetKIOSurfaceHeight() = 0; | 32 virtual CFStringRef GetKIOSurfaceHeight() = 0; |
| 33 virtual CFStringRef GetKIOSurfaceBytesPerElement() = 0; | 33 virtual CFStringRef GetKIOSurfaceBytesPerElement() = 0; |
| 34 virtual CFStringRef GetKIOSurfaceIsGlobal() = 0; | 34 virtual CFStringRef GetKIOSurfaceIsGlobal() = 0; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 63 virtual CFTypeRef CVPixelBufferGetIOSurface( | 63 virtual CFTypeRef CVPixelBufferGetIOSurface( |
| 64 CVPixelBufferRef pixel_buffer) = 0; | 64 CVPixelBufferRef pixel_buffer) = 0; |
| 65 | 65 |
| 66 protected: | 66 protected: |
| 67 IOSurfaceSupport(); | 67 IOSurfaceSupport(); |
| 68 virtual ~IOSurfaceSupport(); | 68 virtual ~IOSurfaceSupport(); |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(IOSurfaceSupport); | 70 DISALLOW_COPY_AND_ASSIGN(IOSurfaceSupport); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 #endif // UI_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ | 73 #endif // UI_GL_IO_SURFACE_SUPPORT_MAC_H_ |
| OLD | NEW |