From 05a4cf59591024d838b204bb0f6fac42598ead28 Mon Sep 17 00:00:00 2001 From: robertphillips Date: Thu, 8 Sep 2016 09:02:43 -0700 Subject: Add GM/slide to simulate Android-style reveal clip Hopefully, this will let us play w/ geometric and shader-based solutions. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316593003 Committed: https://skia.googlesource.com/skia/+/ffac5c4aae18fc706e4077763c190a89c8507fb0 Review-Url: https://codereview.chromium.org/2316593003 --- src/gpu/glsl/GrGLSLProgramBuilder.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gpu') diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp index a6bff8a85a..3383221ebf 100644 --- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp +++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp @@ -89,6 +89,9 @@ void GrGLSLProgramBuilder::emitAndInstallPrimProc(const GrPrimitiveProcessor& pr const char* distanceVectorName = nullptr; if (this->fPipeline.usesDistanceVectorField() && proc.implementsDistanceVector()) { + // Each individual user (FP) of the distance vector must be able to handle having this + // variable be undeclared. There is no single default value that will yield a reasonable + // result for all users. distanceVectorName = fFS.distanceVectorName(); fFS.codeAppend( "// Normalized vector to the closest geometric edge (in device space)\n"); fFS.codeAppend( "// Distance to the edge encoded in the z-component\n"); -- cgit v1.2.3