Add computation of requestedFeatures to GrProgramInfo and use it
This is a deferred TODO/code review request. In general, this improves the encapsulation of program information w/in GrProgramInfo. Additionally, it is desirable to stop using the Desc/Key to access this information.
Bug: skia:9455
Change-Id: I854ff3225a49657d3a523e88e4bfa549128ee486
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247336
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h
index b9bc61b..a710f0a 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.h
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.h
@@ -42,10 +42,13 @@
const GrPipeline& pipeline() const { return fProgramInfo.pipeline(); }
const GrPrimitiveProcessor& primitiveProcessor() const { return fProgramInfo.primProc(); }
const GrTextureProxy* const* primProcProxies() const { return fProgramInfo.primProcProxies(); }
+ GrProcessor::CustomFeatures processorFeatures() const {
+ return fProgramInfo.requestedFeatures();
+ }
// TODO: stop passing in the renderTarget for just the sampleLocations
int effectiveSampleCnt() const {
- SkASSERT(GrProcessor::CustomFeatures::kSampleLocations & header().processorFeatures());
+ SkASSERT(GrProcessor::CustomFeatures::kSampleLocations & fProgramInfo.requestedFeatures());
return fRenderTarget->renderTargetPriv().getSampleLocations().count();
}
const SkTArray<SkPoint>& getSampleLocations() const {