OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #ifndef GrProgramDesc_DEFINED | 8 #ifndef GrProgramDesc_DEFINED |
9 #define GrProgramDesc_DEFINED | 9 #define GrProgramDesc_DEFINED |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 return false; | 69 return false; |
70 } | 70 } |
71 | 71 |
72 struct KeyHeader { | 72 struct KeyHeader { |
73 uint8_t fFragPosKey; // set by GrGLShaderBuilder i
f there are | 73 uint8_t fFragPosKey; // set by GrGLShaderBuilder i
f there are |
74 // effects that read the frag
ment position. | 74 // effects that read the frag
ment position. |
75 // Otherwise, 0. | 75 // Otherwise, 0. |
76 uint8_t fSnapVerticesToPixelCenters; | 76 uint8_t fSnapVerticesToPixelCenters; |
77 int8_t fColorEffectCnt; | 77 int8_t fColorEffectCnt; |
78 int8_t fCoverageEffectCnt; | 78 int8_t fCoverageEffectCnt; |
| 79 uint8_t fIgnoresCoverage; |
79 }; | 80 }; |
80 GR_STATIC_ASSERT(sizeof(KeyHeader) == 4); | 81 GR_STATIC_ASSERT(sizeof(KeyHeader) == 5); |
81 | 82 |
82 int numColorEffects() const { | 83 int numColorEffects() const { |
83 return this->header().fColorEffectCnt; | 84 return this->header().fColorEffectCnt; |
84 } | 85 } |
85 | 86 |
86 int numCoverageEffects() const { | 87 int numCoverageEffects() const { |
87 return this->header().fCoverageEffectCnt; | 88 return this->header().fCoverageEffectCnt; |
88 } | 89 } |
89 | 90 |
90 int numTotalEffects() const { return this->numColorEffects() + this->numCove
rageEffects(); } | 91 int numTotalEffects() const { return this->numColorEffects() + this->numCove
rageEffects(); } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 }; | 135 }; |
135 | 136 |
136 SkSTArray<kPreAllocSize, uint8_t, true>& key() { return fKey; } | 137 SkSTArray<kPreAllocSize, uint8_t, true>& key() { return fKey; } |
137 const SkSTArray<kPreAllocSize, uint8_t, true>& key() const { return fKey; } | 138 const SkSTArray<kPreAllocSize, uint8_t, true>& key() const { return fKey; } |
138 | 139 |
139 private: | 140 private: |
140 SkSTArray<kPreAllocSize, uint8_t, true> fKey; | 141 SkSTArray<kPreAllocSize, uint8_t, true> fKey; |
141 }; | 142 }; |
142 | 143 |
143 #endif | 144 #endif |
OLD | NEW |