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

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

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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
« no previous file with comments | « mojo/public/platform/native/gles2_thunks.h ('k') | mojo/public/platform/native/system_thunks.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 extern "C" {
12
13 static MojoGLES2ControlThunks g_control_thunks = {0};
14
15 MojoGLES2Context MojoGLES2CreateContext(MojoHandle handle,
16 MojoGLES2ContextLost lost_callback,
17 void* closure,
18 const MojoAsyncWaiter* async_waiter) {
19 assert(g_control_thunks.GLES2CreateContext);
20 return g_control_thunks.GLES2CreateContext(
21 handle, lost_callback, closure, async_waiter);
22 }
23
24 void MojoGLES2DestroyContext(MojoGLES2Context context) {
25 assert(g_control_thunks.GLES2DestroyContext);
26 g_control_thunks.GLES2DestroyContext(context);
27 }
28
29 void MojoGLES2MakeCurrent(MojoGLES2Context context) {
30 assert(g_control_thunks.GLES2MakeCurrent);
31 g_control_thunks.GLES2MakeCurrent(context);
32 }
33
34 void MojoGLES2SwapBuffers() {
35 assert(g_control_thunks.GLES2SwapBuffers);
36 g_control_thunks.GLES2SwapBuffers();
37 }
38
39 void* MojoGLES2GetGLES2Interface(MojoGLES2Context context) {
40 assert(g_control_thunks.GLES2GetGLES2Interface);
41 return g_control_thunks.GLES2GetGLES2Interface(context);
42 }
43
44 void* MojoGLES2GetContextSupport(MojoGLES2Context context) {
45 assert(g_control_thunks.GLES2GetContextSupport);
46 return g_control_thunks.GLES2GetContextSupport(context);
47 }
48
49 extern "C" THUNK_EXPORT size_t MojoSetGLES2ControlThunks(
50 const MojoGLES2ControlThunks* gles2_control_thunks) {
51 if (gles2_control_thunks->size >= sizeof(g_control_thunks))
52 g_control_thunks = *gles2_control_thunks;
53 return sizeof(g_control_thunks);
54 }
55
56 } // extern "C"
OLDNEW
« no previous file with comments | « mojo/public/platform/native/gles2_thunks.h ('k') | mojo/public/platform/native/system_thunks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698