aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLFragmentProcessor.h
diff options
context:
space:
mode:
authorGravatar dvonbeck <dvonbeck@google.com>2016-07-29 09:53:56 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-29 09:53:56 -0700
commit4ef6dfa7089c092c67b0d5ec34e89c1e319af196 (patch)
treedea8644d31df5b148fc95469c74fe761bc018260 /src/gpu/glsl/GrGLSLFragmentProcessor.h
parent5db44aa2aa4a3a1b9ce1fe7e22c54c8d9b61f51d (diff)
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 Review-Url: https://codereview.chromium.org/2114993002
Diffstat (limited to 'src/gpu/glsl/GrGLSLFragmentProcessor.h')
-rw-r--r--src/gpu/glsl/GrGLSLFragmentProcessor.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.h b/src/gpu/glsl/GrGLSLFragmentProcessor.h
index 43614f2279..c6eb016a32 100644
--- a/src/gpu/glsl/GrGLSLFragmentProcessor.h
+++ b/src/gpu/glsl/GrGLSLFragmentProcessor.h
@@ -61,7 +61,8 @@ public:
const char* inputColor,
const GrGLSLTransformedCoordsArray& coords,
const SamplerHandle* texSamplers,
- const SamplerHandle* bufferSamplers)
+ const SamplerHandle* bufferSamplers,
+ bool gpImplementsDistanceVector)
: fFragBuilder(fragBuilder)
, fUniformHandler(uniformHandler)
, fGLSLCaps(caps)
@@ -70,7 +71,8 @@ public:
, fInputColor(inputColor)
, fCoords(coords)
, fTexSamplers(texSamplers)
- , fBufferSamplers(bufferSamplers) {}
+ , fBufferSamplers(bufferSamplers)
+ , fGpImplementsDistanceVector(gpImplementsDistanceVector){}
GrGLSLFPFragmentBuilder* fFragBuilder;
GrGLSLUniformHandler* fUniformHandler;
const GrGLSLCaps* fGLSLCaps;
@@ -80,6 +82,7 @@ public:
const GrGLSLTransformedCoordsArray& fCoords;
const SamplerHandle* fTexSamplers;
const SamplerHandle* fBufferSamplers;
+ bool fGpImplementsDistanceVector;
};
virtual void emitCode(EmitArgs&) = 0;