GrFP can express distance vector field req., program builder declares variable for it
authordvonbeck <dvonbeck@google.com>
Mon, 1 Aug 2016 18:01:56 +0000 (11:01 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 1 Aug 2016 18:01:56 +0000 (11:01 -0700)
commit9b03e7b29d963ea333a66dc5353e94f6391eb899
tree8d888df5a95d0859e7748d53ad580d9e0bc1d2cf
parent6be452c80072b5ce4011126a27471ceaec72cfcb
GrFP can express distance vector field req.,  program builder declares variable for it

This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates:

- from child FPs to their parent
- from parent FPs to the GrPaint
- from GrPaint through the PipelineBuilder into GrPipeline
- acessed from GrPipeline by GrGLSLProgramBuilder

GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method.

This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114993002

Committed: https://skia.googlesource.com/skia/+/4ef6dfa7089c092c67b0d5ec34e89c1e319af196
Review-Url: https://codereview.chromium.org/2114993002
22 files changed:
gyp/core.gypi
gyp/ports.gyp
include/gpu/GrFragmentProcessor.h
include/gpu/GrPaint.h
src/core/SkNormalBevelSource.cpp
src/core/SkNormalFlatSource.cpp
src/core/SkNormalMapSource.cpp
src/core/SkNormalSource.h
src/core/SkNormalSourcePriv.h [new file with mode: 0644]
src/gpu/GrFragmentProcessor.cpp
src/gpu/GrPaint.cpp
src/gpu/GrPipeline.cpp
src/gpu/GrPipeline.h
src/gpu/GrPipelineBuilder.cpp
src/gpu/GrPipelineBuilder.h
src/gpu/GrPrimitiveProcessor.h
src/gpu/glsl/GrGLSLFragmentProcessor.cpp
src/gpu/glsl/GrGLSLFragmentProcessor.h
src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
src/gpu/glsl/GrGLSLFragmentShaderBuilder.h
src/gpu/glsl/GrGLSLPrimitiveProcessor.h
src/gpu/glsl/GrGLSLProgramBuilder.cpp