| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/public/platform/native/gles2_thunks.h" | 5 #include "mojo/public/platform/native/gles2_thunks.h" |
| 6 | 6 |
| 7 #include <assert.h> | 7 #include <assert.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 void MojoGLES2SwapBuffers() { | 37 void MojoGLES2SwapBuffers() { |
| 38 assert(g_control_thunks.GLES2SwapBuffers); | 38 assert(g_control_thunks.GLES2SwapBuffers); |
| 39 g_control_thunks.GLES2SwapBuffers(); | 39 g_control_thunks.GLES2SwapBuffers(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void* MojoGLES2GetGLES2Interface(MojoGLES2Context context) { | 42 void* MojoGLES2GetGLES2Interface(MojoGLES2Context context) { |
| 43 assert(g_control_thunks.GLES2GetGLES2Interface); | 43 assert(g_control_thunks.GLES2GetGLES2Interface); |
| 44 return g_control_thunks.GLES2GetGLES2Interface(context); | 44 return g_control_thunks.GLES2GetGLES2Interface(context); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void MojoGLES2SignalSyncPoint(MojoGLES2Context context, | |
| 48 uint32_t sync_point, | |
| 49 MojoGLES2SignalSyncPointCallback callback, | |
| 50 void* closure) { | |
| 51 assert(g_control_thunks.GLES2SignalSyncPoint); | |
| 52 g_control_thunks.GLES2SignalSyncPoint(context, sync_point, callback, closure); | |
| 53 } | |
| 54 | |
| 55 extern "C" THUNK_EXPORT size_t MojoSetGLES2ControlThunks( | 47 extern "C" THUNK_EXPORT size_t MojoSetGLES2ControlThunks( |
| 56 const MojoGLES2ControlThunks* gles2_control_thunks) { | 48 const MojoGLES2ControlThunks* gles2_control_thunks) { |
| 57 if (gles2_control_thunks->size >= sizeof(g_control_thunks)) | 49 if (gles2_control_thunks->size >= sizeof(g_control_thunks)) |
| 58 g_control_thunks = *gles2_control_thunks; | 50 g_control_thunks = *gles2_control_thunks; |
| 59 return sizeof(g_control_thunks); | 51 return sizeof(g_control_thunks); |
| 60 } | 52 } |
| 61 | 53 |
| 62 } // extern "C" | 54 } // extern "C" |
| OLD | NEW |