| 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 GrCaps_DEFINED | 8 #ifndef GrCaps_DEFINED |
| 9 #define GrCaps_DEFINED | 9 #define GrCaps_DEFINED |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 struct) : | 45 struct) : |
| 46 """ | 46 """ |
| 47 If the smallest representable value greater than 1 is 1 + e, then fB
its will | 47 If the smallest representable value greater than 1 is 1 + e, then fB
its will |
| 48 contain floor(log2(e)), and every value in the range [2^fLogRangeLow
, | 48 contain floor(log2(e)), and every value in the range [2^fLogRangeLow
, |
| 49 2^fLogRangeHigh] can be represented to at least one part in 2^fBits. | 49 2^fLogRangeHigh] can be represented to at least one part in 2^fBits. |
| 50 """ | 50 """ |
| 51 */ | 51 */ |
| 52 int fBits; | 52 int fBits; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 GrShaderCaps() { | 55 GrShaderCaps(); |
| 56 this->reset(); | |
| 57 } | |
| 58 virtual ~GrShaderCaps() {} | |
| 59 GrShaderCaps(const GrShaderCaps& other) : INHERITED() { | |
| 60 *this = other; | |
| 61 } | |
| 62 GrShaderCaps& operator= (const GrShaderCaps&); | |
| 63 | 56 |
| 64 virtual void reset(); | |
| 65 virtual SkString dump() const; | 57 virtual SkString dump() const; |
| 66 | 58 |
| 67 bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; } | 59 bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; } |
| 68 bool geometryShaderSupport() const { return fGeometryShaderSupport; } | 60 bool geometryShaderSupport() const { return fGeometryShaderSupport; } |
| 69 bool pathRenderingSupport() const { return fPathRenderingSupport; } | 61 bool pathRenderingSupport() const { return fPathRenderingSupport; } |
| 70 bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; } | 62 bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; } |
| 71 bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport;
} | 63 bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport;
} |
| 72 bool mixedSamplesSupport() const { return fMixedSamplesSupport; } | 64 bool mixedSamplesSupport() const { return fMixedSamplesSupport; } |
| 73 | 65 |
| 74 /** | 66 /** |
| (...skipping 29 matching lines...) Expand all Loading... |
| 104 typedef SkRefCnt INHERITED; | 96 typedef SkRefCnt INHERITED; |
| 105 }; | 97 }; |
| 106 | 98 |
| 107 /** | 99 /** |
| 108 * Represents the capabilities of a GrContext. | 100 * Represents the capabilities of a GrContext. |
| 109 */ | 101 */ |
| 110 class GrCaps : public SkRefCnt { | 102 class GrCaps : public SkRefCnt { |
| 111 public: | 103 public: |
| 112 SK_DECLARE_INST_COUNT(GrCaps) | 104 SK_DECLARE_INST_COUNT(GrCaps) |
| 113 | 105 |
| 114 GrCaps() { | 106 GrCaps(); |
| 115 fShaderCaps.reset(NULL); | |
| 116 this->reset(); | |
| 117 } | |
| 118 GrCaps(const GrCaps& other) : INHERITED() { | |
| 119 *this = other; | |
| 120 } | |
| 121 virtual ~GrCaps() {} | |
| 122 GrCaps& operator= (const GrCaps&); | |
| 123 | 107 |
| 124 virtual void reset(); | |
| 125 virtual SkString dump() const; | 108 virtual SkString dump() const; |
| 126 | 109 |
| 127 GrShaderCaps* shaderCaps() const { return fShaderCaps; } | 110 GrShaderCaps* shaderCaps() const { return fShaderCaps; } |
| 128 | 111 |
| 129 bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } | 112 bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } |
| 130 /** To avoid as-yet-unnecessary complexity we don't allow any partial suppor
t of MIP Maps (e.g. | 113 /** To avoid as-yet-unnecessary complexity we don't allow any partial suppor
t of MIP Maps (e.g. |
| 131 only for POT textures) */ | 114 only for POT textures) */ |
| 132 bool mipMapSupport() const { return fMipMapSupport; } | 115 bool mipMapSupport() const { return fMipMapSupport; } |
| 133 bool twoSidedStencilSupport() const { return fTwoSidedStencilSupport; } | 116 bool twoSidedStencilSupport() const { return fTwoSidedStencilSupport; } |
| 134 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } | 117 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 211 |
| 229 // The first entry for each config is without msaa and the second is with. | 212 // The first entry for each config is without msaa and the second is with. |
| 230 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 213 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
| 231 bool fConfigTextureSupport[kGrPixelConfigCnt]; | 214 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
| 232 | 215 |
| 233 private: | 216 private: |
| 234 typedef SkRefCnt INHERITED; | 217 typedef SkRefCnt INHERITED; |
| 235 }; | 218 }; |
| 236 | 219 |
| 237 #endif | 220 #endif |
| OLD | NEW |