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

Side by Side Diff: third_party/mojo/src/mojo/public/c/gpu/MGL/mgl.h

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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 2015 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 // Note: This header should be compilable as C.
6
7 #ifndef THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_C_GPU_MGL_MGL_H_
8 #define THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_C_GPU_MGL_MGL_H_
9
10 #include <stdint.h>
11
12 #include "third_party/mojo/src/mojo/public/c/gpu/MGL/mgl_types.h"
13 #include "third_party/mojo/src/mojo/public/c/system/types.h"
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 typedef uint32_t MGLOpenGLAPIVersion;
20
21 // OpenGL ES 2.0
22 #define MGL_API_VERSION_GLES2 ((MGLOpenGLAPIVersion)1)
23 // OpenGL ES 3.0
24 #define MGL_API_VERSION_GLES3 ((MGLOpenGLAPIVersion)2)
25 // OpenGL ES 3.1
26 #define MGL_API_VERSION_GLES31 ((MGLOpenGLAPIVersion)3)
27
28 #define MGL_NO_CONTEXT ((MGLContext)0)
29
30 struct MojoAsyncWaiter;
31
32 // Creates a context at the given API version or returns MGL_NO_CONTEXT.
33 // |command_buffer_handle| must be a command buffer message pipe handle from
34 // the Gpu service or another source. The callee takes ownership of this
35 // handle.
36 // |share_group| specifies the share group to create this context in.
37 // If this is MGL_NO_CONTEXT a new share group will be created for this context.
38 // |lost_callback|, if not null, will be invoked when the context is lost.
39 // |async_waiter| must be a pointer to a MojoAsyncWaiter implementation that is
40 // usable from any thread the returned MGLContext will be used from
41 // for as long as the context exists.
42 MGLContext MGLCreateContext(MGLOpenGLAPIVersion version,
43 MojoHandle command_buffer_handle,
44 MGLContext share_group,
45 MGLContextLostCallback lost_callback,
46 void* lost_callback_closure,
47 const struct MojoAsyncWaiter* async_waiter);
48 void MGLDestroyContext(MGLContext context);
49
50 // Makes |context| the current MGLContext for the calling thread. Calling with
51 // MGL_NO_CONTEXT clears the current context.
52 void MGLMakeCurrent(MGLContext context);
53
54 // Returns the currently bound context for the calling thread or MGL_NO_CONTEXT
55 // if there is none.
56 MGLContext MGLGetCurrentContext(void);
57
58 #ifdef __cplusplus
59 } // extern "C"
60 #endif
61
62 #endif // THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_C_GPU_MGL_MGL_H_
OLDNEW
« no previous file with comments | « third_party/mojo/src/mojo/public/c/gpu/KHR/khrplatform.h ('k') | third_party/mojo/src/mojo/public/c/gpu/MGL/mgl_onscreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698