Fix search results being clipped in app list.
[chromium-blink-merge.git] / ui / gl / gl_wgl_api_implementation.cc
blob3b92d980b352903c6120792af7dc1c3288636008
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.
5 #include "ui/gl/gl_wgl_api_implementation.h"
6 #include "ui/gl/gl_implementation.h"
8 namespace gfx {
10 RealWGLApi* g_real_wgl;
12 void InitializeStaticGLBindingsWGL() {
13 g_driver_wgl.InitializeStaticBindings();
14 if (!g_real_wgl) {
15 g_real_wgl = new RealWGLApi();
17 g_real_wgl->Initialize(&g_driver_wgl);
18 g_current_wgl_context = g_real_wgl;
21 void InitializeDebugGLBindingsWGL() {
22 g_driver_wgl.InitializeDebugBindings();
25 void ClearGLBindingsWGL() {
26 if (g_real_wgl) {
27 delete g_real_wgl;
28 g_real_wgl = NULL;
30 g_current_wgl_context = NULL;
31 g_driver_wgl.ClearBindings();
34 WGLApi::WGLApi() {
37 WGLApi::~WGLApi() {
40 WGLApiBase::WGLApiBase()
41 : driver_(NULL) {
44 WGLApiBase::~WGLApiBase() {
47 void WGLApiBase::InitializeBase(DriverWGL* driver) {
48 driver_ = driver;
51 RealWGLApi::RealWGLApi() {
54 RealWGLApi::~RealWGLApi() {
57 void RealWGLApi::Initialize(DriverWGL* driver) {
58 InitializeBase(driver);
61 TraceWGLApi::~TraceWGLApi() {
64 bool GetGLWindowSystemBindingInfoWGL(GLWindowSystemBindingInfo* info) {
65 const char* extensions = wglGetExtensionsStringEXT();
66 *info = GLWindowSystemBindingInfo();
67 if (extensions)
68 info->extensions = extensions;
69 return true;
72 } // namespace gfx