OLD | NEW |
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 bool isChromium() const { return fIsChromium; } | 58 bool isChromium() const { return fIsChromium; } |
59 const GrGLCaps* caps() const { return fGLCaps.get(); } | 59 const GrGLCaps* caps() const { return fGLCaps.get(); } |
60 GrGLCaps* caps() { return fGLCaps; } | 60 GrGLCaps* caps() { return fGLCaps; } |
61 bool hasExtension(const char* ext) const { | 61 bool hasExtension(const char* ext) const { |
62 if (!this->isInitialized()) { | 62 if (!this->isInitialized()) { |
63 return false; | 63 return false; |
64 } | 64 } |
65 return fInterface->hasExtension(ext); | 65 return fInterface->hasExtension(ext); |
66 } | 66 } |
67 | 67 |
| 68 const GrGLExtensions& extensions() const { return fInterface->fExtensions; } |
| 69 |
68 /** | 70 /** |
69 * Reset the information | 71 * Reset the information |
70 */ | 72 */ |
71 void reset(); | 73 void reset(); |
72 | 74 |
73 protected: | 75 protected: |
74 SkAutoTUnref<const GrGLInterface> fInterface; | 76 SkAutoTUnref<const GrGLInterface> fInterface; |
75 GrGLVersion fGLVersion; | 77 GrGLVersion fGLVersion; |
76 GrGLSLGeneration fGLSLGeneration; | 78 GrGLSLGeneration fGLSLGeneration; |
77 GrGLVendor fVendor; | 79 GrGLVendor fVendor; |
(...skipping 23 matching lines...) Expand all Loading... |
101 return *this; | 103 return *this; |
102 } | 104 } |
103 | 105 |
104 const GrGLInterface* interface() const { return fInterface.get(); } | 106 const GrGLInterface* interface() const { return fInterface.get(); } |
105 | 107 |
106 private: | 108 private: |
107 typedef GrGLContextInfo INHERITED; | 109 typedef GrGLContextInfo INHERITED; |
108 }; | 110 }; |
109 | 111 |
110 #endif | 112 #endif |
OLD | NEW |