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

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

Issue 10822029: Use EXT_robustness where available on GLES2 platforms to detect and respond to resets of the graphi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review feedback. Rebuilt and re-tested. Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_egl.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 #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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 GLContext* GLContext::GetCurrent() { 75 GLContext* GLContext::GetCurrent() {
76 return current_context_.Pointer()->Get(); 76 return current_context_.Pointer()->Get();
77 } 77 }
78 78
79 void GLContext::SetCurrent(GLContext* context, GLSurface* surface) { 79 void GLContext::SetCurrent(GLContext* context, GLSurface* surface) {
80 current_context_.Pointer()->Set(context); 80 current_context_.Pointer()->Set(context);
81 GLSurface::SetCurrent(surface); 81 GLSurface::SetCurrent(surface);
82 } 82 }
83 83
84 bool GLContext::WasAllocatedUsingARBRobustness() { 84 bool GLContext::WasAllocatedUsingRobustnessExtension() {
85 return false; 85 return false;
86 } 86 }
87 87
88 bool GLContext::InitializeExtensionBindings() { 88 bool GLContext::InitializeExtensionBindings() {
89 DCHECK(IsCurrent(NULL)); 89 DCHECK(IsCurrent(NULL));
90 static bool initialized = false; 90 static bool initialized = false;
91 if (initialized) 91 if (initialized)
92 return initialized; 92 return initialized;
93 initialized = InitializeGLExtensionBindings(GetGLImplementation(), this); 93 initialized = InitializeGLExtensionBindings(GetGLImplementation(), this);
94 if (!initialized) 94 if (!initialized)
95 LOG(ERROR) << "Could not initialize extension bindings."; 95 LOG(ERROR) << "Could not initialize extension bindings.";
96 return initialized; 96 return initialized;
97 } 97 }
98 98
99 } // namespace gfx 99 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698