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/gles2/gles2.h" | 9 #include "mojo/public/c/gles2/gles2.h" |
10 #include "mojo/public/c/gpu/MGL/mgl.h" | 10 #include "mojo/public/c/gpu/MGL/mgl.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 } | 28 } |
29 | 29 |
30 void MGLMakeCurrent(MGLContext context) { | 30 void MGLMakeCurrent(MGLContext context) { |
31 return gles2::ControlThunksImpl::Get()->MakeCurrent(context); | 31 return gles2::ControlThunksImpl::Get()->MakeCurrent(context); |
32 } | 32 } |
33 | 33 |
34 MGLContext MGLGetCurrentContext() { | 34 MGLContext MGLGetCurrentContext() { |
35 return gles2::ControlThunksImpl::Get()->GetCurrentContext(); | 35 return gles2::ControlThunksImpl::Get()->GetCurrentContext(); |
36 } | 36 } |
37 | 37 |
| 38 void MGLSignalSyncPoint(uint32_t sync_point, |
| 39 MGLSignalSyncPointCallback callback, |
| 40 void* closure) { |
| 41 gles2::ControlThunksImpl::Get()->SignalSyncPoint(sync_point, callback, |
| 42 closure); |
| 43 } |
| 44 |
38 void MGLResizeSurface(uint32_t width, uint32_t height) { | 45 void MGLResizeSurface(uint32_t width, uint32_t height) { |
39 return gles2::ControlThunksImpl::Get()->ResizeSurface(width, height); | 46 return gles2::ControlThunksImpl::Get()->ResizeSurface(width, height); |
40 } | 47 } |
41 | 48 |
42 void MGLSwapBuffers() { | 49 void MGLSwapBuffers() { |
43 return gles2::ControlThunksImpl::Get()->SwapBuffers(); | 50 return gles2::ControlThunksImpl::Get()->SwapBuffers(); |
44 } | 51 } |
45 | 52 |
46 } // extern "C" | 53 } // extern "C" |
OLD | NEW |