diff options
author | 2016-09-08 09:02:43 -0700 | |
---|---|---|
committer | 2016-09-08 09:02:44 -0700 | |
commit | 05a4cf59591024d838b204bb0f6fac42598ead28 (patch) | |
tree | 9744866d58622ba2e16ec391cc8859972fbd928f /src/gpu/glsl | |
parent | 51761d12d00fb1ebe7c63efce91b0e84b4afac5c (diff) |
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
Diffstat (limited to 'src/gpu/glsl')
-rw-r--r-- | src/gpu/glsl/GrGLSLProgramBuilder.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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"); |