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

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

Issue 98643013: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Accommodated changes in content tests Created 6 years, 11 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_osmesa_api_implementation.cc ('k') | ui/gl/gl_surface_wgl.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_surface.h" 5 #include "ui/gl/gl_surface.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 impl = GetNamedGLImplementation(requested_implementation_name); 48 impl = GetNamedGLImplementation(requested_implementation_name);
49 if (std::find(allowed_impls.begin(), 49 if (std::find(allowed_impls.begin(),
50 allowed_impls.end(), 50 allowed_impls.end(),
51 impl) == allowed_impls.end()) { 51 impl) == allowed_impls.end()) {
52 LOG(ERROR) << "Requested GL implementation is not available."; 52 LOG(ERROR) << "Requested GL implementation is not available.";
53 return false; 53 return false;
54 } 54 }
55 } 55 }
56 } 56 }
57 57
58 initialized = InitializeGLBindings(impl) && InitializeOneOffInternal(); 58 initialized = InitializeStaticGLBindings(impl) && InitializeOneOffInternal();
59 if (!initialized && fallback_to_osmesa) { 59 if (!initialized && fallback_to_osmesa) {
60 ClearGLBindings(); 60 ClearGLBindings();
61 initialized = InitializeGLBindings(kGLImplementationOSMesaGL) && 61 initialized = InitializeStaticGLBindings(kGLImplementationOSMesaGL) &&
62 InitializeOneOffInternal(); 62 InitializeOneOffInternal();
63 } 63 }
64 64
65 if (initialized) { 65 if (initialized) {
66 DVLOG(1) << "Using " 66 DVLOG(1) << "Using "
67 << GetGLImplementationName(GetGLImplementation()) 67 << GetGLImplementationName(GetGLImplementation())
68 << " GL implementation."; 68 << " GL implementation.";
69 if (CommandLine::ForCurrentProcess()->HasSwitch( 69 if (CommandLine::ForCurrentProcess()->HasSwitch(
70 switches::kEnableGPUServiceLogging)) 70 switches::kEnableGPUServiceLogging))
71 InitializeDebugGLBindings(); 71 InitializeDebugGLBindings();
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 return surface_->GetFormat(); 257 return surface_->GetFormat();
258 } 258 }
259 259
260 VSyncProvider* GLSurfaceAdapter::GetVSyncProvider() { 260 VSyncProvider* GLSurfaceAdapter::GetVSyncProvider() {
261 return surface_->GetVSyncProvider(); 261 return surface_->GetVSyncProvider();
262 } 262 }
263 263
264 GLSurfaceAdapter::~GLSurfaceAdapter() {} 264 GLSurfaceAdapter::~GLSurfaceAdapter() {}
265 265
266 } // namespace gfx 266 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_osmesa_api_implementation.cc ('k') | ui/gl/gl_surface_wgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698