| 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 29 matching lines...) Expand all Loading... |
| 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 void* GetGLES2Interface(MojoGLES2Context context); | 48 void* GetGLES2Interface(MojoGLES2Context context); |
| 49 | 49 |
| 50 void SignalSyncPoint(MojoGLES2Context context, | 50 void SignalSyncPoint(uint32_t sync_point, |
| 51 uint32_t sync_point, | |
| 52 MojoGLES2SignalSyncPointCallback callback, | 51 MojoGLES2SignalSyncPointCallback callback, |
| 53 void* closure); | 52 void* closure); |
| 54 | 53 |
| 55 gpu::gles2::GLES2Interface* CurrentGLES2Interface(); | 54 gpu::gles2::GLES2Interface* CurrentGLES2Interface(); |
| 56 | 55 |
| 57 private: | 56 private: |
| 58 friend base::DefaultLazyInstanceTraits<gles2::ControlThunksImpl>; | 57 friend base::DefaultLazyInstanceTraits<gles2::ControlThunksImpl>; |
| 59 ControlThunksImpl(); | 58 ControlThunksImpl(); |
| 60 ~ControlThunksImpl(); | 59 ~ControlThunksImpl(); |
| 61 | 60 |
| 62 base::ThreadLocalPointer<GLES2Context> current_context_tls_; | 61 base::ThreadLocalPointer<GLES2Context> current_context_tls_; |
| 63 | 62 |
| 64 DISALLOW_COPY_AND_ASSIGN(ControlThunksImpl); | 63 DISALLOW_COPY_AND_ASSIGN(ControlThunksImpl); |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 } // namespace gles2 | 66 } // namespace gles2 |
| 68 | 67 |
| 69 #endif // MOJO_GLES2_CONTROL_THUNKS_IMPL_H_ | 68 #endif // MOJO_GLES2_CONTROL_THUNKS_IMPL_H_ |
| OLD | NEW |