Home | History | Annotate | Download | only in gl
      1 // Copyright (c) 2012 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 #ifndef UI_GL_GL_INTERFACE_H_
      6 #define UI_GL_GL_INTERFACE_H_
      7 
      8 // This file implements glue to a GL interface so we can mock it for unit
      9 // testing. It has to be Desktop GL, not GLES2 as it is used to test the service
     10 // side code.
     11 
     12 #include "ui/gl/gl_bindings.h"
     13 
     14 namespace gfx {
     15 
     16 class GL_EXPORT GLInterface {
     17  public:
     18   virtual ~GLInterface() {}
     19 
     20   static void SetGLInterface(GLInterface* gl_interface);
     21 
     22   static GLInterface* GetGLInterface();
     23 
     24   // Include the auto-generated part of this class. We split this because
     25   // it means we can easily edit the non-auto generated parts right here in
     26   // this file instead of having to edit some template or the code generator.
     27   #include "gl_interface_autogen_gl.h"
     28 
     29  private:
     30   static GLInterface* interface_;
     31 };
     32 
     33 }  // namespace gfx
     34 
     35 #endif  // UI_GL_GL_INTERFACE_H_
     36