| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 // This file implements the MGL and MGL onscreen entry points exposed to the | 5 // This file implements the MGL and MGL onscreen entry points exposed to the |
| 6 // Mojo application by the shell. | 6 // Mojo application by the shell. |
| 7 | 7 |
| 8 #include "mojo/gles2/control_thunks_impl.h" | 8 #include "mojo/gles2/control_thunks_impl.h" |
| 9 #include "mojo/public/c/gpu/MGL/mgl.h" | 9 #include "mojo/public/c/gpu/MGL/mgl.h" |
| 10 #include "mojo/public/c/gpu/MGL/mgl_onscreen.h" | 10 #include "mojo/public/c/gpu/MGL/mgl_onscreen.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 void MGLMakeCurrent(MGLContext context) { | 29 void MGLMakeCurrent(MGLContext context) { |
| 30 return gles2::ControlThunksImpl::Get()->MakeCurrent(context); | 30 return gles2::ControlThunksImpl::Get()->MakeCurrent(context); |
| 31 } | 31 } |
| 32 | 32 |
| 33 MGLContext MGLGetCurrentContext() { | 33 MGLContext MGLGetCurrentContext() { |
| 34 return gles2::ControlThunksImpl::Get()->GetCurrentContext(); | 34 return gles2::ControlThunksImpl::Get()->GetCurrentContext(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void MGLEcho(MGLEchoCallback callback, void* closure) { |
| 38 gles2::ControlThunksImpl::Get()->Echo(callback, closure); |
| 39 } |
| 40 |
| 37 void MGLSignalSyncPoint(uint32_t sync_point, | 41 void MGLSignalSyncPoint(uint32_t sync_point, |
| 38 MGLSignalSyncPointCallback callback, | 42 MGLSignalSyncPointCallback callback, |
| 39 void* closure) { | 43 void* closure) { |
| 40 gles2::ControlThunksImpl::Get()->SignalSyncPoint(sync_point, callback, | 44 gles2::ControlThunksImpl::Get()->SignalSyncPoint(sync_point, callback, |
| 41 closure); | 45 closure); |
| 42 } | 46 } |
| 43 | 47 |
| 44 void MGLResizeSurface(uint32_t width, uint32_t height) { | 48 void MGLResizeSurface(uint32_t width, uint32_t height) { |
| 45 return gles2::ControlThunksImpl::Get()->ResizeSurface(width, height); | 49 return gles2::ControlThunksImpl::Get()->ResizeSurface(width, height); |
| 46 } | 50 } |
| 47 | 51 |
| 48 void MGLSwapBuffers() { | 52 void MGLSwapBuffers() { |
| 49 return gles2::ControlThunksImpl::Get()->SwapBuffers(); | 53 return gles2::ControlThunksImpl::Get()->SwapBuffers(); |
| 50 } | 54 } |
| 51 | 55 |
| 52 MGLMustCastToProperFunctionPointerType MGLGetProcAddress(const char* procname) { | 56 MGLMustCastToProperFunctionPointerType MGLGetProcAddress(const char* procname) { |
| 53 return gles2::ControlThunksImpl::Get()->GetProcAddress(procname); | 57 return gles2::ControlThunksImpl::Get()->GetProcAddress(procname); |
| 54 } | 58 } |
| 55 | 59 |
| 56 } // extern "C" | 60 } // extern "C" |
| OLD | NEW |