Lines Matching refs:shader

87 SkiaShaderType SkiaShader::getType(const SkShader& shader) {
88 // First check for a gradient shader.
89 switch (shader.asAGradient(NULL)) {
91 // Not a gradient shader. Fall through to check for other types.
102 // The shader is not a gradient. Check for a bitmap shader.
103 if (shader.asABitmap(NULL, NULL, NULL) == SkShader::kDefault_BitmapType) {
109 if (shader.asACompose(&rec)) {
121 if (shader.asACustomShader(NULL)) {
129 const Extensions& extensions, const SkShader& shader);
140 GLuint* textureUnit, const Extensions& extensions, const SkShader& shader);
151 const Extensions& extensions, const SkShader& shader) {
152 gDescribeProc[getType(shader)](caches, description, extensions, shader);
156 GLuint* textureUnit, const Extensions& extensions, const SkShader& shader) {
158 gSetupProgramProc[getType(shader)](caches, modelViewMatrix, textureUnit, extensions, shader);
162 // Layer shader
166 const Extensions&, const SkShader& shader) {
171 GLuint* textureUnit, const Extensions&, const SkShader& shader) {
173 if (!shader.asACustomShader(reinterpret_cast<void**>(&layer))) {
174 LOG_ALWAYS_FATAL("SkiaLayerShader::setupProgram called on the wrong type of shader!");
184 computeScreenSpaceMatrix(textureTransform, SkMatrix::I(), shader.getLocalMatrix(),
201 // Bitmap shader
254 const Extensions& extensions, const SkShader& shader) {
257 if (shader.asABitmap(&bitmap, NULL, xy) != SkShader::kDefault_BitmapType) {
258 LOG_ALWAYS_FATAL("SkiaBitmapShader::describe called with a different kind of shader!");
264 GLuint* textureUnit, const Extensions& extensions, const SkShader& shader) {
267 if (shader.asABitmap(&bitmap, NULL, xy) != SkShader::kDefault_BitmapType) {
268 LOG_ALWAYS_FATAL("SkiaBitmapShader::setupProgram called with a different kind of shader!");
285 computeScreenSpaceMatrix(textureTransform, SkMatrix::I(), shader.getLocalMatrix(),
300 // Linear gradient shader
315 // Circular gradient shader
326 // Sweep gradient shader
342 const Extensions& extensions, const SkShader& shader) {
348 switch (shader.asAGradient(&gradInfo)) {
359 // Do nothing. This shader is unsupported.
367 GLuint* textureUnit, const Extensions&, const SkShader& shader) {
381 SkShader::GradientType gradType = shader.asAGradient(&gradInfo);
391 shader.asAGradient(&gradInfo);
429 computeScreenSpaceMatrix(screenSpace, unitMatrix, shader.getLocalMatrix(), modelViewMatrix);
434 // Compose shader
438 const Extensions& extensions, const SkShader& shader) {
440 if (!shader.asACompose(&rec)) {
441 LOG_ALWAYS_FATAL("SkiaComposeShader::describe called on the wrong shader type!");
455 GLuint* textureUnit, const Extensions& extensions, const SkShader& shader) {
457 if (!shader.asACompose(&rec)) {
458 LOG_ALWAYS_FATAL("SkiaComposeShader::setupProgram called on the wrong shader type!");
461 // Apply this compose shader's local transform and pass it down to
465 computeScreenSpaceMatrix(transform, SkMatrix::I(), shader.getLocalMatrix(),