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