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

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

Issue 11275120: Virtual GL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ui/gl/gl_context_stub.cc ('k') | ui/gl/gl_egl_api_implementation.h » ('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/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if (!InitializeExtensionBindings()) { 85 if (!InitializeExtensionBindings()) {
86 ReleaseCurrent(surface); 86 ReleaseCurrent(surface);
87 return false; 87 return false;
88 } 88 }
89 89
90 if (!surface->OnMakeCurrent(this)) { 90 if (!surface->OnMakeCurrent(this)) {
91 LOG(ERROR) << "Could not make current."; 91 LOG(ERROR) << "Could not make current.";
92 return false; 92 return false;
93 } 93 }
94 94
95 SetRealGLApi();
95 return true; 96 return true;
96 } 97 }
97 98
98 void GLContextWGL::ReleaseCurrent(GLSurface* surface) { 99 void GLContextWGL::ReleaseCurrent(GLSurface* surface) {
99 if (!IsCurrent(surface)) 100 if (!IsCurrent(surface))
100 return; 101 return;
101 102
102 SetCurrent(NULL, NULL); 103 SetCurrent(NULL, NULL);
103 wglMakeCurrent(NULL, NULL); 104 wglMakeCurrent(NULL, NULL);
104 } 105 }
(...skipping 27 matching lines...) Expand all
132 if (gfx::g_driver_wgl.ext.b_WGL_EXT_swap_control) { 133 if (gfx::g_driver_wgl.ext.b_WGL_EXT_swap_control) {
133 wglSwapIntervalEXT(interval); 134 wglSwapIntervalEXT(interval);
134 } else { 135 } else {
135 LOG(WARNING) << 136 LOG(WARNING) <<
136 "Could not disable vsync: driver does not " 137 "Could not disable vsync: driver does not "
137 "support WGL_EXT_swap_control"; 138 "support WGL_EXT_swap_control";
138 } 139 }
139 } 140 }
140 141
141 } // namespace gfx 142 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_context_stub.cc ('k') | ui/gl/gl_egl_api_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698