OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_GPU_SURFACE_HANDLE_TYPES_MAC_H_ |
| 6 #define CONTENT_COMMON_GPU_SURFACE_HANDLE_TYPES_MAC_H_ |
| 7 |
| 8 #include <OpenGL/CGLIOSurface.h> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "ui/base/cocoa/remote_layer_api.h" |
| 12 |
| 13 namespace content { |
| 14 |
| 15 // The surface handle passed between the GPU and browser process may refer to |
| 16 // an IOSurface or a CAContext. These helper functions must be used to identify |
| 17 // and translate between the types. |
| 18 enum SurfaceHandleType { |
| 19 kSurfaceHandleTypeInvalid, |
| 20 kSurfaceHandleTypeIOSurface, |
| 21 kSurfaceHandleTypeCAContext, |
| 22 }; |
| 23 |
| 24 SurfaceHandleType GetSurfaceHandleType(uint64 surface_handle); |
| 25 |
| 26 CAContextID CAContextIDFromSurfaceHandle(uint64 surface_handle); |
| 27 IOSurfaceID IOSurfaceIDFromSurfaceHandle(uint64 surface_handle); |
| 28 |
| 29 uint64 SurfaceHandleFromIOSurfaceID(IOSurfaceID io_surface_id); |
| 30 uint64 SurfaceHandleFromCAContextID(CAContextID ca_context_id); |
| 31 |
| 32 } // namespace content |
| 33 |
| 34 #endif // CONTENT_COMMON_GPU_HANDLE_TYPES_MAC_H_ |
OLD | NEW |