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

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

Issue 14864002: Fix GL extension printing on core profiles. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 GrGLContext_DEFINED 9 #ifndef GrGLContext_DEFINED
10 #define GrGLContext_DEFINED 10 #define GrGLContext_DEFINED
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 */ 42 */
43 bool initialize(const GrGLInterface* interface); 43 bool initialize(const GrGLInterface* interface);
44 bool isInitialized() const; 44 bool isInitialized() const;
45 45
46 GrGLBinding binding() const { return fBindingInUse; } 46 GrGLBinding binding() const { return fBindingInUse; }
47 GrGLVersion version() const { return fGLVersion; } 47 GrGLVersion version() const { return fGLVersion; }
48 GrGLSLGeneration glslGeneration() const { return fGLSLGeneration; } 48 GrGLSLGeneration glslGeneration() const { return fGLSLGeneration; }
49 GrGLVendor vendor() const { return fVendor; } 49 GrGLVendor vendor() const { return fVendor; }
50 const GrGLCaps* caps() const { return fGLCaps.get(); } 50 const GrGLCaps* caps() const { return fGLCaps.get(); }
51 GrGLCaps* caps() { return fGLCaps; } 51 GrGLCaps* caps() { return fGLCaps; }
52 const GrGLExtensions& extensions() const { return fExtensions; }
52 53
53 /** 54 /**
54 * Checks for extension support using a cached copy of the GL_EXTENSIONS 55 * Shortcut for extensions().has(ext);
55 * string.
56 */ 56 */
57 bool hasExtension(const char* ext) const { 57 bool hasExtension(const char* ext) const {
58 if (!this->isInitialized()) { 58 if (!this->isInitialized()) {
59 return false; 59 return false;
60 } 60 }
61 return fExtensions.has(ext); 61 return fExtensions.has(ext);
62 } 62 }
63 63
64 /** 64 /**
65 * Reset the information 65 * Reset the information
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 GrGLContextInfo& info() { return fInfo; } 117 GrGLContextInfo& info() { return fInfo; }
118 118
119 private: 119 private:
120 void reset(); 120 void reset();
121 121
122 const GrGLInterface* fInterface; 122 const GrGLInterface* fInterface;
123 GrGLContextInfo fInfo; 123 GrGLContextInfo fInfo;
124 }; 124 };
125 125
126 #endif 126 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698