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

Side by Side Diff: ui/gl/gl_surface_win.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_surface_wgl.cc ('k') | ui/gl/gl_version_info.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 "ui/gl/gl_surface.h" 5 #include "ui/gl/gl_surface.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 timing_info.rateRefresh.uiNumerator); 76 timing_info.rateRefresh.uiNumerator);
77 callback.Run(timebase, interval); 77 callback.Run(timebase, interval);
78 } 78 }
79 } 79 }
80 80
81 private: 81 private:
82 DISALLOW_COPY_AND_ASSIGN(DWMVSyncProvider); 82 DISALLOW_COPY_AND_ASSIGN(DWMVSyncProvider);
83 }; 83 };
84 84
85 // Helper routine that does one-off initialization like determining the 85 // Helper routine that does one-off initialization like determining the
86 // pixel format and initializing the GL bindings. 86 // pixel format.
87 bool GLSurface::InitializeOneOffInternal() { 87 bool GLSurface::InitializeOneOffInternal() {
88 switch (GetGLImplementation()) { 88 switch (GetGLImplementation()) {
89 case kGLImplementationDesktopGL: 89 case kGLImplementationDesktopGL:
90 if (!GLSurfaceWGL::InitializeOneOff()) { 90 if (!GLSurfaceWGL::InitializeOneOff()) {
91 LOG(ERROR) << "GLSurfaceWGL::InitializeOneOff failed."; 91 LOG(ERROR) << "GLSurfaceWGL::InitializeOneOff failed.";
92 return false; 92 return false;
93 } 93 }
94 break; 94 break;
95 case kGLImplementationEGLGLES2: 95 case kGLImplementationEGLGLES2:
96 if (!GLSurfaceEGL::InitializeOneOff()) { 96 if (!GLSurfaceEGL::InitializeOneOff()) {
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 282 }
283 case kGLImplementationMockGL: 283 case kGLImplementationMockGL:
284 return new GLSurfaceStub; 284 return new GLSurfaceStub;
285 default: 285 default:
286 NOTREACHED(); 286 NOTREACHED();
287 return NULL; 287 return NULL;
288 } 288 }
289 } 289 }
290 290
291 } // namespace gfx 291 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_wgl.cc ('k') | ui/gl/gl_version_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698