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

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

Issue 8381001: Split GL binding init into core and extension part (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added dependencies to gl.gyp. Used NOT_REACHED() instead of DCHECK(0). Created 9 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/gfx/gl/gl_context.h ('k') | ui/gfx/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) 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/logging.h" 8 #include "base/logging.h"
9 #include "base/threading/thread_local.h" 9 #include "base/threading/thread_local.h"
10 #include "ui/gfx/gl/gl_context.h" 10 #include "ui/gfx/gl/gl_context.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 void GLContext::SetCurrent(GLContext* context, GLSurface* surface) { 75 void GLContext::SetCurrent(GLContext* context, GLSurface* surface) {
76 current_context_.Set(context); 76 current_context_.Set(context);
77 GLSurface::SetCurrent(surface); 77 GLSurface::SetCurrent(surface);
78 } 78 }
79 79
80 bool GLContext::WasAllocatedUsingARBRobustness() { 80 bool GLContext::WasAllocatedUsingARBRobustness() {
81 return false; 81 return false;
82 } 82 }
83 83
84 bool GLContext::InitializeExtensionBindings() {
85 DCHECK(IsCurrent(NULL));
86 static bool initialized = false;
87 if (initialized)
88 return initialized;
89 initialized = InitializeGLExtensionBindings(GetGLImplementation(), this);
90 if (!initialized)
91 LOG(ERROR) << "Could not initialize extension bindings.";
92 return initialized;
93 }
94
84 } // namespace gfx 95 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_context.h ('k') | ui/gfx/gl/gl_context_cgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698