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

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

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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_bindings_skia_in_process.cc ('k') | ui/gl/gl_context_cgl.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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/threading/thread_local.h" 10 #include "base/threading/thread_local.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 std::string delimited_name(name); 99 std::string delimited_name(name);
100 delimited_name += " "; 100 delimited_name += " ";
101 101
102 return extensions.find(delimited_name) != std::string::npos; 102 return extensions.find(delimited_name) != std::string::npos;
103 } 103 }
104 104
105 const GLVersionInfo* GLContext::GetVersionInfo() { 105 const GLVersionInfo* GLContext::GetVersionInfo() {
106 if(!version_info_) { 106 if(!version_info_) {
107 std::string version = GetGLVersion(); 107 std::string version = GetGLVersion();
108 std::string renderer = GetGLRenderer(); 108 std::string renderer = GetGLRenderer();
109 version_info_ = 109 version_info_ = scoped_ptr<GLVersionInfo>(
110 make_scoped_ptr(new GLVersionInfo(version.c_str(), renderer.c_str())); 110 new GLVersionInfo(version.c_str(), renderer.c_str()));
111 } 111 }
112 return version_info_.get(); 112 return version_info_.get();
113 } 113 }
114 114
115 GLShareGroup* GLContext::share_group() { 115 GLShareGroup* GLContext::share_group() {
116 return share_group_.get(); 116 return share_group_.get();
117 } 117 }
118 118
119 bool GLContext::LosesAllContextsOnContextLost() { 119 bool GLContext::LosesAllContextsOnContextLost() {
120 switch (GetGLImplementation()) { 120 switch (GetGLImplementation()) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 : GLContext(share_group) {} 213 : GLContext(share_group) {}
214 214
215 GLContextReal::~GLContextReal() {} 215 GLContextReal::~GLContextReal() {}
216 216
217 void GLContextReal::SetCurrent(GLSurface* surface) { 217 void GLContextReal::SetCurrent(GLSurface* surface) {
218 GLContext::SetCurrent(surface); 218 GLContext::SetCurrent(surface);
219 current_real_context_.Pointer()->Set(surface ? this : NULL); 219 current_real_context_.Pointer()->Set(surface ? this : NULL);
220 } 220 }
221 221
222 } // namespace gfx 222 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_bindings_skia_in_process.cc ('k') | ui/gl/gl_context_cgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698