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

Side by Side Diff: src/gpu/gl/GrGLContextInfo.h

Issue 12328111: Use glGetStringi to get extensions when available. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | « include/gpu/gl/SkGLContext.h ('k') | src/gpu/gl/GrGLContextInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef GrGLContextInfo_DEFINED 9 #ifndef GrGLContextInfo_DEFINED
10 #define GrGLContextInfo_DEFINED 10 #define GrGLContextInfo_DEFINED
11 11
12 #include "gl/GrGLExtensions.h"
12 #include "gl/GrGLInterface.h" 13 #include "gl/GrGLInterface.h"
13 #include "GrGLCaps.h" 14 #include "GrGLCaps.h"
14 #include "GrGLSL.h" 15 #include "GrGLSL.h"
15 #include "GrGLUtil.h" 16 #include "GrGLUtil.h"
16 17
17 #include "SkString.h" 18 #include "SkString.h"
18 19
19 /** 20 /**
20 * Encapsulates information about an OpenGL context including the GrGLInterface 21 * Encapsulates information about an OpenGL context including the GrGLInterface
21 * used to make GL calls, the OpenGL version, the GrGLBinding type of the 22 * used to make GL calls, the OpenGL version, the GrGLBinding type of the
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 GrGLCaps& caps() { return fGLCaps; } 64 GrGLCaps& caps() { return fGLCaps; }
64 65
65 /** 66 /**
66 * Checks for extension support using a cached copy of the GL_EXTENSIONS 67 * Checks for extension support using a cached copy of the GL_EXTENSIONS
67 * string. 68 * string.
68 */ 69 */
69 bool hasExtension(const char* ext) const { 70 bool hasExtension(const char* ext) const {
70 if (!this->isInitialized()) { 71 if (!this->isInitialized()) {
71 return false; 72 return false;
72 } 73 }
73 return GrGLHasExtensionFromString(ext, fExtensionString.c_str()); 74 return fExtensions.has(ext);
74 } 75 }
75 76
76 private: 77 private:
77 void reset(); 78 void reset();
78 79
79 const GrGLInterface* fInterface; 80 const GrGLInterface* fInterface;
80 GrGLBinding fBindingInUse; 81 GrGLBinding fBindingInUse;
81 GrGLVersion fGLVersion; 82 GrGLVersion fGLVersion;
82 GrGLSLGeneration fGLSLGeneration; 83 GrGLSLGeneration fGLSLGeneration;
83 GrGLVendor fVendor; 84 GrGLVendor fVendor;
84 SkString fExtensionString; 85 GrGLExtensions fExtensions;
85 GrGLCaps fGLCaps; 86 GrGLCaps fGLCaps;
86 }; 87 };
87 88
88 #endif 89 #endif
OLDNEW
« no previous file with comments | « include/gpu/gl/SkGLContext.h ('k') | src/gpu/gl/GrGLContextInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698