Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(883)

Side by Side Diff: content/common/gpu/surface_handle_types_mac.h

Issue 347653005: Make cross-process CALayers work on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@image_transport_1
Patch Set: Incorporate review feedback Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698