Lines Matching refs:Key
83 uint32_t keyMask = Key::BLEND_MASK | Key::OPACITY_MASK | Key::ALPHA_MASK | Key::TEXTURE_MASK in primeCache()
84 | Key::ROUNDED_CORNERS_MASK; in primeCache()
90 Key shaderKey; in primeCache()
93 if (tex != Key::TEXTURE_OFF && tex != Key::TEXTURE_EXT && tex != Key::TEXTURE_2D) { in primeCache()
104 Key shaderKey; in primeCache()
105 shaderKey.set(Key::BLEND_MASK | Key::OUTPUT_TRANSFORM_MATRIX_MASK | Key::INPUT_TF_MASK | in primeCache()
106 Key::OUTPUT_TF_MASK, in primeCache()
107 Key::BLEND_PREMULT | Key::OUTPUT_TRANSFORM_MATRIX_ON | Key::INPUT_TF_SRGB | in primeCache()
108 Key::OUTPUT_TF_SRGB); in primeCache()
110 shaderKey.set(Key::OPACITY_MASK, in primeCache()
111 (i & 1) ? Key::OPACITY_OPAQUE : Key::OPACITY_TRANSLUCENT); in primeCache()
112 shaderKey.set(Key::ALPHA_MASK, (i & 2) ? Key::ALPHA_LT_ONE : Key::ALPHA_EQ_ONE); in primeCache()
115 shaderKey.set(Key::ROUNDED_CORNERS_MASK, in primeCache()
116 (i & 4) ? Key::ROUNDED_CORNERS_ON : Key::ROUNDED_CORNERS_OFF); in primeCache()
119 shaderKey.set(Key::TEXTURE_MASK, (i & 8) ? Key::TEXTURE_EXT : Key::TEXTURE_OFF); in primeCache()
132 ProgramCache::Key ProgramCache::computeKey(const Description& description) { in computeKey()
133 Key needs; in computeKey()
134 needs.set(Key::TEXTURE_MASK, in computeKey()
136 ? Key::TEXTURE_OFF in computeKey()
138 ? Key::TEXTURE_EXT in computeKey()
140 ? Key::TEXTURE_2D in computeKey()
141 : Key::TEXTURE_OFF) in computeKey()
142 .set(Key::ALPHA_MASK, (description.color.a < 1) ? Key::ALPHA_LT_ONE : Key::ALPHA_EQ_ONE) in computeKey()
143 .set(Key::BLEND_MASK, in computeKey()
144 description.isPremultipliedAlpha ? Key::BLEND_PREMULT : Key::BLEND_NORMAL) in computeKey()
145 .set(Key::OPACITY_MASK, in computeKey()
146 description.isOpaque ? Key::OPACITY_OPAQUE : Key::OPACITY_TRANSLUCENT) in computeKey()
147 .set(Key::Key::INPUT_TRANSFORM_MATRIX_MASK, in computeKey()
149 ? Key::INPUT_TRANSFORM_MATRIX_ON : Key::INPUT_TRANSFORM_MATRIX_OFF) in computeKey()
150 .set(Key::Key::OUTPUT_TRANSFORM_MATRIX_MASK, in computeKey()
152 ? Key::OUTPUT_TRANSFORM_MATRIX_ON in computeKey()
153 : Key::OUTPUT_TRANSFORM_MATRIX_OFF) in computeKey()
154 .set(Key::ROUNDED_CORNERS_MASK, in computeKey()
156 ? Key::ROUNDED_CORNERS_ON : Key::ROUNDED_CORNERS_OFF); in computeKey()
158 needs.set(Key::Y410_BT2020_MASK, in computeKey()
159 description.isY410BT2020 ? Key::Y410_BT2020_ON : Key::Y410_BT2020_OFF); in computeKey()
166 needs.set(Key::INPUT_TF_MASK, Key::INPUT_TF_LINEAR); in computeKey()
169 needs.set(Key::INPUT_TF_MASK, Key::INPUT_TF_SRGB); in computeKey()
172 needs.set(Key::INPUT_TF_MASK, Key::INPUT_TF_ST2084); in computeKey()
175 needs.set(Key::INPUT_TF_MASK, Key::INPUT_TF_HLG); in computeKey()
182 needs.set(Key::OUTPUT_TF_MASK, Key::OUTPUT_TF_LINEAR); in computeKey()
185 needs.set(Key::OUTPUT_TF_MASK, Key::OUTPUT_TF_SRGB); in computeKey()
188 needs.set(Key::OUTPUT_TF_MASK, Key::OUTPUT_TF_ST2084); in computeKey()
191 needs.set(Key::OUTPUT_TF_MASK, Key::OUTPUT_TF_HLG); in computeKey()
201 void ProgramCache::generateEOTF(Formatter& fs, const Key& needs) { in generateEOTF()
203 case Key::INPUT_TF_SRGB: in generateEOTF()
218 case Key::INPUT_TF_ST2084: in generateEOTF()
233 case Key::INPUT_TF_HLG: in generateEOTF()
259 void ProgramCache::generateToneMappingProcess(Formatter& fs, const Key& needs) { in generateToneMappingProcess()
262 case Key::INPUT_TF_ST2084: in generateToneMappingProcess()
269 case Key::INPUT_TF_HLG: in generateToneMappingProcess()
290 case Key::INPUT_TF_ST2084: in generateToneMappingProcess()
291 case Key::INPUT_TF_HLG: in generateToneMappingProcess()
293 case Key::OUTPUT_TF_HLG: in generateToneMappingProcess()
303 case Key::OUTPUT_TF_ST2084: in generateToneMappingProcess()
420 case Key::OUTPUT_TF_ST2084: in generateToneMappingProcess()
427 case Key::OUTPUT_TF_HLG: in generateToneMappingProcess()
445 void ProgramCache::generateOOTF(Formatter& fs, const ProgramCache::Key& needs) { in generateOOTF()
464 void ProgramCache::generateOETF(Formatter& fs, const Key& needs) { in generateOETF()
466 case Key::OUTPUT_TF_SRGB: in generateOETF()
482 case Key::OUTPUT_TF_ST2084: in generateOETF()
497 case Key::OUTPUT_TF_HLG: in generateOETF()
523 String8 ProgramCache::generateVertexShader(const Key& needs) { in generateVertexShader()
547 String8 ProgramCache::generateFragmentShader(const Key& needs) { in generateFragmentShader()
549 if (needs.getTextureTarget() == Key::TEXTURE_EXT) { in generateFragmentShader()
556 if (needs.getTextureTarget() == Key::TEXTURE_EXT) { in generateFragmentShader()
559 } else if (needs.getTextureTarget() == Key::TEXTURE_2D) { in generateFragmentShader()
588 if (needs.getTextureTarget() == Key::TEXTURE_OFF || needs.hasAlpha()) { in generateFragmentShader()
698 std::unique_ptr<Program> ProgramCache::generateProgram(const Key& needs) { in generateProgram()
712 Key needs(computeKey(description)); in useProgram()