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

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

Issue 2014223002: Follow-up fixes to changing namespace gfx to gl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 6 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_context_stub_with_extensions.h ('k') | ui/gl/gl_fence_egl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file implements the GLContextWGL and PbufferGLContext classes. 5 // This file implements the GLContextWGL and PbufferGLContext classes.
6 6
7 #include "ui/gl/gl_context_wgl.h" 7 #include "ui/gl/gl_context_wgl.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 return true; 144 return true;
145 } 145 }
146 146
147 void* GLContextWGL::GetHandle() { 147 void* GLContextWGL::GetHandle() {
148 return context_; 148 return context_;
149 } 149 }
150 150
151 void GLContextWGL::OnSetSwapInterval(int interval) { 151 void GLContextWGL::OnSetSwapInterval(int interval) {
152 DCHECK(IsCurrent(nullptr)); 152 DCHECK(IsCurrent(nullptr));
153 if (gl::g_driver_wgl.ext.b_WGL_EXT_swap_control) { 153 if (g_driver_wgl.ext.b_WGL_EXT_swap_control) {
154 wglSwapIntervalEXT(interval); 154 wglSwapIntervalEXT(interval);
155 } else { 155 } else {
156 LOG(WARNING) << 156 LOG(WARNING) <<
157 "Could not disable vsync: driver does not " 157 "Could not disable vsync: driver does not "
158 "support WGL_EXT_swap_control"; 158 "support WGL_EXT_swap_control";
159 } 159 }
160 } 160 }
161 161
162 std::string GLContextWGL::GetExtensions() { 162 std::string GLContextWGL::GetExtensions() {
163 const char* extensions = nullptr; 163 const char* extensions = nullptr;
164 if (g_driver_wgl.fn.wglGetExtensionsStringARBFn) 164 if (g_driver_wgl.fn.wglGetExtensionsStringARBFn)
165 extensions = wglGetExtensionsStringARB(GLSurfaceWGL::GetDisplayDC()); 165 extensions = wglGetExtensionsStringARB(GLSurfaceWGL::GetDisplayDC());
166 else if (g_driver_wgl.fn.wglGetExtensionsStringEXTFn) 166 else if (g_driver_wgl.fn.wglGetExtensionsStringEXTFn)
167 extensions = wglGetExtensionsStringEXT(); 167 extensions = wglGetExtensionsStringEXT();
168 168
169 if (extensions) 169 if (extensions)
170 return GLContext::GetExtensions() + " " + extensions; 170 return GLContext::GetExtensions() + " " + extensions;
171 171
172 return GLContext::GetExtensions(); 172 return GLContext::GetExtensions();
173 } 173 }
174 174
175 GLContextWGL::~GLContextWGL() { 175 GLContextWGL::~GLContextWGL() {
176 Destroy(); 176 Destroy();
177 } 177 }
178 178
179 } // namespace gl 179 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_context_stub_with_extensions.h ('k') | ui/gl/gl_fence_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698