Lines Matching refs:Key
91 uint32_t keyMask = Key::BLEND_MASK | Key::OPACITY_MASK | in primeCache()
92 Key::PLANE_ALPHA_MASK | Key::TEXTURE_MASK; in primeCache()
98 Key shaderKey; in primeCache()
101 if (tex != Key::TEXTURE_OFF && in primeCache()
102 tex != Key::TEXTURE_EXT && in primeCache()
103 tex != Key::TEXTURE_2D) { in primeCache()
118 ProgramCache::Key ProgramCache::computeKey(const Description& description) { in computeKey()
119 Key needs; in computeKey()
120 needs.set(Key::TEXTURE_MASK, in computeKey()
121 !description.mTextureEnabled ? Key::TEXTURE_OFF : in computeKey()
122 description.mTexture.getTextureTarget() == GL_TEXTURE_EXTERNAL_OES ? Key::TEXTURE_EXT : in computeKey()
123 description.mTexture.getTextureTarget() == GL_TEXTURE_2D ? Key::TEXTURE_2D : in computeKey()
124 Key::TEXTURE_OFF) in computeKey()
125 .set(Key::PLANE_ALPHA_MASK, in computeKey()
126 (description.mPlaneAlpha < 1) ? Key::PLANE_ALPHA_LT_ONE : Key::PLANE_ALPHA_EQ_ONE) in computeKey()
127 .set(Key::BLEND_MASK, in computeKey()
128 description.mPremultipliedAlpha ? Key::BLEND_PREMULT : Key::BLEND_NORMAL) in computeKey()
129 .set(Key::OPACITY_MASK, in computeKey()
130 description.mOpaque ? Key::OPACITY_OPAQUE : Key::OPACITY_TRANSLUCENT) in computeKey()
131 .set(Key::COLOR_MATRIX_MASK, in computeKey()
132 description.mColorMatrixEnabled ? Key::COLOR_MATRIX_ON : Key::COLOR_MATRIX_OFF); in computeKey()
136 String8 ProgramCache::generateVertexShader(const Key& needs) { in generateVertexShader()
154 String8 ProgramCache::generateFragmentShader(const Key& needs) { in generateFragmentShader()
156 if (needs.getTextureTarget() == Key::TEXTURE_EXT) { in generateFragmentShader()
163 if (needs.getTextureTarget() == Key::TEXTURE_EXT) { in generateFragmentShader()
166 } else if (needs.getTextureTarget() == Key::TEXTURE_2D) { in generateFragmentShader()
169 } else if (needs.getTextureTarget() == Key::TEXTURE_OFF) { in generateFragmentShader()
216 Program* ProgramCache::generateProgram(const Key& needs) { in generateProgram()
230 Key needs(computeKey(description)); in useProgram()