1 // Copyright 2013 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "mojo/public/gles2/gles2_private.h" 6 7 #include <assert.h> 8 #include <stddef.h> 9 10 static mojo::GLES2Private* g_private = NULL; 11 12 extern "C" { 13 MojoGLES2Initialize()14void MojoGLES2Initialize() { 15 g_private->Initialize(); 16 } 17 MojoGLES2Terminate()18void MojoGLES2Terminate() { 19 g_private->Terminate(); 20 } 21 MojoGLES2MakeCurrent(uint64_t encoded)22void MojoGLES2MakeCurrent(uint64_t encoded) { 23 g_private->MakeCurrent(encoded); 24 } 25 MojoGLES2SwapBuffers()26void MojoGLES2SwapBuffers() { 27 g_private->SwapBuffers(); 28 } 29 30 } // extern "C" 31 32 namespace mojo { 33 ~GLES2Private()34GLES2Private::~GLES2Private() { 35 } 36 Init(GLES2Private * priv)37void GLES2Private::Init(GLES2Private* priv) { 38 assert(!g_private); 39 g_private = priv; 40 } 41 42 } // namespace mojo 43