Home | History | Annotate | Download | only in gles2
      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 
     14 void MojoGLES2Initialize() {
     15   g_private->Initialize();
     16 }
     17 
     18 void MojoGLES2Terminate() {
     19   g_private->Terminate();
     20 }
     21 
     22 void MojoGLES2MakeCurrent(uint64_t encoded) {
     23   g_private->MakeCurrent(encoded);
     24 }
     25 
     26 void MojoGLES2SwapBuffers() {
     27   g_private->SwapBuffers();
     28 }
     29 
     30 }  // extern "C"
     31 
     32 namespace mojo {
     33 
     34 GLES2Private::~GLES2Private() {
     35 }
     36 
     37 void GLES2Private::Init(GLES2Private* priv) {
     38   assert(!g_private);
     39   g_private = priv;
     40 }
     41 
     42 }  // namespace mojo
     43