| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 APP_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ | 5 #ifndef APP_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ |
| 6 #define APP_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ | 6 #define APP_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <CoreFoundation/CoreFoundation.h> | 9 #include <CoreFoundation/CoreFoundation.h> |
| 10 #include <mach/mach.h> | 10 #include <mach/mach.h> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 virtual uint32 IOSurfaceGetID(CFTypeRef io_surface) = 0; | 39 virtual uint32 IOSurfaceGetID(CFTypeRef io_surface) = 0; |
| 40 virtual CFTypeRef IOSurfaceLookup(uint32 io_surface_id) = 0; | 40 virtual CFTypeRef IOSurfaceLookup(uint32 io_surface_id) = 0; |
| 41 | 41 |
| 42 // The following two APIs are more robust and secure, but | 42 // The following two APIs are more robust and secure, but |
| 43 // unfortunately it looks like it will be a lot of work to correctly | 43 // unfortunately it looks like it will be a lot of work to correctly |
| 44 // transmit a mach port from process to process (possibly requiring | 44 // transmit a mach port from process to process (possibly requiring |
| 45 // a side channel for or extension of the Chrome IPC mechanism) | 45 // a side channel for or extension of the Chrome IPC mechanism) |
| 46 virtual mach_port_t IOSurfaceCreateMachPort(CFTypeRef io_surface) = 0; | 46 virtual mach_port_t IOSurfaceCreateMachPort(CFTypeRef io_surface) = 0; |
| 47 virtual CFTypeRef IOSurfaceLookupFromMachPort(mach_port_t port) = 0; | 47 virtual CFTypeRef IOSurfaceLookupFromMachPort(mach_port_t port) = 0; |
| 48 | 48 |
| 49 virtual size_t IOSurfaceGetWidth(CFTypeRef io_surface) = 0; |
| 50 virtual size_t IOSurfaceGetHeight(CFTypeRef io_surface) = 0; |
| 51 |
| 49 virtual CGLError CGLTexImageIOSurface2D(CGLContextObj ctx, | 52 virtual CGLError CGLTexImageIOSurface2D(CGLContextObj ctx, |
| 50 GLenum target, | 53 GLenum target, |
| 51 GLenum internal_format, | 54 GLenum internal_format, |
| 52 GLsizei width, | 55 GLsizei width, |
| 53 GLsizei height, | 56 GLsizei height, |
| 54 GLenum format, | 57 GLenum format, |
| 55 GLenum type, | 58 GLenum type, |
| 56 CFTypeRef io_surface, | 59 CFTypeRef io_surface, |
| 57 GLuint plane) = 0; | 60 GLuint plane) = 0; |
| 58 | 61 |
| 59 protected: | 62 protected: |
| 60 IOSurfaceSupport(); | 63 IOSurfaceSupport(); |
| 61 virtual ~IOSurfaceSupport(); | 64 virtual ~IOSurfaceSupport(); |
| 62 | 65 |
| 63 DISALLOW_COPY_AND_ASSIGN(IOSurfaceSupport); | 66 DISALLOW_COPY_AND_ASSIGN(IOSurfaceSupport); |
| 64 }; | 67 }; |
| 65 | 68 |
| 66 #endif // APP_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ | 69 #endif // APP_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ |
| 67 | 70 |
| OLD | NEW |