Rename GrProcOptInfo::addProcessors to analyzeProcessors
Change-Id: I49d5fa568d5b9835ee8a76fd8b2b450ece944728 Reviewed-on: https://skia-review.googlesource.com/7182 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
92ce594685
commit
0831f1b5f1
@ -341,7 +341,7 @@ sk_sp<GrFragmentProcessor> GrFragmentProcessor::RunInSeries(sk_sp<GrFragmentProc
|
||||
|
||||
// Run the through the series, do the invariant output processing, and look for eliminations.
|
||||
GrProcOptInfo info(0x0, kNone_GrColorComponentFlags);
|
||||
info.addProcessors(sk_sp_address_as_pointer_address(series), cnt);
|
||||
info.analyzeProcessors(sk_sp_address_as_pointer_address(series), cnt);
|
||||
if (kRGBA_GrColorComponentFlags == info.validFlags()) {
|
||||
// TODO: We need to preserve 4f and color spaces during invariant processing. This color
|
||||
// has definitely lost precision, and could easily be in the wrong gamut (or have been
|
||||
|
@ -46,8 +46,9 @@ void GrPaint::addCoverageTextureProcessor(GrTexture* texture,
|
||||
|
||||
bool GrPaint::internalIsConstantBlendedColor(GrColor paintColor, GrColor* color) const {
|
||||
GrProcOptInfo colorProcInfo(paintColor, kRGBA_GrColorComponentFlags);
|
||||
colorProcInfo.addProcessors(sk_sp_address_as_pointer_address(fColorFragmentProcessors.begin()),
|
||||
this->numColorFragmentProcessors());
|
||||
colorProcInfo.analyzeProcessors(
|
||||
sk_sp_address_as_pointer_address(fColorFragmentProcessors.begin()),
|
||||
this->numColorFragmentProcessors());
|
||||
|
||||
GrXPFactory::InvariantBlendedColor blendedColor;
|
||||
if (fXPFactory) {
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "GrGeometryProcessor.h"
|
||||
#include "ops/GrDrawOp.h"
|
||||
|
||||
void GrProcOptInfo::addProcessors(const GrFragmentProcessor* const* processors, int cnt) {
|
||||
void GrProcOptInfo::analyzeProcessors(const GrFragmentProcessor* const* processors, int cnt) {
|
||||
for (int i = 0; i < cnt; ++i) {
|
||||
const GrFragmentProcessor* processor = processors[i];
|
||||
fInOut.resetWillUseInputColor();
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
* Runs through a series of processors and updates calculated values. This can be called
|
||||
* repeatedly for cases when the sequence of processors is not in a contiguous array.
|
||||
*/
|
||||
void addProcessors(const GrFragmentProcessor* const* processors, int cnt);
|
||||
void analyzeProcessors(const GrFragmentProcessor* const* processors, int cnt);
|
||||
|
||||
bool isSolidWhite() const { return fInOut.isSolidWhite(); }
|
||||
bool isOpaque() const { return fInOut.isOpaque(); }
|
||||
|
@ -45,9 +45,9 @@ public:
|
||||
|
||||
void analyzeFragmentProcessors(GrPipelineAnalysis* analysis) const {
|
||||
const GrFragmentProcessor* const* fps = fFragmentProcessors.get();
|
||||
analysis->fColorPOI.addProcessors(fps, fColorFragmentProcessorCnt);
|
||||
analysis->fColorPOI.analyzeProcessors(fps, fColorFragmentProcessorCnt);
|
||||
fps += fColorFragmentProcessorCnt;
|
||||
analysis->fCoveragePOI.addProcessors(fps, this->numCoverageFragmentProcessors());
|
||||
analysis->fCoveragePOI.analyzeProcessors(fps, this->numCoverageFragmentProcessors());
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -313,7 +313,7 @@ void GrRenderTargetOpList::addDrawOp(const GrPipelineBuilder& pipelineBuilder,
|
||||
}
|
||||
pipelineBuilder.analyzeFragmentProcessors(&args.fAnalysis);
|
||||
if (const GrFragmentProcessor* clipFP = appliedClip.clipCoverageFragmentProcessor()) {
|
||||
args.fAnalysis.fCoveragePOI.addProcessors(&clipFP, 1);
|
||||
args.fAnalysis.fCoveragePOI.analyzeProcessors(&clipFP, 1);
|
||||
}
|
||||
|
||||
if (!renderTargetContext->accessRenderTarget()) {
|
||||
|
Loading…
Reference in New Issue
Block a user