/external/skia/src/gpu/effects/ |
GrDistanceFieldGeoProc.cpp | 98 fragBuilder->codeAppend(GrGLSLShaderVar::PrecisionString(args.fGLSLCaps, 102 fragBuilder->codeAppend("\tfloat texColor = "); 106 fragBuilder->codeAppend(".r;\n"); 107 fragBuilder->codeAppend("\tfloat distance = " 114 fragBuilder->codeAppend("float afwidth;"); 128 fragBuilder->codeAppend("vec2 dist_grad = vec2(dFdx(distance), dFdy(distance));"); 131 fragBuilder->codeAppend("float dg_len2 = dot(dist_grad, dist_grad);"); 132 fragBuilder->codeAppend("if (dg_len2 < 0.0001) {"); 133 fragBuilder->codeAppend("dist_grad = vec2(0.7071, 0.7071);"); 134 fragBuilder->codeAppend("} else {") [all...] |
GrTextureDomain.cpp | 74 builder->codeAppend(";"); 85 builder->codeAppend(";"); 100 builder->codeAppend("vec4 outside = vec4(0.0, 0.0, 0.0, 0.0);"); 101 builder->codeAppend("vec4 inside = "); 104 builder->codeAppend(";"); 106 builder->codeAppend(GrGLSLShaderVar::PrecisionString(glslCaps, 109 builder->codeAppend(GrGLSLShaderVar::PrecisionString(glslCaps, 117 builder->codeAppend("float blend = step(1.0, max(x, y));"); 120 builder->codeAppend("bvec4 outside;\n"); 129 builder->codeAppend(";"); [all...] |
GrConvexPolyEffect.cpp | 118 fragBuilder->codeAppend("\t\tfloat xSub, ySub;\n"); 135 fragBuilder->codeAppend("\t\talpha = 1.0 - alpha;\n"); 198 fragBuilder->codeAppend("\t\tfloat alpha = 1.0;\n"); 199 fragBuilder->codeAppend("\t\tfloat edge;\n"); 205 fragBuilder->codeAppend("\t\tedge = clamp(edge, 0.0, 1.0);\n"); 207 fragBuilder->codeAppend("\t\tedge = edge >= 0.5 ? 1.0 : 0.0;\n"); 209 fragBuilder->codeAppend("\t\talpha *= edge;\n"); 213 fragBuilder->codeAppend("\talpha = 1.0 - alpha;\n");
|
GrOvalEffect.cpp | 139 fragBuilder->codeAppend("d = clamp(d, 0.0, 1.0);"); 141 fragBuilder->codeAppend("d = d > 0.5 ? 1.0 : 0.0;"); 314 fragBuilder->codeAppend("float implicit = dot(Z, d) - 1.0;"); 318 fragBuilder->codeAppend("grad_dot = max(grad_dot, 1.0e-4);"); 326 fragBuilder->codeAppend("float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);"); 329 fragBuilder->codeAppend("float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);"); 332 fragBuilder->codeAppend("float alpha = approx_dist > 0.0 ? 0.0 : 1.0;"); 335 fragBuilder->codeAppend("float alpha = approx_dist > 0.0 ? 1.0 : 0.0;");
|
GrSimpleTextureEffect.cpp | 23 fragBuilder->codeAppend(";");
|
GrRRectEffect.cpp | 199 fragBuilder->codeAppend("vec2 dxy = max(max(dxy0, dxy1), 0.0);"); 245 fragBuilder->codeAppend("vec2 dxy = max(vec2(dxy0.x, max(dxy0.y, dy1)), 0.0);"); 254 fragBuilder->codeAppend("vec2 dxy = max(vec2(max(dxy0.x, dx1), dxy0.y), 0.0);"); 263 fragBuilder->codeAppend("vec2 dxy = max(vec2(dxy1.x, max(dy0, dxy1.y)), 0.0);"); 272 fragBuilder->codeAppend("vec2 dxy = max(vec2(max(dx0, dxy1.x), dxy1.y), 0.0);"); 281 fragBuilder->codeAppend("alpha = 1.0 - alpha;"); 552 fragBuilder->codeAppend("vec2 dxy = max(max(dxy0, dxy1), 0.0);"); 571 fragBuilder->codeAppend("vec2 dxy = max(max(dxy0, dxy1), 0.0);"); 584 fragBuilder->codeAppend("float implicit = dot(Z, dxy) - 1.0;"); 586 fragBuilder->codeAppend("float grad_dot = 4.0 * dot(Z, Z);") [all...] |
GrMatrixConvolutionEffect.cpp | 66 fragBuilder->codeAppend("vec4 sum = vec4(0, 0, 0, 0);"); 68 fragBuilder->codeAppend("vec4 c;"); 84 fragBuilder->codeAppend("c.rgb /= c.a;"); 85 fragBuilder->codeAppend("c.rgb = clamp(c.rgb, 0.0, 1.0);"); 87 fragBuilder->codeAppend("sum += c * k;"); 109 fragBuilder->codeAppend(modulate.c_str());
|
GrBicubicEffect.cpp | 87 fragBuilder->codeAppend("\tvec2 f = fract(coord);\n"); 89 fragBuilder->codeAppend("\tvec4 rowColors[4];\n");
|
GrBitmapTextGeoProc.cpp | 72 fragBuilder->codeAppend(";"); 77 fragBuilder->codeAppend(";");
|
GrConvolutionEffect.cpp | 83 fragBuilder->codeAppend("}"); 90 fragBuilder->codeAppend(modulate.c_str());
|
/external/skia/src/effects/ |
SkPixelXorXfermode.cpp | 82 fragBuilder->codeAppend("float red = 0.0, green = 0.0, blue = 0.0;"); 92 fragBuilder->codeAppend("float modValue = 128.0;"); 94 fragBuilder->codeAppend("for (int i = 0; i < 8; i++) {"); 97 fragBuilder->codeAppend("red += modValue * bit;"); 98 fragBuilder->codeAppend("src.r = mod(src.r, modValue);"); 99 fragBuilder->codeAppend("dst.r = mod(dst.r, modValue);"); 100 fragBuilder->codeAppend("op.r = mod(op.r, modValue);"); 103 fragBuilder->codeAppend("green += modValue * bit;"); 104 fragBuilder->codeAppend("src.g = mod(src.g, modValue);"); 105 fragBuilder->codeAppend("dst.g = mod(dst.g, modValue);") [all...] |
SkMagnifierImageFilter.cpp | 145 fragBuilder->codeAppend("\t\tfloat weight = 0.0;\n"); 146 fragBuilder->codeAppend("\t\tif (delta.s < 2.0 && delta.t < 2.0) {\n"); 147 fragBuilder->codeAppend("\t\t\tdelta = vec2(2.0, 2.0) - delta;\n"); 148 fragBuilder->codeAppend("\t\t\tfloat dist = length(delta);\n"); 149 fragBuilder->codeAppend("\t\t\tdist = max(2.0 - dist, 0.0);\n"); 150 fragBuilder->codeAppend("\t\t\tweight = min(dist * dist, 1.0);\n"); 151 fragBuilder->codeAppend("\t\t} else {\n"); 152 fragBuilder->codeAppend("\t\t\tvec2 delta_squared = delta * delta;\n"); 153 fragBuilder->codeAppend("\t\t\tweight = min(min(delta_squared.x, delta_squared.y), 1.0);\n"); 154 fragBuilder->codeAppend("\t\t}\n") [all...] |
SkAlphaThresholdFilter.cpp | 181 fragBuilder->codeAppend("\t\tvec4 input_color = "); 183 fragBuilder->codeAppend(";\n"); 184 fragBuilder->codeAppend("\t\tvec4 mask_color = "); 186 fragBuilder->codeAppend(";\n"); 192 fragBuilder->codeAppend("\t\tfloat mask = mask_color.a;\n"); 194 fragBuilder->codeAppend("vec4 color = input_color;\n"); 195 fragBuilder->codeAppend("\t\tif (mask < 0.5) {\n"
|
SkDisplacementMapEffect.cpp | 560 fragBuilder->codeAppend(";\n"); 572 fragBuilder->codeAppend("r"); 575 fragBuilder->codeAppend("g"); 578 fragBuilder->codeAppend("b"); 581 fragBuilder->codeAppend("a"); 590 fragBuilder->codeAppend("r"); 593 fragBuilder->codeAppend("g"); 596 fragBuilder->codeAppend("b"); 599 fragBuilder->codeAppend("a"); 605 fragBuilder->codeAppend("-vec2(0.5));\t\t") [all...] |
SkTableColorFilter.cpp | 440 fragBuilder->codeAppend(".a;\n"); 445 fragBuilder->codeAppend(".a;\n"); 450 fragBuilder->codeAppend(".a;\n"); 455 fragBuilder->codeAppend(".a;\n");
|
/external/skia/src/gpu/glsl/ |
GrGLSLXferProcessor.cpp | 51 fragBuilder->codeAppend("// Read color from copy of the destination.\n"); 56 fragBuilder->codeAppend("_dstTexCoord.y = 1.0 - _dstTexCoord.y;"); 61 fragBuilder->codeAppend(";");
|
GrGLSLBlend.cpp | 24 fsBuilder->codeAppend("} else {"); 28 fsBuilder->codeAppend("}"); 43 fsBuilder->codeAppend("} else {"); 45 fsBuilder->codeAppend("if (0.0 == d) {"); 49 fsBuilder->codeAppend("} else {"); 54 fsBuilder->codeAppend("}"); 55 fsBuilder->codeAppend("}"); 71 fsBuilder->codeAppend("} else {"); 76 fsBuilder->codeAppend("}"); 378 fsBuilder->codeAppend(" + ") [all...] |
GrGLSLVertexShaderBuilder.cpp | 50 this->codeAppend("gl_PointSize = 1.0;");
|
GrGLSLFragmentProcessor.cpp | 93 fragBuilder->codeAppend("{\n"); 105 fragBuilder->codeAppend("}\n");
|
GrGLSLProgramBuilder.cpp | 78 fFS.codeAppend(openBrace.c_str()); 104 fFS.codeAppend("}"); 131 fFS.codeAppend(openBrace.c_str()); 153 fFS.codeAppend("}"); 178 fFS.codeAppend(openBrace.c_str()); 198 fFS.codeAppend("}");
|
GrGLSLShaderBuilder.h | 92 void codeAppend(const char* str) { this->code().append(str); } 131 fBuilder->codeAppend("{"); 135 fBuilder->codeAppend("}");
|
/external/skia/src/gpu/batches/ |
GrPLSPathRenderer.cpp | 364 fsBuilder->codeAppend("highp float dmax = max(d1, max(d2, d3));"); 368 fsBuilder->codeAppend("d1 += delta1.x;"); 369 fsBuilder->codeAppend("d2 += delta2.x;"); 370 fsBuilder->codeAppend("d3 += delta3.x;"); 371 fsBuilder->codeAppend("dmax = max(d1, max(d2, d3));"); 373 fsBuilder->codeAppend("d1 += delta1.y;"); 374 fsBuilder->codeAppend("d2 += delta2.y;"); 375 fsBuilder->codeAppend("d3 += delta3.y;"); 376 fsBuilder->codeAppend("dmax = max(d1, max(d2, d3));"); 378 fsBuilder->codeAppend("d1 -= delta1.x;") [all...] |
/external/skia/tools/debugger/ |
SkOverdrawMode.cpp | 96 fragBuilder->codeAppend("int nextIdx;"); 98 fragBuilder->codeAppend("if (dst.r < 0.25) { nextIdx = 1; }"); 100 fragBuilder->codeAppend("else if (dst.g < 0.0977) { nextIdx = 10; }"); 101 fragBuilder->codeAppend("else if (dst.b > 0.08) { nextIdx = 8 - int(6.0 * dst.b + 0.5); }"); 102 fragBuilder->codeAppend("else { nextIdx = 11 - int(5.7 * dst.g + 0.5); }");
|
/external/skia/src/core/ |
SkLightingShader.cpp | 207 fragBuilder->codeAppend("vec4 diffuseColor = "); 211 fragBuilder->codeAppend(";"); 213 fragBuilder->codeAppend("vec4 normalColor = "); 217 fragBuilder->codeAppend(";"); 219 fragBuilder->codeAppend("vec3 normal = normalColor.rgb - vec3(0.5);"); 227 fragBuilder->codeAppend("normal = normalize(m*normal);");
|
/external/skia/src/gpu/ |
GrOvalRenderer.cpp | 135 fragBuilder->codeAppend("edgeAlpha *= innerAlpha;"); 287 fragBuilder->codeAppend("float test = dot(scaledOffset, scaledOffset) - 1.0;"); 289 fragBuilder->codeAppend("float grad_dot = dot(grad, grad);"); 292 fragBuilder->codeAppend("grad_dot = max(grad_dot, 1.0e-4);"); 293 fragBuilder->codeAppend("float invlen = inversesqrt(grad_dot);"); 294 fragBuilder->codeAppend("float edgeAlpha = clamp(0.5-test*invlen, 0.0, 1.0);"); 300 fragBuilder->codeAppend("test = dot(scaledOffset, scaledOffset) - 1.0;"); 303 fragBuilder->codeAppend("invlen = inversesqrt(dot(grad, grad));"); 304 fragBuilder->codeAppend("edgeAlpha *= clamp(0.5+test*invlen, 0.0, 1.0);"); 467 fragBuilder->codeAppend("float test = dot(scaledOffset, scaledOffset) - 1.0;") [all...] |