Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(704)

Side by Side Diff: ui/gl/gl_wgl_api_implementation.cc

Issue 1061733002: Remove windows/mac/ios specific code from //ui (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix default try set Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gl/gl_wgl_api_implementation.h ('k') | ui/gl/gpu_switching_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 #include "ui/gl/gl_wgl_api_implementation.h"
6 #include "ui/gl/gl_implementation.h"
7
8 namespace gfx {
9
10 RealWGLApi* g_real_wgl;
11
12 void InitializeStaticGLBindingsWGL() {
13 g_driver_wgl.InitializeStaticBindings();
14 if (!g_real_wgl) {
15 g_real_wgl = new RealWGLApi();
16 }
17 g_real_wgl->Initialize(&g_driver_wgl);
18 g_current_wgl_context = g_real_wgl;
19 }
20
21 void InitializeDebugGLBindingsWGL() {
22 g_driver_wgl.InitializeDebugBindings();
23 }
24
25 void ClearGLBindingsWGL() {
26 if (g_real_wgl) {
27 delete g_real_wgl;
28 g_real_wgl = NULL;
29 }
30 g_current_wgl_context = NULL;
31 g_driver_wgl.ClearBindings();
32 }
33
34 WGLApi::WGLApi() {
35 }
36
37 WGLApi::~WGLApi() {
38 }
39
40 WGLApiBase::WGLApiBase()
41 : driver_(NULL) {
42 }
43
44 WGLApiBase::~WGLApiBase() {
45 }
46
47 void WGLApiBase::InitializeBase(DriverWGL* driver) {
48 driver_ = driver;
49 }
50
51 RealWGLApi::RealWGLApi() {
52 }
53
54 RealWGLApi::~RealWGLApi() {
55 }
56
57 void RealWGLApi::Initialize(DriverWGL* driver) {
58 InitializeBase(driver);
59 }
60
61 TraceWGLApi::~TraceWGLApi() {
62 }
63
64 bool GetGLWindowSystemBindingInfoWGL(GLWindowSystemBindingInfo* info) {
65 const char* extensions = wglGetExtensionsStringEXT();
66 *info = GLWindowSystemBindingInfo();
67 if (extensions)
68 info->extensions = extensions;
69 return true;
70 }
71
72 } // namespace gfx
73
74
OLDNEW
« no previous file with comments | « ui/gl/gl_wgl_api_implementation.h ('k') | ui/gl/gpu_switching_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698