Lines Matching defs:needs
119 Key needs;
120 needs.set(Key::TEXTURE_MASK,
133 return needs;
136 String8 ProgramCache::generateVertexShader(const Key& needs) {
138 if (needs.isTexturing()) {
147 if (needs.isTexturing()) {
154 String8 ProgramCache::generateFragmentShader(const Key& needs) {
156 if (needs.getTextureTarget() == Key::TEXTURE_EXT) {
163 if (needs.getTextureTarget() == Key::TEXTURE_EXT) {
166 } else if (needs.getTextureTarget() == Key::TEXTURE_2D) {
169 } else if (needs.getTextureTarget() == Key::TEXTURE_OFF) {
172 if (needs.hasPlaneAlpha()) {
175 if (needs.hasColorMatrix()) {
179 if (needs.isTexturing()) {
184 if (needs.isOpaque()) {
187 if (needs.hasPlaneAlpha()) {
189 if (needs.isPremultiplied()) {
197 if (needs.hasColorMatrix()) {
198 if (!needs.isOpaque() && needs.isPremultiplied()) {
206 if (!needs.isOpaque() && needs.isPremultiplied()) {
216 Program* ProgramCache::generateProgram(const Key& needs) {
218 String8 vs = generateVertexShader(needs);
221 String8 fs = generateFragmentShader(needs);
223 Program* program = new Program(needs, vs.string(), fs.string());
230 Key needs(computeKey(description));
233 Program* program = mCache.valueFor(needs);
237 program = generateProgram(needs);
238 mCache.add(needs, program);
241 //ALOGD(">>> generated new program: needs=%08X, time=%u ms (%d programs)",
242 // needs.mNeeds, uint32_t(ns2ms(time)), mCache.size());