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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 struct KeyHeader { | 72 struct KeyHeader { |
73 // Set by GrGLShaderBuilder if there are effects that read the fragment
position. Otherwise, | 73 // Set by GrGLShaderBuilder if there are effects that read the fragment
position. Otherwise, |
74 // 0. | 74 // 0. |
75 uint8_t fFragPosKey; | 75 uint8_t fFragPosKey; |
76 // Set to uniquely idenitify any swizzling of the shader's output color(
s). | 76 // Set to uniquely idenitify any swizzling of the shader's output color(
s). |
77 uint8_t fOutputSwizzle; | 77 uint8_t fOutputSwizzle; |
78 uint8_t fSnapVerticesToPixelCenters; | 78 uint8_t fSnapVerticesToPixelCenters; |
79 int8_t fColorEffectCnt; | 79 int8_t fColorEffectCnt; |
80 int8_t fCoverageEffectCnt; | 80 int8_t fCoverageEffectCnt; |
81 uint8_t fIgnoresCoverage; | 81 uint8_t fIgnoresCoverage; |
| 82 // Set to uniquely identify the pipeline's sample pattern, or 0 if the s
hader does not use |
| 83 // sample locations. (We can probably get away with 8 bits here if we ev
er need more space.) |
| 84 uint16_t fSamplePatternKey; |
82 }; | 85 }; |
83 | 86 |
84 int numColorEffects() const { | 87 int numColorEffects() const { |
85 return this->header().fColorEffectCnt; | 88 return this->header().fColorEffectCnt; |
86 } | 89 } |
87 | 90 |
88 int numCoverageEffects() const { | 91 int numCoverageEffects() const { |
89 return this->header().fCoverageEffectCnt; | 92 return this->header().fCoverageEffectCnt; |
90 } | 93 } |
91 | 94 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 }; | 139 }; |
137 | 140 |
138 SkSTArray<kPreAllocSize, uint8_t, true>& key() { return fKey; } | 141 SkSTArray<kPreAllocSize, uint8_t, true>& key() { return fKey; } |
139 const SkSTArray<kPreAllocSize, uint8_t, true>& key() const { return fKey; } | 142 const SkSTArray<kPreAllocSize, uint8_t, true>& key() const { return fKey; } |
140 | 143 |
141 private: | 144 private: |
142 SkSTArray<kPreAllocSize, uint8_t, true> fKey; | 145 SkSTArray<kPreAllocSize, uint8_t, true> fKey; |
143 }; | 146 }; |
144 | 147 |
145 #endif | 148 #endif |
OLD | NEW |