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 #ifndef MOJO_GLES2_CONTROL_THUNKS_IMPL_H_ | 5 #ifndef MOJO_GLES2_CONTROL_THUNKS_IMPL_H_ |
6 #define MOJO_GLES2_CONTROL_THUNKS_IMPL_H_ | 6 #define MOJO_GLES2_CONTROL_THUNKS_IMPL_H_ |
7 | 7 |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/threading/thread_local.h" | 10 #include "base/threading/thread_local.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 void DestroyContext(MGLContext context); | 38 void DestroyContext(MGLContext context); |
39 | 39 |
40 void MakeCurrent(MGLContext context); | 40 void MakeCurrent(MGLContext context); |
41 | 41 |
42 MGLContext GetCurrentContext(); | 42 MGLContext GetCurrentContext(); |
43 | 43 |
44 void ResizeSurface(uint32_t width, uint32_t height); | 44 void ResizeSurface(uint32_t width, uint32_t height); |
45 | 45 |
46 void SwapBuffers(); | 46 void SwapBuffers(); |
47 | 47 |
| 48 MGLMustCastToProperFunctionPointerType GetProcAddress(const char* procname); |
| 49 |
48 void* GetGLES2Interface(MGLContext context); | 50 void* GetGLES2Interface(MGLContext context); |
49 | 51 |
50 void SignalSyncPoint(uint32_t sync_point, | 52 void SignalSyncPoint(uint32_t sync_point, |
51 MGLSignalSyncPointCallback callback, | 53 MGLSignalSyncPointCallback callback, |
52 void* closure); | 54 void* closure); |
53 | 55 |
54 gpu::gles2::GLES2Interface* CurrentGLES2Interface(); | 56 gpu::gles2::GLES2Interface* CurrentGLES2Interface(); |
55 | 57 |
56 private: | 58 private: |
57 friend base::DefaultLazyInstanceTraits<gles2::ControlThunksImpl>; | 59 friend base::DefaultLazyInstanceTraits<gles2::ControlThunksImpl>; |
58 ControlThunksImpl(); | 60 ControlThunksImpl(); |
59 ~ControlThunksImpl(); | 61 ~ControlThunksImpl(); |
60 | 62 |
61 base::ThreadLocalPointer<GLES2Context> current_context_tls_; | 63 base::ThreadLocalPointer<GLES2Context> current_context_tls_; |
62 | 64 |
63 DISALLOW_COPY_AND_ASSIGN(ControlThunksImpl); | 65 DISALLOW_COPY_AND_ASSIGN(ControlThunksImpl); |
64 }; | 66 }; |
65 | 67 |
66 } // namespace gles2 | 68 } // namespace gles2 |
67 | 69 |
68 #endif // MOJO_GLES2_CONTROL_THUNKS_IMPL_H_ | 70 #endif // MOJO_GLES2_CONTROL_THUNKS_IMPL_H_ |
OLD | NEW |