Lines Matching refs:shader

83 // gradient shader matrix helpers
120 bool tryStoreGradient(Caches& caches, const SkShader& shader, const Matrix4 modelViewMatrix,
129 switch (shader.asAGradient(&gradInfo)) {
147 // Do nothing. This shader is unsupported.
154 shader.getLocalMatrix(), modelViewMatrix);
156 // re-query shader to get full color / offset data
161 shader.asAGradient(&gradInfo);
202 bool tryStoreBitmap(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
207 if (!shader.isABitmap(&bitmap, nullptr, xy)) {
240 computeScreenSpaceMatrix(outData->textureTransform, SkMatrix::I(), shader.getLocalMatrix(),
259 SkiaShaderType getComposeSubType(const SkShader& shader) {
260 // First check for a gradient shader.
261 switch (shader.asAGradient(nullptr)) {
263 // Not a gradient shader. Fall through to check for other types.
274 // The shader is not a gradient. Check for a bitmap shader.
275 if (shader.isABitmap()) {
286 "failed storing bitmap shader data");
289 "failing storing gradient shader data");
292 bool tryStoreCompose(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
297 if (!shader.asACompose(&rec)) return false;
307 computeScreenSpaceMatrix(transform, SkMatrix::I(), shader.getLocalMatrix(), modelViewMatrix);
324 bool tryStoreLayer(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
328 if (!shader.asACustomShader(reinterpret_cast<void**>(&layer))) {
339 computeScreenSpaceMatrix(outData->textureTransform, SkMatrix::I(), shader.getLocalMatrix(),
360 void SkiaShader::store(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
363 if (tryStoreGradient(caches, shader, modelViewMatrix,
369 if (tryStoreBitmap(caches, shader, modelViewMatrix,
375 if (tryStoreCompose(caches, shader, modelViewMatrix,
381 if (tryStoreLayer(caches, shader, modelViewMatrix,
387 // Unknown/unsupported type, so explicitly ignore shader