OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 #ifndef GrDrawTargetCaps_DEFINED | 8 #ifndef GrCaps_DEFINED |
9 #define GrDrawTargetCaps_DEFINED | 9 #define GrCaps_DEFINED |
10 | 10 |
11 #include "GrTypes.h" | 11 #include "GrTypes.h" |
12 #include "GrTypesPriv.h" | 12 #include "GrTypesPriv.h" |
13 #include "GrShaderVar.h" | 13 #include "GrShaderVar.h" |
14 #include "SkRefCnt.h" | 14 #include "SkRefCnt.h" |
15 #include "SkString.h" | 15 #include "SkString.h" |
16 | 16 |
17 class GrShaderCaps : public SkRefCnt { | 17 class GrShaderCaps : public SkRefCnt { |
18 public: | 18 public: |
19 SK_DECLARE_INST_COUNT(GrShaderCaps) | 19 SK_DECLARE_INST_COUNT(GrShaderCaps) |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 bool fDualSourceBlendingSupport : 1; | 96 bool fDualSourceBlendingSupport : 1; |
97 | 97 |
98 bool fShaderPrecisionVaries; | 98 bool fShaderPrecisionVaries; |
99 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; | 99 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; |
100 | 100 |
101 private: | 101 private: |
102 typedef SkRefCnt INHERITED; | 102 typedef SkRefCnt INHERITED; |
103 }; | 103 }; |
104 | 104 |
105 /** | 105 /** |
106 * Represents the draw target capabilities. | 106 * Represents the capabilities of a GrContext. |
107 */ | 107 */ |
108 class GrDrawTargetCaps : public SkRefCnt { | 108 class GrCaps : public SkRefCnt { |
109 public: | 109 public: |
110 SK_DECLARE_INST_COUNT(GrDrawTargetCaps) | 110 SK_DECLARE_INST_COUNT(GrCaps) |
111 | 111 |
112 GrDrawTargetCaps() { | 112 GrCaps() { |
113 fShaderCaps.reset(NULL); | 113 fShaderCaps.reset(NULL); |
114 this->reset(); | 114 this->reset(); |
115 } | 115 } |
116 GrDrawTargetCaps(const GrDrawTargetCaps& other) : INHERITED() { | 116 GrCaps(const GrCaps& other) : INHERITED() { |
117 *this = other; | 117 *this = other; |
118 } | 118 } |
119 virtual ~GrDrawTargetCaps() {} | 119 virtual ~GrCaps() {} |
120 GrDrawTargetCaps& operator= (const GrDrawTargetCaps&); | 120 GrCaps& operator= (const GrCaps&); |
121 | 121 |
122 virtual void reset(); | 122 virtual void reset(); |
123 virtual SkString dump() const; | 123 virtual SkString dump() const; |
124 | 124 |
125 GrShaderCaps* shaderCaps() const { return fShaderCaps; } | 125 GrShaderCaps* shaderCaps() const { return fShaderCaps; } |
126 | 126 |
127 bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } | 127 bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } |
128 /** To avoid as-yet-unnecessary complexity we don't allow any partial suppor
t of MIP Maps (e.g. | 128 /** To avoid as-yet-unnecessary complexity we don't allow any partial suppor
t of MIP Maps (e.g. |
129 only for POT textures) */ | 129 only for POT textures) */ |
130 bool mipMapSupport() const { return fMipMapSupport; } | 130 bool mipMapSupport() const { return fMipMapSupport; } |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 226 |
227 // The first entry for each config is without msaa and the second is with. | 227 // The first entry for each config is without msaa and the second is with. |
228 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 228 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
229 bool fConfigTextureSupport[kGrPixelConfigCnt]; | 229 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
230 | 230 |
231 private: | 231 private: |
232 typedef SkRefCnt INHERITED; | 232 typedef SkRefCnt INHERITED; |
233 }; | 233 }; |
234 | 234 |
235 #endif | 235 #endif |
OLD | NEW |