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

Side by Side Diff: mojo/public/platform/native/gles2_thunks.c

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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 #include "mojo/public/platform/native/gles2_thunks.h"
6
7 #include <assert.h>
8
9 #include "mojo/public/platform/native/thunk_export.h"
10
11 static struct MojoGLES2ControlThunks g_control_thunks = {0};
12
13 MojoGLES2Context MojoGLES2CreateContext(
14 MojoHandle handle,
15 MojoGLES2ContextLost lost_callback,
16 void* closure,
17 const struct MojoAsyncWaiter* async_waiter) {
18 assert(g_control_thunks.GLES2CreateContext);
19 return g_control_thunks.GLES2CreateContext(handle, lost_callback, closure,
20 async_waiter);
21 }
22
23 void MojoGLES2DestroyContext(MojoGLES2Context context) {
24 assert(g_control_thunks.GLES2DestroyContext);
25 g_control_thunks.GLES2DestroyContext(context);
26 }
27
28 void MojoGLES2MakeCurrent(MojoGLES2Context context) {
29 assert(g_control_thunks.GLES2MakeCurrent);
30 g_control_thunks.GLES2MakeCurrent(context);
31 }
32
33 void MojoGLES2SwapBuffers() {
34 assert(g_control_thunks.GLES2SwapBuffers);
35 g_control_thunks.GLES2SwapBuffers();
36 }
37
38 void* MojoGLES2GetGLES2Interface(MojoGLES2Context context) {
39 assert(g_control_thunks.GLES2GetGLES2Interface);
40 return g_control_thunks.GLES2GetGLES2Interface(context);
41 }
42
43 void MojoGLES2SignalSyncPoint(MojoGLES2Context context,
44 uint32_t sync_point,
45 MojoGLES2SignalSyncPointCallback callback,
46 void* closure) {
47 assert(g_control_thunks.GLES2SignalSyncPoint);
48 g_control_thunks.GLES2SignalSyncPoint(context, sync_point, callback, closure);
49 }
50
51 THUNK_EXPORT size_t MojoSetGLES2ControlThunks(
52 const struct MojoGLES2ControlThunks* gles2_control_thunks) {
53 if (gles2_control_thunks->size >= sizeof(g_control_thunks))
54 g_control_thunks = *gles2_control_thunks;
55 return sizeof(g_control_thunks);
56 }
OLDNEW
« no previous file with comments | « mojo/public/platform/native/gles2_impl_thunks.c ('k') | mojo/public/platform/native/mgl_echo_thunks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698