Lines Matching defs:caches

59 static inline void bindTexture(Caches* caches, Texture* texture, GLenum wrapS, GLenum wrapT) {
60 caches->textureState().bindTexture(texture->target(), texture->id());
120 bool tryStoreGradient(Caches& caches, const SkShader& shader, const Matrix4 modelViewMatrix,
169 outData->gradientTexture = caches.gradientCache.get(
183 void applyGradient(Caches& caches, const SkiaShaderData::GradientShaderData& data,
187 caches.textureState().activateTexture(data.gradientSampler);
188 bindTexture(&caches, data.gradientTexture, data.wrapST, data.wrapST);
189 glUniform1i(caches.program().getUniform("gradientSampler"), data.gradientSampler);
191 bindUniformColor(caches.program().getUniform("startColor"), data.startColor);
192 bindUniformColor(caches.program().getUniform("endColor"), data.endColor);
195 glUniform2f(caches.program().getUniform("screenSize"), 1.0f / width, 1.0f / height);
196 glUniformMatrix4fv(caches.program().getUniform("screenSpace"), 1,
200 bool tryStoreBitmap(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
211 outData->bitmapTexture = caches.textureCache.get(hwuiBitmap);
228 if (hwuiBitmap->isHardware() || (!caches.extensions().hasNPot()
252 void applyBitmap(Caches& caches, const SkiaShaderData::BitmapShaderData& data) {
253 caches.textureState().activateTexture(data.bitmapSampler);
254 bindTexture(&caches, data.bitmapTexture, data.wrapS, data.wrapT);
257 glUniform1i(caches.program().getUniform("bitmapSampler"), data.bitmapSampler);
258 glUniformMatrix4fv(caches.program().getUniform("textureTransform"), 1, GL_FALSE,
260 glUniform2fv(caches.program().getUniform("textureDimension"), 1, &data.textureDimension[0]);
285 void storeCompose(Caches& caches, const SkShader& bitmapShader, const SkShader& gradientShader,
288 LOG_ALWAYS_FATAL_IF(!tryStoreBitmap(caches, bitmapShader, modelViewMatrix,
291 LOG_ALWAYS_FATAL_IF(!tryStoreGradient(caches, gradientShader, modelViewMatrix,
296 bool tryStoreCompose(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
314 storeCompose(caches, *rec.fShaderA, *rec.fShaderB,
318 storeCompose(caches, *rec.fShaderB, *rec.fShaderA,
325 void SkiaShader::store(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
328 if (tryStoreGradient(caches, shader, modelViewMatrix,
334 if (tryStoreBitmap(caches, shader, modelViewMatrix,
340 if (tryStoreCompose(caches, shader, modelViewMatrix,
350 void SkiaShader::apply(Caches& caches, const SkiaShaderData& data,
355 applyGradient(caches, data.gradientData, width, height);
358 applyBitmap(caches, data.bitmapData);