/external/skia/src/gpu/effects/ |
D | GrDistanceFieldGeoProc.cpp | 89 fsBuilder->codeAppend(GrGLShaderVar::PrecisionString(kHigh_GrSLPrecision, in onEmitCode() 93 fsBuilder->codeAppend("\tfloat texColor = "); in onEmitCode() 97 fsBuilder->codeAppend(".r;\n"); in onEmitCode() 98 fsBuilder->codeAppend("\tfloat distance = " in onEmitCode() 105 fsBuilder->codeAppend("float afwidth;"); in onEmitCode() 119 fsBuilder->codeAppend("vec2 dist_grad = vec2(dFdx(distance), dFdy(distance));"); in onEmitCode() 122 fsBuilder->codeAppend("float dg_len2 = dot(dist_grad, dist_grad);"); in onEmitCode() 123 fsBuilder->codeAppend("if (dg_len2 < 0.0001) {"); in onEmitCode() 124 fsBuilder->codeAppend("dist_grad = vec2(0.7071, 0.7071);"); in onEmitCode() 125 fsBuilder->codeAppend("} else {"); in onEmitCode() [all …]
|
D | GrTextureDomain.cpp | 70 builder->codeAppend(";\n"); in sampleTexture() 81 builder->codeAppend(";\n"); in sampleTexture() 96 builder->codeAppend("\tvec4 outside = vec4(0.0, 0.0, 0.0, 0.0);\n"); in sampleTexture() 97 builder->codeAppend("\tvec4 inside = "); in sampleTexture() 100 builder->codeAppend(";\n"); in sampleTexture() 108 builder->codeAppend("\tfloat blend = step(1.0, max(x, y));\n"); in sampleTexture() 111 builder->codeAppend("\tbvec4 outside;\n"); in sampleTexture() 120 builder->codeAppend(";\n"); in sampleTexture() 133 builder->codeAppend(";\n"); in sampleTexture()
|
D | GrConvexPolyEffect.cpp | 130 fsBuilder->codeAppend("\t\tfloat xSub, ySub;\n"); in emitCode() 147 fsBuilder->codeAppend("\t\talpha = 1.0 - alpha;\n"); in emitCode() 220 fsBuilder->codeAppend("\t\tfloat alpha = 1.0;\n"); in emitCode() 221 fsBuilder->codeAppend("\t\tfloat edge;\n"); in emitCode() 227 fsBuilder->codeAppend("\t\tedge = clamp(edge, 0.0, 1.0);\n"); in emitCode() 229 fsBuilder->codeAppend("\t\tedge = edge >= 0.5 ? 1.0 : 0.0;\n"); in emitCode() 231 fsBuilder->codeAppend("\t\talpha *= edge;\n"); in emitCode() 236 fsBuilder->codeAppend("\t\tif (-1.0 == alpha) {\n\t\t\tdiscard;\n\t\t}\n"); in emitCode() 240 fsBuilder->codeAppend("\talpha = 1.0 - alpha;\n"); in emitCode()
|
D | GrBezierEffect.cpp | 102 fsBuilder->codeAppend("float edgeAlpha;"); in onEmitCode() 116 fsBuilder->codeAppend("vec2 gF = vec2(dfdx, dfdy);"); in onEmitCode() 117 fsBuilder->codeAppend("float gFM = sqrt(dot(gF, gF));"); in onEmitCode() 120 fsBuilder->codeAppend("func = abs(func);"); in onEmitCode() 121 fsBuilder->codeAppend("edgeAlpha = func / gFM;"); in onEmitCode() 122 fsBuilder->codeAppend("edgeAlpha = max(1.0 - edgeAlpha, 0.0);"); in onEmitCode() 138 fsBuilder->codeAppend("vec2 gF = vec2(dfdx, dfdy);"); in onEmitCode() 139 fsBuilder->codeAppend("float gFM = sqrt(dot(gF, gF));"); in onEmitCode() 142 fsBuilder->codeAppend("edgeAlpha = func / gFM;"); in onEmitCode() 143 fsBuilder->codeAppend("edgeAlpha = clamp(1.0 - edgeAlpha, 0.0, 1.0);"); in onEmitCode() [all …]
|
D | GrOvalEffect.cpp | 154 fsBuilder->codeAppend("\t\td = clamp(d, 0.0, 1.0);\n"); in emitCode() 156 fsBuilder->codeAppend("\t\td = d > 0.5 ? 1.0 : 0.0;\n"); in emitCode() 327 fsBuilder->codeAppend("\t\tfloat implicit = dot(Z, d) - 1.0;\n"); in emitCode() 331 fsBuilder->codeAppend("\t\tgrad_dot = max(grad_dot, 1.0e-4);\n"); in emitCode() 336 fsBuilder->codeAppend("\t\tfloat alpha = clamp(0.5 - approx_dist, 0.0, 1.0);\n"); in emitCode() 339 fsBuilder->codeAppend("\t\tfloat alpha = clamp(0.5 + approx_dist, 0.0, 1.0);\n"); in emitCode() 342 fsBuilder->codeAppend("\t\tfloat alpha = approx_dist > 0.0 ? 0.0 : 1.0;\n"); in emitCode() 345 fsBuilder->codeAppend("\t\tfloat alpha = approx_dist > 0.0 ? 1.0 : 0.0;\n"); in emitCode()
|
D | GrRRectEffect.cpp | 200 fsBuilder->codeAppend("\t\tvec2 dxy = max(max(dxy0, dxy1), 0.0);\n"); in emitCode() 247 fsBuilder->codeAppend("\t\tvec2 dxy = max(vec2(dxy0.x, max(dxy0.y, dy1)), 0.0);\n"); in emitCode() 256 fsBuilder->codeAppend("\t\tvec2 dxy = max(vec2(max(dxy0.x, dx1), dxy0.y), 0.0);\n"); in emitCode() 265 fsBuilder->codeAppend("\t\tvec2 dxy = max(vec2(dxy1.x, max(dy0, dxy1.y)), 0.0);\n"); in emitCode() 274 fsBuilder->codeAppend("\t\tvec2 dxy = max(vec2(max(dx0, dxy1.x), dxy1.y), 0.0);\n"); in emitCode() 283 fsBuilder->codeAppend("\t\talpha = 1.0 - alpha;\n"); in emitCode() 550 fsBuilder->codeAppend("\t\tvec2 dxy = max(max(dxy0, dxy1), 0.0);\n"); in emitCode() 561 fsBuilder->codeAppend("\t\tvec2 dxy = max(max(dxy0, dxy1), 0.0);\n"); in emitCode() 573 fsBuilder->codeAppend("\t\tfloat implicit = dot(Z, dxy) - 1.0;\n"); in emitCode() 577 fsBuilder->codeAppend("\t\tgrad_dot = max(grad_dot, 1.0e-4);\n"); in emitCode() [all …]
|
D | GrMatrixConvolutionEffect.cpp | 79 fsBuilder->codeAppend("vec4 sum = vec4(0, 0, 0, 0);"); in emitCode() 82 fsBuilder->codeAppend("vec4 c;"); in emitCode() 92 fsBuilder->codeAppend("c.rgb /= c.a;"); in emitCode() 93 fsBuilder->codeAppend("c.rgb = clamp(c.rgb, 0.0, 1.0);"); in emitCode() 95 fsBuilder->codeAppend("sum += c * k;"); in emitCode() 111 fsBuilder->codeAppend(modulate.c_str()); in emitCode()
|
D | GrCustomXfermode.cpp | 64 fsBuilder->codeAppend("} else {"); in hard_light() 68 fsBuilder->codeAppend("}"); in hard_light() 83 fsBuilder->codeAppend("} else {"); in color_dodge_component() 85 fsBuilder->codeAppend("if (0.0 == d) {"); in color_dodge_component() 89 fsBuilder->codeAppend("} else {"); in color_dodge_component() 94 fsBuilder->codeAppend("}"); in color_dodge_component() 95 fsBuilder->codeAppend("}"); in color_dodge_component() 111 fsBuilder->codeAppend("} else {"); in color_burn_component() 116 fsBuilder->codeAppend("}"); in color_burn_component()
|
D | GrYUVtoRGBEffect.cpp | 77 fsBuilder->codeAppend(".r,\n\t\t"); in emitCode() 79 fsBuilder->codeAppend(".r,\n\t\t"); in emitCode()
|
D | GrBitmapTextGeoProc.cpp | 70 fsBuilder->codeAppend(";"); in onEmitCode() 75 fsBuilder->codeAppend(";"); in onEmitCode()
|
D | GrBicubicEffect.cpp | 98 fsBuilder->codeAppend("\tvec2 f = fract(coord);\n"); in emitCode() 100 fsBuilder->codeAppend("\tvec4 rowColors[4];\n"); in emitCode()
|
D | GrSimpleTextureEffect.cpp | 33 fsBuilder->codeAppend(";\n"); in emitCode()
|
D | GrConfigConversionEffect.cpp | 42 fsBuilder->codeAppend(";"); in emitCode() 82 fsBuilder->codeAppend(modulate.c_str()); in emitCode()
|
D | GrPorterDuffXferProcessor.cpp | 150 fsBuilder->codeAppend(" + "); in append_porterduff_term() 253 fsBuilder->codeAppend("vec4 colorBlend ="); in onEmitCode() 262 fsBuilder->codeAppend(";"); in onEmitCode()
|
/external/skia/src/effects/ |
D | SkMagnifierImageFilter.cpp | 166 fsBuilder->codeAppend("\t\tfloat weight = 0.0;\n"); in emitCode() 167 fsBuilder->codeAppend("\t\tif (delta.s < 2.0 && delta.t < 2.0) {\n"); in emitCode() 168 fsBuilder->codeAppend("\t\t\tdelta = vec2(2.0, 2.0) - delta;\n"); in emitCode() 169 fsBuilder->codeAppend("\t\t\tfloat dist = length(delta);\n"); in emitCode() 170 fsBuilder->codeAppend("\t\t\tdist = max(2.0 - dist, 0.0);\n"); in emitCode() 171 fsBuilder->codeAppend("\t\t\tweight = min(dist * dist, 1.0);\n"); in emitCode() 172 fsBuilder->codeAppend("\t\t} else {\n"); in emitCode() 173 fsBuilder->codeAppend("\t\t\tvec2 delta_squared = delta * delta;\n"); in emitCode() 174 fsBuilder->codeAppend("\t\t\tweight = min(min(delta_squared.x, delta_squared.y), 1.0);\n"); in emitCode() 175 fsBuilder->codeAppend("\t\t}\n"); in emitCode() [all …]
|
D | SkAlphaThresholdFilter.cpp | 163 fsBuilder->codeAppend("\t\tvec4 input_color = "); in emitCode() 165 fsBuilder->codeAppend(";\n"); in emitCode() 166 fsBuilder->codeAppend("\t\tvec4 mask_color = "); in emitCode() 168 fsBuilder->codeAppend(";\n"); in emitCode() 174 fsBuilder->codeAppend("\t\tfloat mask = mask_color.a;\n"); in emitCode() 176 fsBuilder->codeAppend("vec4 color = input_color;\n"); in emitCode() 177 fsBuilder->codeAppend("\t\tif (mask < 0.5) {\n" in emitCode()
|
D | SkDisplacementMapEffect.cpp | 574 fsBuilder->codeAppend(";\n"); in emitCode() 585 fsBuilder->codeAppend("r"); in emitCode() 588 fsBuilder->codeAppend("g"); in emitCode() 591 fsBuilder->codeAppend("b"); in emitCode() 594 fsBuilder->codeAppend("a"); in emitCode() 603 fsBuilder->codeAppend("r"); in emitCode() 606 fsBuilder->codeAppend("g"); in emitCode() 609 fsBuilder->codeAppend("b"); in emitCode() 612 fsBuilder->codeAppend("a"); in emitCode() 618 fsBuilder->codeAppend("-vec2(0.5));\t\t"); in emitCode() [all …]
|
D | SkArithmeticMode_gpu.cpp | 31 fsBuilder->codeAppend("const vec4 src = vec4(1);"); in add_arithmetic_code() 35 fsBuilder->codeAppend("src.rgb = clamp(src.rgb / src.a, 0.0, 1.0);"); in add_arithmetic_code() 41 fsBuilder->codeAppend("dst.rgb = clamp(dst.rgb / dst.a, 0.0, 1.0);"); in add_arithmetic_code() 70 fsBuilder->codeAppend("vec4 bgColor = "); in emitCode()
|
D | SkTableColorFilter.cpp | 451 fsBuilder->codeAppend(";\n"); in emitCode() 456 fsBuilder->codeAppend(";\n"); in emitCode() 461 fsBuilder->codeAppend(";\n"); in emitCode() 466 fsBuilder->codeAppend(";\n"); in emitCode()
|
/external/skia/src/gpu/gl/ |
D | GrGLXferProcessor.cpp | 45 fsBuilder->codeAppend("// Read color from copy of the destination.\n"); in emitCode() 50 fsBuilder->codeAppend("_dstTexCoord.y = 1.0 - _dstTexCoord.y;"); in emitCode() 55 fsBuilder->codeAppend(";"); in emitCode()
|
/external/skia/src/gpu/gl/builders/ |
D | GrGLShaderBuilder.h | 81 void codeAppend(const char* str) { this->code().append(str); } in codeAppend() function 115 fBuilder->codeAppend("{"); in ShaderBlock() 119 fBuilder->codeAppend("}"); in ~ShaderBlock()
|
D | GrGLProgramBuilder.cpp | 264 fFS.codeAppend(openBrace.c_str()); in emitAndInstallProc() 268 fFS.codeAppend("}"); in emitAndInstallProc() 282 fFS.codeAppend(openBrace.c_str()); in emitAndInstallProc() 286 fFS.codeAppend("}"); in emitAndInstallProc() 353 fFS.codeAppend(openBrace.c_str()); in emitAndInstallXferProc() 366 fFS.codeAppend("}"); in emitAndInstallXferProc()
|
/external/skia/src/gpu/ |
D | GrOvalRenderer.cpp | 124 fsBuilder->codeAppend("edgeAlpha *= innerAlpha;"); in onEmitCode() 291 fsBuilder->codeAppend("float test = dot(scaledOffset, scaledOffset) - 1.0;"); in onEmitCode() 293 fsBuilder->codeAppend("float grad_dot = dot(grad, grad);"); in onEmitCode() 296 fsBuilder->codeAppend("grad_dot = max(grad_dot, 1.0e-4);"); in onEmitCode() 297 fsBuilder->codeAppend("float invlen = inversesqrt(grad_dot);"); in onEmitCode() 298 fsBuilder->codeAppend("float edgeAlpha = clamp(0.5-test*invlen, 0.0, 1.0);"); in onEmitCode() 304 fsBuilder->codeAppend("test = dot(scaledOffset, scaledOffset) - 1.0;"); in onEmitCode() 307 fsBuilder->codeAppend("invlen = inversesqrt(dot(grad, grad));"); in onEmitCode() 308 fsBuilder->codeAppend("edgeAlpha *= clamp(0.5+test*invlen, 0.0, 1.0);"); in onEmitCode() 483 fsBuilder->codeAppend("float test = dot(scaledOffset, scaledOffset) - 1.0;"); in onEmitCode() [all …]
|
/external/skia/gm/ |
D | dcshader.cpp | 76 fpb->codeAppend("vec2 r = mod(c, vec2(20.0));"); in createGLInstance() 77 fpb->codeAppend("vec4 color = vec4(0.5*sin(c.x / 15.0) + 0.5," in createGLInstance()
|
/external/skia/src/effects/gradients/ |
D | SkTwoPointConicalGradient_gpu.cpp | 284 fsBuilder->codeAppend("\t"); in emitCode() 286 fsBuilder->codeAppend("\t}\n"); in emitCode() 564 fsBuilder->codeAppend("\t\t"); in emitCode() 566 fsBuilder->codeAppend("\t}\n"); in emitCode() 1296 fsBuilder->codeAppend("\t\t"); in emitCode() 1298 fsBuilder->codeAppend("\t}\n"); in emitCode()
|