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

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

Issue 8742022: Relands the following. First attempt was reverted because it broke (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/gfx/compositor/test_web_graphics_context_3d.cc ('k') | ui/gfx/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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 std::string delimited_name(name); 62 std::string delimited_name(name);
63 delimited_name += " "; 63 delimited_name += " ";
64 64
65 return extensions.find(delimited_name) != std::string::npos; 65 return extensions.find(delimited_name) != std::string::npos;
66 } 66 }
67 67
68 GLShareGroup* GLContext::share_group() { 68 GLShareGroup* GLContext::share_group() {
69 return share_group_.get(); 69 return share_group_.get();
70 } 70 }
71 71
72 bool GLContext::LosesAllContextsOnContextLost() 72 bool GLContext::LosesAllContextsOnContextLost() {
73 {
74 switch (GetGLImplementation()) { 73 switch (GetGLImplementation()) {
75 case kGLImplementationDesktopGL: 74 case kGLImplementationDesktopGL:
76 return false; 75 return false;
77 case kGLImplementationEGLGLES2: 76 case kGLImplementationEGLGLES2:
78 return true; 77 return true;
79 case kGLImplementationOSMesaGL: 78 case kGLImplementationOSMesaGL:
80 return false; 79 return false;
81 case kGLImplementationMockGL: 80 case kGLImplementationMockGL:
82 return false; 81 return false;
83 default: 82 default:
(...skipping 20 matching lines...) Expand all
104 static bool initialized = false; 103 static bool initialized = false;
105 if (initialized) 104 if (initialized)
106 return initialized; 105 return initialized;
107 initialized = InitializeGLExtensionBindings(GetGLImplementation(), this); 106 initialized = InitializeGLExtensionBindings(GetGLImplementation(), this);
108 if (!initialized) 107 if (!initialized)
109 LOG(ERROR) << "Could not initialize extension bindings."; 108 LOG(ERROR) << "Could not initialize extension bindings.";
110 return initialized; 109 return initialized;
111 } 110 }
112 111
113 } // namespace gfx 112 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/compositor/test_web_graphics_context_3d.cc ('k') | ui/gfx/gl/gl_context_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698