Reduce usage of GrProgramDesc::KeyHeader
Ideally the GrProgramDesc would be a simple program key. We currently can't remove usage of the KeyHeader for "hasPointSize" but this, at least, removes the other uses.
Bug: skia:9455
Change-Id: Ie9e15997ee79c6ffe62b5cd2c96885ca06204383
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247597
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h
index d470b69..dc63aa8 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.h
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.h
@@ -44,6 +44,11 @@
GrProcessor::CustomFeatures processorFeatures() const {
return fProgramInfo.requestedFeatures();
}
+ bool snapVerticesToPixelCenters() const {
+ return fProgramInfo.pipeline().snapVerticesToPixelCenters();
+ }
+ // TODO: remove this usage of the descriptor's header
+ bool hasPointSize() const { return fDesc->hasPointSize(); }
// TODO: stop passing in the renderTarget for just the sampleLocations
int effectiveSampleCnt() const {
@@ -55,7 +60,6 @@
}
const GrProgramDesc* desc() const { return fDesc; }
- const GrProgramDesc::KeyHeader& header() const { return fDesc->header(); }
void appendUniformDecls(GrShaderFlags visibility, SkString*) const;