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

Side by Side Diff: ui/gl/gl_context_osmesa.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_glx.cc ('k') | ui/gl/gl_context_stub.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 #include "ui/gl/gl_context_osmesa.h" 5 #include "ui/gl/gl_context_osmesa.h"
6 6
7 #include <GL/osmesa.h> 7 #include <GL/osmesa.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if (!InitializeExtensionBindings()) { 69 if (!InitializeExtensionBindings()) {
70 ReleaseCurrent(surface); 70 ReleaseCurrent(surface);
71 return false; 71 return false;
72 } 72 }
73 73
74 if (!surface->OnMakeCurrent(this)) { 74 if (!surface->OnMakeCurrent(this)) {
75 LOG(ERROR) << "Could not make current."; 75 LOG(ERROR) << "Could not make current.";
76 return false; 76 return false;
77 } 77 }
78 78
79 SetRealGLApi();
79 return true; 80 return true;
80 } 81 }
81 82
82 void GLContextOSMesa::ReleaseCurrent(GLSurface* surface) { 83 void GLContextOSMesa::ReleaseCurrent(GLSurface* surface) {
83 if (!IsCurrent(surface)) 84 if (!IsCurrent(surface))
84 return; 85 return;
85 86
86 SetCurrent(NULL, NULL); 87 SetCurrent(NULL, NULL);
87 OSMesaMakeCurrent(NULL, NULL, GL_UNSIGNED_BYTE, 0, 0); 88 OSMesaMakeCurrent(NULL, NULL, GL_UNSIGNED_BYTE, 0, 0);
88 } 89 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 void GLContextOSMesa::SetSwapInterval(int interval) { 122 void GLContextOSMesa::SetSwapInterval(int interval) {
122 DCHECK(IsCurrent(NULL)); 123 DCHECK(IsCurrent(NULL));
123 DLOG(INFO) << "GLContextOSMesa::SetSwapInterval is ignored."; 124 DLOG(INFO) << "GLContextOSMesa::SetSwapInterval is ignored.";
124 } 125 }
125 126
126 GLContextOSMesa::~GLContextOSMesa() { 127 GLContextOSMesa::~GLContextOSMesa() {
127 Destroy(); 128 Destroy();
128 } 129 }
129 130
130 } // namespace gfx 131 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_context_glx.cc ('k') | ui/gl/gl_context_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698