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: src/gpu/gl/mac/SkNativeGLContext_mac.cpp

Issue 12328111: Use glGetStringi to get extensions when available. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 10 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "gl/SkNativeGLContext.h" 8 #include "gl/SkNativeGLContext.h"
9 9
10 SkNativeGLContext::AutoContextRestore::AutoContextRestore() { 10 SkNativeGLContext::AutoContextRestore::AutoContextRestore() {
(...skipping 18 matching lines...) Expand all
29 if (NULL != fContext) { 29 if (NULL != fContext) {
30 CGLReleaseContext(fContext); 30 CGLReleaseContext(fContext);
31 } 31 }
32 } 32 }
33 33
34 const GrGLInterface* SkNativeGLContext::createGLContext() { 34 const GrGLInterface* SkNativeGLContext::createGLContext() {
35 SkASSERT(NULL == fContext); 35 SkASSERT(NULL == fContext);
36 36
37 CGLPixelFormatAttribute attributes[] = { 37 CGLPixelFormatAttribute attributes[] = {
38 #if 0 38 #if 0
39 kCGLPFAOpenGLProfile, kCGLOGLPVersion_3_2_Core, 39 kCGLPFAOpenGLProfile, (CGLPixelFormatAttribute) kCGLOGLPVersion_3_2_Core ,
40 #endif 40 #endif
41 (CGLPixelFormatAttribute)0 41 (CGLPixelFormatAttribute)0
42 }; 42 };
43 CGLPixelFormatObj pixFormat; 43 CGLPixelFormatObj pixFormat;
44 GLint npix; 44 GLint npix;
45 45
46 CGLChoosePixelFormat(attributes, &pixFormat, &npix); 46 CGLChoosePixelFormat(attributes, &pixFormat, &npix);
47 47
48 if (NULL == pixFormat) { 48 if (NULL == pixFormat) {
49 SkDebugf("CGLChoosePixelFormat failed."); 49 SkDebugf("CGLChoosePixelFormat failed.");
(...skipping 16 matching lines...) Expand all
66 this->destroyGLContext(); 66 this->destroyGLContext();
67 return NULL; 67 return NULL;
68 } 68 }
69 69
70 return interface; 70 return interface;
71 } 71 }
72 72
73 void SkNativeGLContext::makeCurrent() const { 73 void SkNativeGLContext::makeCurrent() const {
74 CGLSetCurrentContext(fContext); 74 CGLSetCurrentContext(fContext);
75 } 75 }
OLDNEW
« no previous file with comments | « src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp ('k') | src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698