Split GrPipelineInput into separate color and coverage types, the latter of which is just an enum.
Assign names that indicate that they aren't just for the input phase since I plan to use them at the boundary between FPs and XPs as well. Renamed GrProcOptInfo to GrColorFragmentProcessorAnalysis. This is now only used on the color side and the new name seems clearer to me. Change GrMeshDrawOp::getFragmentProcessorAnalysisInputs to use the new color/coverage types directly rather than a class that has been reduced to simply bundling them together. Change-Id: If93bae74c9d590486eecdf63f302418c96deab65 Reviewed-on: https://skia-review.googlesource.com/10161 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
88f9c1eff9
commit
c0b642ca48
@ -134,8 +134,9 @@ skia_gpu_sources = [
|
||||
"$_src/gpu/GrPreFlushResourceProvider.h",
|
||||
"$_src/gpu/GrPipeline.cpp",
|
||||
"$_src/gpu/GrPipeline.h",
|
||||
"$_src/gpu/GrPipelineAnalysis.cpp",
|
||||
"$_src/gpu/GrPipelineAnalysis.h",
|
||||
"$_src/gpu/GrPipelineBuilder.h",
|
||||
"$_src/gpu/GrPipelineInput.h",
|
||||
"$_src/gpu/GrPrimitiveProcessor.cpp",
|
||||
"$_src/gpu/GrPrimitiveProcessor.h",
|
||||
"$_src/gpu/GrProcessorSet.cpp",
|
||||
@ -144,8 +145,6 @@ skia_gpu_sources = [
|
||||
"$_src/gpu/GrProgramDesc.h",
|
||||
"$_src/gpu/GrProcessor.cpp",
|
||||
"$_src/gpu/GrProcessorUnitTest.cpp",
|
||||
"$_src/gpu/GrProcOptInfo.cpp",
|
||||
"$_src/gpu/GrProcOptInfo.h",
|
||||
"$_src/gpu/GrGpuResourceRef.cpp",
|
||||
"$_src/gpu/GrQuad.h",
|
||||
"$_src/gpu/GrRect.h",
|
||||
|
@ -8,13 +8,13 @@
|
||||
#include "GrFragmentProcessor.h"
|
||||
#include "GrCoordTransform.h"
|
||||
#include "GrPipeline.h"
|
||||
#include "GrProcOptInfo.h"
|
||||
#include "GrPipelineAnalysis.h"
|
||||
#include "effects/GrConstColorProcessor.h"
|
||||
#include "effects/GrXfermodeFragmentProcessor.h"
|
||||
#include "glsl/GrGLSLFragmentProcessor.h"
|
||||
#include "glsl/GrGLSLFragmentShaderBuilder.h"
|
||||
#include "glsl/GrGLSLProgramDataManager.h"
|
||||
#include "glsl/GrGLSLUniformHandler.h"
|
||||
#include "effects/GrConstColorProcessor.h"
|
||||
#include "effects/GrXfermodeFragmentProcessor.h"
|
||||
|
||||
GrFragmentProcessor::~GrFragmentProcessor() {
|
||||
// If we got here then our ref count must have reached zero, so we will have converted refs
|
||||
@ -466,7 +466,7 @@ sk_sp<GrFragmentProcessor> GrFragmentProcessor::RunInSeries(sk_sp<GrFragmentProc
|
||||
return series[0];
|
||||
}
|
||||
// Run the through the series, do the invariant output processing, and look for eliminations.
|
||||
GrProcOptInfo info;
|
||||
GrColorFragmentProcessorAnalysis info;
|
||||
info.analyzeProcessors(sk_sp_address_as_pointer_address(series), cnt);
|
||||
SkTArray<sk_sp<GrFragmentProcessor>> replacementSeries;
|
||||
GrColor4f knownColor;
|
||||
|
@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "GrPaint.h"
|
||||
#include "GrProcOptInfo.h"
|
||||
#include "GrXferProcessor.h"
|
||||
#include "effects/GrCoverageSetOpXP.h"
|
||||
#include "effects/GrPorterDuffXferProcessor.h"
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include "GrCaps.h"
|
||||
#include "GrGpu.h"
|
||||
#include "GrPipelineBuilder.h"
|
||||
#include "GrProcOptInfo.h"
|
||||
#include "GrRenderTargetContext.h"
|
||||
#include "GrRenderTargetOpList.h"
|
||||
#include "GrRenderTargetPriv.h"
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include "GrNonAtomicRef.h"
|
||||
#include "GrPendingProgramElement.h"
|
||||
#include "GrPrimitiveProcessor.h"
|
||||
#include "GrProcOptInfo.h"
|
||||
#include "GrProcessorSet.h"
|
||||
#include "GrProgramDesc.h"
|
||||
#include "GrScissorState.h"
|
||||
|
@ -5,11 +5,12 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "GrProcOptInfo.h"
|
||||
#include "GrPipelineAnalysis.h"
|
||||
#include "GrGeometryProcessor.h"
|
||||
#include "ops/GrDrawOp.h"
|
||||
|
||||
void GrProcOptInfo::analyzeProcessors(const GrFragmentProcessor* const* processors, int cnt) {
|
||||
void GrColorFragmentProcessorAnalysis::analyzeProcessors(
|
||||
const GrFragmentProcessor* const* processors, int cnt) {
|
||||
for (int i = 0; i < cnt; ++i) {
|
||||
bool knowCurrentOutput = fProcessorsVisitedWithKnownOutput == fTotalProcessorsVisited;
|
||||
if (fUsesLocalCoords && !knowCurrentOutput &&
|
||||
@ -18,8 +19,8 @@ void GrProcOptInfo::analyzeProcessors(const GrFragmentProcessor* const* processo
|
||||
return;
|
||||
}
|
||||
const GrFragmentProcessor* fp = processors[i];
|
||||
if (knowCurrentOutput && fp->hasConstantOutputForConstantInput(fLastKnownOutputColor,
|
||||
&fLastKnownOutputColor)) {
|
||||
if (knowCurrentOutput &&
|
||||
fp->hasConstantOutputForConstantInput(fLastKnownOutputColor, &fLastKnownOutputColor)) {
|
||||
++fProcessorsVisitedWithKnownOutput;
|
||||
fIsOpaque = fLastKnownOutputColor.isOpaque();
|
||||
// We reset these since the caller is expected to not use the earlier fragment
|
@ -5,27 +5,73 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#ifndef GrProcOptInfo_DEFINED
|
||||
#define GrProcOptInfo_DEFINED
|
||||
#ifndef GrPipelineAnalysis_DEFINED
|
||||
#define GrPipelineAnalysis_DEFINED
|
||||
|
||||
#include "GrColor.h"
|
||||
#include "GrPipelineInput.h"
|
||||
|
||||
class GrDrawOp;
|
||||
class GrFragmentProcessor;
|
||||
class GrPrimitiveProcessor;
|
||||
|
||||
/**
|
||||
* GrProcOptInfo gathers invariant data from a set of processor stages.It is used to recognize
|
||||
* optimizations related to eliminating stages and vertex attributes that aren't necessary for a
|
||||
* draw.
|
||||
*/
|
||||
class GrProcOptInfo {
|
||||
class GrPipelineAnalysisColor {
|
||||
public:
|
||||
GrProcOptInfo() = default;
|
||||
enum class Opaque {
|
||||
kNo,
|
||||
kYes,
|
||||
};
|
||||
|
||||
GrProcOptInfo(const GrPipelineInput& input) : GrProcOptInfo() {
|
||||
fAllProcessorsCompatibleWithCoverageAsAlpha = !input.isLCDCoverage();
|
||||
GrPipelineAnalysisColor(Opaque opaque = Opaque::kNo)
|
||||
: fFlags(opaque == Opaque::kYes ? kIsOpaque_Flag : 0) {}
|
||||
|
||||
GrPipelineAnalysisColor(GrColor color) { this->setToConstant(color); }
|
||||
|
||||
void setToConstant(GrColor color) {
|
||||
fColor = color;
|
||||
if (GrColorIsOpaque(color)) {
|
||||
fFlags = kColorIsKnown_Flag | kIsOpaque_Flag;
|
||||
} else {
|
||||
fFlags = kColorIsKnown_Flag;
|
||||
}
|
||||
}
|
||||
|
||||
void setToUnknown() { fFlags = 0; }
|
||||
|
||||
void setToUnknownOpaque() { fFlags = kIsOpaque_Flag; }
|
||||
|
||||
bool isOpaque() const { return SkToBool(kIsOpaque_Flag & fFlags); }
|
||||
|
||||
bool isConstant(GrColor* color) const {
|
||||
if (kColorIsKnown_Flag & fFlags) {
|
||||
*color = fColor;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
enum Flags {
|
||||
kColorIsKnown_Flag = 0x1,
|
||||
kIsOpaque_Flag = 0x2,
|
||||
};
|
||||
uint32_t fFlags;
|
||||
GrColor fColor;
|
||||
};
|
||||
|
||||
enum class GrPipelineAnalysisCoverage { kNone, kSingleChannel, kLCD };
|
||||
|
||||
/**
|
||||
* GrColorFragmentProcessorAnalysis gathers invariant data from a set of color fragment processor.
|
||||
* It is used to recognize optimizations that can simplify the generated shader or make blending
|
||||
* more effecient.
|
||||
*/
|
||||
class GrColorFragmentProcessorAnalysis {
|
||||
public:
|
||||
GrColorFragmentProcessorAnalysis() = default;
|
||||
|
||||
GrColorFragmentProcessorAnalysis(const GrPipelineAnalysisColor& input)
|
||||
: GrColorFragmentProcessorAnalysis() {
|
||||
fAllProcessorsCompatibleWithCoverageAsAlpha = true;
|
||||
fIsOpaque = input.isOpaque();
|
||||
GrColor color;
|
||||
if (input.isConstant(&color)) {
|
||||
@ -34,7 +80,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void reset(const GrPipelineInput& input) { *this = GrProcOptInfo(input); }
|
||||
void reset(const GrPipelineAnalysisColor& input) {
|
||||
*this = GrColorFragmentProcessorAnalysis(input);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs through a series of processors and updates calculated values. This can be called
|
||||
@ -80,14 +128,12 @@ public:
|
||||
return SkTMax(0, fProcessorsVisitedWithKnownOutput);
|
||||
}
|
||||
|
||||
bool hasKnownOutputColor(GrColor* knownOutputColor = nullptr) const {
|
||||
GrPipelineAnalysisColor outputColor() const {
|
||||
if (fProcessorsVisitedWithKnownOutput != fTotalProcessorsVisited) {
|
||||
return false;
|
||||
return GrPipelineAnalysisColor(fIsOpaque ? GrPipelineAnalysisColor::Opaque::kYes
|
||||
: GrPipelineAnalysisColor::Opaque::kNo);
|
||||
}
|
||||
if (knownOutputColor) {
|
||||
*knownOutputColor = fLastKnownOutputColor.toGrColor();
|
||||
}
|
||||
return true;
|
||||
return GrPipelineAnalysisColor(fLastKnownOutputColor.toGrColor());
|
||||
}
|
||||
|
||||
private:
|
@ -1,76 +0,0 @@
|
||||
/*
|
||||
* Copyright 2014 Google Inc.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#ifndef GrPipelineInput_DEFINED
|
||||
#define GrPipelineInput_DEFINED
|
||||
|
||||
#include "GrColor.h"
|
||||
|
||||
/**
|
||||
* This describes the color or coverage input that will be seen by the first color or coverage stage
|
||||
* of a GrPipeline. This is also the GrPrimitiveProcessor color or coverage *output*.
|
||||
*/
|
||||
struct GrPipelineInput {
|
||||
enum class Opaque {
|
||||
kNo,
|
||||
kYes,
|
||||
};
|
||||
|
||||
GrPipelineInput(Opaque opaque = Opaque::kNo)
|
||||
: fFlags(opaque == Opaque::kYes ? kIsOpaque_Flag : 0) {}
|
||||
|
||||
GrPipelineInput(GrColor color) : fFlags(kColorIsKnown_Flag), fColor(color) {}
|
||||
|
||||
void setToConstant(GrColor color) {
|
||||
fColor = color;
|
||||
if (GrColorIsOpaque(color)) {
|
||||
fFlags = kColorIsKnown_Flag | kIsOpaque_Flag;
|
||||
} else {
|
||||
fFlags = kColorIsKnown_Flag;
|
||||
}
|
||||
}
|
||||
|
||||
void setToUnknown() { fFlags = 0; }
|
||||
|
||||
void setToUnknownOpaque() { fFlags = kIsOpaque_Flag; }
|
||||
|
||||
void setToSolidCoverage() {
|
||||
fColor = GrColor_WHITE;
|
||||
fFlags = kColorIsKnown_Flag | kIsOpaque_Flag;
|
||||
}
|
||||
|
||||
void setToScalar(uint8_t alpha) {
|
||||
this->setToConstant(GrColorPackRGBA(alpha, alpha, alpha, alpha));
|
||||
}
|
||||
|
||||
void setToLCDCoverage() { fFlags = kIsLCDCoverage_Flag; }
|
||||
|
||||
bool isLCDCoverage() const { return SkToBool(kIsLCDCoverage_Flag & fFlags); }
|
||||
|
||||
bool isOpaque() const { return SkToBool(kIsOpaque_Flag & fFlags); }
|
||||
|
||||
bool isSolidWhite() const { return (kColorIsKnown_Flag & fFlags) && GrColor_WHITE == fColor; }
|
||||
|
||||
bool isConstant(GrColor* color) const {
|
||||
if (kColorIsKnown_Flag & fFlags) {
|
||||
*color = fColor;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
enum Flags {
|
||||
kColorIsKnown_Flag = 0x1,
|
||||
kIsOpaque_Flag = 0x2,
|
||||
kIsLCDCoverage_Flag = 0x4,
|
||||
};
|
||||
uint32_t fFlags;
|
||||
GrColor fColor;
|
||||
};
|
||||
|
||||
#endif
|
@ -8,7 +8,7 @@
|
||||
#include "GrProcessorSet.h"
|
||||
#include "GrAppliedClip.h"
|
||||
#include "GrCaps.h"
|
||||
#include "GrProcOptInfo.h"
|
||||
#include "GrPipelineAnalysis.h"
|
||||
|
||||
GrProcessorSet::GrProcessorSet(GrPaint&& paint) {
|
||||
fXPFactory = paint.fXPFactory;
|
||||
@ -80,13 +80,14 @@ bool GrProcessorSet::operator==(const GrProcessorSet& that) const {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void GrProcessorSet::FragmentProcessorAnalysis::internalInit(const GrPipelineInput& colorInput,
|
||||
const GrPipelineInput coverageInput,
|
||||
const GrProcessorSet& processors,
|
||||
const GrFragmentProcessor* clipFP,
|
||||
const GrCaps& caps) {
|
||||
GrProcOptInfo colorInfo(colorInput);
|
||||
fCompatibleWithCoverageAsAlpha = !coverageInput.isLCDCoverage();
|
||||
void GrProcessorSet::FragmentProcessorAnalysis::internalInit(
|
||||
const GrPipelineAnalysisColor& colorInput,
|
||||
const GrPipelineAnalysisCoverage coverageInput,
|
||||
const GrProcessorSet& processors,
|
||||
const GrFragmentProcessor* clipFP,
|
||||
const GrCaps& caps) {
|
||||
GrColorFragmentProcessorAnalysis colorInfo(colorInput);
|
||||
fCompatibleWithCoverageAsAlpha = GrPipelineAnalysisCoverage::kLCD != coverageInput;
|
||||
fValidInputColor = colorInput.isConstant(&fInputColor);
|
||||
|
||||
const GrFragmentProcessor* const* fps =
|
||||
@ -115,27 +116,27 @@ void GrProcessorSet::FragmentProcessorAnalysis::internalInit(const GrPipelineInp
|
||||
fInitialColorProcessorsToEliminate = colorInfo.initialProcessorsToEliminate(&fInputColor);
|
||||
fValidInputColor |= SkToBool(fInitialColorProcessorsToEliminate);
|
||||
|
||||
bool opaque = colorInfo.isOpaque();
|
||||
if (colorInfo.hasKnownOutputColor(&fKnownOutputColor)) {
|
||||
fOutputColorType = static_cast<unsigned>(opaque ? ColorType::kOpaqueConstant
|
||||
: ColorType::kConstant);
|
||||
} else if (opaque) {
|
||||
GrPipelineAnalysisColor outputColor = colorInfo.outputColor();
|
||||
if (outputColor.isConstant(&fKnownOutputColor)) {
|
||||
fOutputColorType = static_cast<unsigned>(outputColor.isOpaque() ? ColorType::kOpaqueConstant
|
||||
: ColorType::kConstant);
|
||||
} else if (outputColor.isOpaque()) {
|
||||
fOutputColorType = static_cast<unsigned>(ColorType::kOpaque);
|
||||
} else {
|
||||
fOutputColorType = static_cast<unsigned>(ColorType::kUnknown);
|
||||
}
|
||||
|
||||
if (coverageInput.isLCDCoverage()) {
|
||||
fOutputCoverageType = static_cast<unsigned>(CoverageType::kLCD);
|
||||
if (GrPipelineAnalysisCoverage::kLCD == coverageInput) {
|
||||
fOutputCoverageType = static_cast<unsigned>(GrPipelineAnalysisCoverage::kLCD);
|
||||
} else if (hasCoverageFP || GrPipelineAnalysisCoverage::kSingleChannel == coverageInput) {
|
||||
fOutputCoverageType = static_cast<unsigned>(GrPipelineAnalysisCoverage::kSingleChannel);
|
||||
} else {
|
||||
fOutputCoverageType = hasCoverageFP || !coverageInput.isSolidWhite()
|
||||
? static_cast<unsigned>(CoverageType::kSingleChannel)
|
||||
: static_cast<unsigned>(CoverageType::kNone);
|
||||
fOutputCoverageType = static_cast<unsigned>(GrPipelineAnalysisCoverage::kNone);
|
||||
}
|
||||
}
|
||||
|
||||
void GrProcessorSet::FragmentProcessorAnalysis::init(const GrPipelineInput& colorInput,
|
||||
const GrPipelineInput coverageInput,
|
||||
void GrProcessorSet::FragmentProcessorAnalysis::init(const GrPipelineAnalysisColor& colorInput,
|
||||
const GrPipelineAnalysisCoverage coverageInput,
|
||||
const GrProcessorSet& processors,
|
||||
const GrAppliedClip* appliedClip,
|
||||
const GrCaps& caps) {
|
||||
@ -146,16 +147,19 @@ void GrProcessorSet::FragmentProcessorAnalysis::init(const GrPipelineInput& colo
|
||||
}
|
||||
|
||||
GrProcessorSet::FragmentProcessorAnalysis::FragmentProcessorAnalysis(
|
||||
const GrPipelineInput& colorInput, const GrPipelineInput coverageInput, const GrCaps& caps)
|
||||
const GrPipelineAnalysisColor& colorInput,
|
||||
const GrPipelineAnalysisCoverage coverageInput,
|
||||
const GrCaps& caps)
|
||||
: FragmentProcessorAnalysis() {
|
||||
this->internalInit(colorInput, coverageInput, GrProcessorSet(GrPaint()), nullptr, caps);
|
||||
}
|
||||
|
||||
void GrProcessorSet::analyzeAndEliminateFragmentProcessors(FragmentProcessorAnalysis* analysis,
|
||||
const GrPipelineInput& colorInput,
|
||||
const GrPipelineInput coverageInput,
|
||||
const GrAppliedClip* clip,
|
||||
const GrCaps& caps) {
|
||||
void GrProcessorSet::analyzeAndEliminateFragmentProcessors(
|
||||
FragmentProcessorAnalysis* analysis,
|
||||
const GrPipelineAnalysisColor& colorInput,
|
||||
const GrPipelineAnalysisCoverage coverageInput,
|
||||
const GrAppliedClip* clip,
|
||||
const GrCaps& caps) {
|
||||
analysis->init(colorInput, coverageInput, *this, clip, caps);
|
||||
if (analysis->fInitialColorProcessorsToEliminate > 0) {
|
||||
for (unsigned i = 0; i < analysis->fInitialColorProcessorsToEliminate; ++i) {
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "GrFragmentProcessor.h"
|
||||
#include "GrPaint.h"
|
||||
#include "GrPipelineInput.h"
|
||||
#include "GrPipelineAnalysis.h"
|
||||
#include "SkTemplates.h"
|
||||
|
||||
class GrAppliedClip;
|
||||
@ -79,16 +79,16 @@ public:
|
||||
: fIsInitializedWithProcessorSet(false)
|
||||
, fCompatibleWithCoverageAsAlpha(true)
|
||||
, fValidInputColor(false)
|
||||
, fOutputCoverageType(static_cast<unsigned>(CoverageType::kNone))
|
||||
, fOutputCoverageType(static_cast<unsigned>(GrPipelineAnalysisCoverage::kNone))
|
||||
, fOutputColorType(static_cast<unsigned>(ColorType::kUnknown))
|
||||
, fInitialColorProcessorsToEliminate(0) {}
|
||||
|
||||
// This version is used by a unit test that assumes no clip, no processors, and no PLS.
|
||||
FragmentProcessorAnalysis(const GrPipelineInput& colorInput,
|
||||
const GrPipelineInput coverageInput, const GrCaps&);
|
||||
FragmentProcessorAnalysis(const GrPipelineAnalysisColor&, GrPipelineAnalysisCoverage,
|
||||
const GrCaps&);
|
||||
|
||||
void init(const GrPipelineInput& colorInput, const GrPipelineInput coverageInput,
|
||||
const GrProcessorSet&, const GrAppliedClip*, const GrCaps&);
|
||||
void init(const GrPipelineAnalysisColor&, GrPipelineAnalysisCoverage, const GrProcessorSet&,
|
||||
const GrAppliedClip*, const GrCaps&);
|
||||
|
||||
bool isInitializedWithProcessorSet() const { return fIsInitializedWithProcessorSet; }
|
||||
|
||||
@ -132,19 +132,19 @@ public:
|
||||
}
|
||||
return constant;
|
||||
}
|
||||
bool hasCoverage() const { return CoverageType::kNone != this->outputCoverageType(); }
|
||||
bool hasLCDCoverage() const { return CoverageType::kLCD == this->outputCoverageType(); }
|
||||
GrPipelineAnalysisCoverage outputCoverageType() const {
|
||||
return static_cast<GrPipelineAnalysisCoverage>(fOutputCoverageType);
|
||||
}
|
||||
bool hasCoverage() const {
|
||||
return this->outputCoverageType() != GrPipelineAnalysisCoverage::kNone;
|
||||
}
|
||||
|
||||
private:
|
||||
enum class ColorType : unsigned { kUnknown, kOpaqueConstant, kConstant, kOpaque };
|
||||
enum class CoverageType : unsigned { kNone, kSingleChannel, kLCD };
|
||||
|
||||
CoverageType outputCoverageType() const {
|
||||
return static_cast<CoverageType>(fOutputCoverageType);
|
||||
}
|
||||
ColorType outputColorType() const { return static_cast<ColorType>(fOutputColorType); }
|
||||
|
||||
void internalInit(const GrPipelineInput& colorInput, const GrPipelineInput coverageInput,
|
||||
void internalInit(const GrPipelineAnalysisColor&, const GrPipelineAnalysisCoverage,
|
||||
const GrProcessorSet&, const GrFragmentProcessor* clipFP, const GrCaps&);
|
||||
|
||||
// MSVS 2015 won't pack a bool with an unsigned.
|
||||
@ -166,8 +166,8 @@ public:
|
||||
GR_STATIC_ASSERT(sizeof(FragmentProcessorAnalysis) == 2 * sizeof(GrColor) + sizeof(uint32_t));
|
||||
|
||||
void analyzeAndEliminateFragmentProcessors(FragmentProcessorAnalysis*,
|
||||
const GrPipelineInput& colorInput,
|
||||
const GrPipelineInput coverageInput,
|
||||
const GrPipelineAnalysisColor& colorInput,
|
||||
const GrPipelineAnalysisCoverage coverageInput,
|
||||
const GrAppliedClip*, const GrCaps&);
|
||||
|
||||
private:
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
#include "GrXferProcessor.h"
|
||||
#include "GrPipeline.h"
|
||||
#include "GrProcOptInfo.h"
|
||||
#include "gl/GrGLCaps.h"
|
||||
|
||||
GrXferProcessor::GrXferProcessor()
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
class GrShaderCaps;
|
||||
class GrGLSLXferProcessor;
|
||||
class GrProcOptInfo;
|
||||
|
||||
/**
|
||||
* Barriers for blending. When a shader reads the dst directly, an Xfer barrier is sometimes
|
||||
|
@ -8,10 +8,9 @@
|
||||
#include "effects/GrCoverageSetOpXP.h"
|
||||
#include "GrCaps.h"
|
||||
#include "GrColor.h"
|
||||
#include "GrRenderTargetContext.h"
|
||||
#include "GrPipeline.h"
|
||||
#include "GrProcessor.h"
|
||||
#include "GrProcOptInfo.h"
|
||||
#include "GrRenderTargetContext.h"
|
||||
#include "glsl/GrGLSLBlend.h"
|
||||
#include "glsl/GrGLSLFragmentShaderBuilder.h"
|
||||
#include "glsl/GrGLSLUniformHandler.h"
|
||||
|
@ -12,8 +12,6 @@
|
||||
#include "GrXferProcessor.h"
|
||||
#include "SkRegion.h"
|
||||
|
||||
class GrProcOptInfo;
|
||||
|
||||
// See the comment above GrXPFactory's definition about this warning suppression.
|
||||
#if defined(__GNUC__) || defined(__clang)
|
||||
#pragma GCC diagnostic push
|
||||
|
@ -52,12 +52,12 @@ static constexpr GrBlendEquation hw_blend_equation(SkBlendMode mode) {
|
||||
#undef EQ_OFFSET
|
||||
}
|
||||
|
||||
static bool can_use_hw_blend_equation(GrBlendEquation equation, bool isLCDCoverage,
|
||||
static bool can_use_hw_blend_equation(GrBlendEquation equation, GrPipelineAnalysisCoverage coverage,
|
||||
const GrCaps& caps) {
|
||||
if (!caps.advancedBlendEquationSupport()) {
|
||||
return false;
|
||||
}
|
||||
if (isLCDCoverage) {
|
||||
if (GrPipelineAnalysisCoverage::kLCD == coverage) {
|
||||
return false; // LCD coverage must be applied after the blend equation.
|
||||
}
|
||||
if (caps.canUseAdvancedBlendEquation(equation)) {
|
||||
@ -347,7 +347,7 @@ GrXferProcessor* CustomXPFactory::onCreateXferProcessor(const GrCaps& caps,
|
||||
bool hasMixedSamples,
|
||||
const DstTexture* dstTexture) const {
|
||||
SkASSERT(GrCustomXfermode::IsSupportedMode(fMode));
|
||||
if (can_use_hw_blend_equation(fHWBlendEquation, analysis.hasLCDCoverage(), caps)) {
|
||||
if (can_use_hw_blend_equation(fHWBlendEquation, analysis.outputCoverageType(), caps)) {
|
||||
SkASSERT(!dstTexture || !dstTexture->texture());
|
||||
return new CustomXP(fMode, fHWBlendEquation);
|
||||
}
|
||||
@ -356,7 +356,7 @@ GrXferProcessor* CustomXPFactory::onCreateXferProcessor(const GrCaps& caps,
|
||||
|
||||
bool CustomXPFactory::willReadDstInShader(const GrCaps& caps,
|
||||
const FragmentProcessorAnalysis& analysis) const {
|
||||
return !can_use_hw_blend_equation(fHWBlendEquation, analysis.hasLCDCoverage(), caps);
|
||||
return !can_use_hw_blend_equation(fHWBlendEquation, analysis.outputCoverageType(), caps);
|
||||
}
|
||||
|
||||
GR_DEFINE_XP_FACTORY_TEST(CustomXPFactory);
|
||||
|
@ -12,8 +12,6 @@
|
||||
#include "GrXferProcessor.h"
|
||||
#include "SkRefCnt.h"
|
||||
|
||||
class GrProcOptInfo;
|
||||
|
||||
// See the comment above GrXPFactory's definition about this warning suppression.
|
||||
#if defined(__GNUC__) || defined(__clang)
|
||||
#pragma GCC diagnostic push
|
||||
|
@ -10,8 +10,8 @@
|
||||
#include "GrBlend.h"
|
||||
#include "GrCaps.h"
|
||||
#include "GrPipeline.h"
|
||||
#include "GrPipelineAnalysis.h"
|
||||
#include "GrProcessor.h"
|
||||
#include "GrProcOptInfo.h"
|
||||
#include "GrTypes.h"
|
||||
#include "GrXferProcessor.h"
|
||||
#include "glsl/GrGLSLBlend.h"
|
||||
@ -19,7 +19,6 @@
|
||||
#include "glsl/GrGLSLProgramDataManager.h"
|
||||
#include "glsl/GrGLSLUniformHandler.h"
|
||||
#include "glsl/GrGLSLXferProcessor.h"
|
||||
#include <utility>
|
||||
|
||||
/**
|
||||
* Wraps the shader outputs and HW blend state that comprise a Porter Duff blend mode with coverage.
|
||||
@ -736,7 +735,7 @@ GrXferProcessor* GrPorterDuffXPFactory::onCreateXferProcessor(
|
||||
bool hasMixedSamples,
|
||||
const DstTexture* dstTexture) const {
|
||||
BlendFormula blendFormula;
|
||||
if (analysis.hasLCDCoverage()) {
|
||||
if (analysis.outputCoverageType() == GrPipelineAnalysisCoverage::kLCD) {
|
||||
if (SkBlendMode::kSrcOver == fBlendMode && analysis.hasKnownOutputColor() &&
|
||||
!caps.shaderCaps()->dualSourceBlendingSupport() &&
|
||||
!caps.shaderCaps()->dstReadInShaderSupport()) {
|
||||
@ -775,7 +774,7 @@ bool GrPorterDuffXPFactory::willReadDstInShader(const GrCaps& caps,
|
||||
// When we have four channel coverage we always need to read the dst in order to correctly
|
||||
// blend. The one exception is when we are using srcover mode and we know the input color into
|
||||
// the XP.
|
||||
if (analysis.hasLCDCoverage()) {
|
||||
if (analysis.outputCoverageType() == GrPipelineAnalysisCoverage::kLCD) {
|
||||
if (SkBlendMode::kSrcOver == fBlendMode && analysis.hasKnownOutputColor() &&
|
||||
!caps.shaderCaps()->dstReadInShaderSupport()) {
|
||||
return false;
|
||||
@ -838,7 +837,7 @@ GrXferProcessor* GrPorterDuffXPFactory::CreateSrcOverXferProcessor(
|
||||
// doing lcd blending we will just use our global SimpleSrcOverXP. This slightly differs from
|
||||
// the general case where we convert a src-over blend that has solid coverage and an opaque
|
||||
// color to src-mode, which allows disabling of blending.
|
||||
if (!analysis.hasLCDCoverage()) {
|
||||
if (analysis.outputCoverageType() != GrPipelineAnalysisCoverage::kLCD) {
|
||||
// We return nullptr here, which our caller interprets as meaning "use SimpleSrcOverXP".
|
||||
// We don't simply return the address of that XP here because our caller would have to unref
|
||||
// it and since it is a global object and GrProgramElement's ref-cnting system is not thread
|
||||
@ -880,7 +879,7 @@ bool GrPorterDuffXPFactory::WillSrcOverNeedDstTexture(const GrCaps& caps,
|
||||
// When we have four channel coverage we always need to read the dst in order to correctly
|
||||
// blend. The one exception is when we are using srcover mode and we know the input color
|
||||
// into the XP.
|
||||
if (analysis.hasLCDCoverage()) {
|
||||
if (analysis.outputCoverageType() == GrPipelineAnalysisCoverage::kLCD) {
|
||||
if (analysis.hasKnownOutputColor() && !caps.shaderCaps()->dstReadInShaderSupport()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -12,8 +12,6 @@
|
||||
#include "GrXferProcessor.h"
|
||||
#include "SkBlendMode.h"
|
||||
|
||||
class GrProcOptInfo;
|
||||
|
||||
// See the comment above GrXPFactory's definition about this warning suppression.
|
||||
#if defined(__GNUC__) || defined(__clang)
|
||||
#pragma GCC diagnostic push
|
||||
|
@ -334,12 +334,12 @@ void InstancedRendering::Op::appendParamsTexel(SkScalar x, SkScalar y, SkScalar
|
||||
|
||||
bool InstancedRendering::Op::xpRequiresDstTexture(const GrCaps& caps, const GrAppliedClip* clip) {
|
||||
GrProcessorSet::FragmentProcessorAnalysis analysis;
|
||||
GrPipelineInput coverageInput;
|
||||
GrPipelineAnalysisCoverage coverageInput;
|
||||
if (GrAAType::kCoverage == fInfo.aaType() ||
|
||||
(GrAAType::kNone == fInfo.aaType() && !fInfo.isSimpleRects() && fInfo.fCannotDiscard)) {
|
||||
coverageInput = GrPipelineInput();
|
||||
coverageInput = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
} else {
|
||||
coverageInput = GrColor_WHITE;
|
||||
coverageInput = GrPipelineAnalysisCoverage::kNone;
|
||||
}
|
||||
fProcessors.analyzeAndEliminateFragmentProcessors(&analysis, this->getSingleInstance().fColor,
|
||||
coverageInput, clip, caps);
|
||||
@ -470,18 +470,18 @@ void InstancedRendering::Op::onExecute(GrOpFlushState* state) {
|
||||
state->gpu()->handleDirtyContext();
|
||||
|
||||
GrProcessorSet::FragmentProcessorAnalysis analysis;
|
||||
GrPipelineInput coverageInput;
|
||||
GrPipelineAnalysisCoverage coverageInput;
|
||||
if (GrAAType::kCoverage == fInfo.aaType() ||
|
||||
(GrAAType::kNone == fInfo.aaType() && !fInfo.isSimpleRects() && fInfo.fCannotDiscard)) {
|
||||
coverageInput = GrPipelineInput();
|
||||
coverageInput = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
} else {
|
||||
coverageInput = GrColor_WHITE;
|
||||
coverageInput = GrPipelineAnalysisCoverage::kNone;
|
||||
}
|
||||
GrPipelineInput colorInput;
|
||||
GrPipelineAnalysisColor colorInput;
|
||||
if (fDrawColorsAreSame) {
|
||||
colorInput = fHeadDraw->fInstance.fColor;
|
||||
} else if (fDrawColorsAreOpaque) {
|
||||
colorInput = GrPipelineInput::Opaque::kYes;
|
||||
colorInput = GrPipelineAnalysisColor::Opaque::kYes;
|
||||
}
|
||||
const GrAppliedClip* clip = state->drawOpArgs().fAppliedClip;
|
||||
analysis.init(colorInput, coverageInput, fProcessors, clip, state->caps());
|
||||
|
@ -747,9 +747,10 @@ private:
|
||||
this->setTransformedBounds(path.getBounds(), viewMatrix, HasAABloat::kYes, IsZeroArea::kNo);
|
||||
}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -203,9 +203,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(this->first()->color());
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(this->first()->color());
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void onPrepareDraws(Target* target) const override {
|
||||
|
@ -710,9 +710,10 @@ private:
|
||||
IsZeroArea::kYes);
|
||||
}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -172,9 +172,10 @@ private:
|
||||
this->setTransformedBounds(bounds, viewMatrix, HasAABloat::kYes, IsZeroArea::kNo);
|
||||
}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fPaths[0].fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fPaths[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -174,9 +174,10 @@ public:
|
||||
private:
|
||||
AAStrokeRectOp() : INHERITED(ClassID()) {}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fRects[0].fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fRects[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations&) override;
|
||||
void onPrepareDraws(Target*) const override;
|
||||
|
@ -269,9 +269,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fGeoData[0].fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fGeoData[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -46,24 +46,25 @@ SkString GrAtlasTextOp::dumpInfo() const {
|
||||
return str;
|
||||
}
|
||||
|
||||
void GrAtlasTextOp::getFragmentProcessorAnalysisInputs(
|
||||
FragmentProcessorAnalysisInputs* input) const {
|
||||
void GrAtlasTextOp::getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const {
|
||||
if (kColorBitmapMask_MaskType == fMaskType) {
|
||||
input->colorInput()->setToUnknown();
|
||||
color->setToUnknown();
|
||||
} else {
|
||||
input->colorInput()->setToConstant(fColor);
|
||||
color->setToConstant(fColor);
|
||||
}
|
||||
switch (fMaskType) {
|
||||
case kGrayscaleDistanceField_MaskType:
|
||||
case kGrayscaleCoverageMask_MaskType:
|
||||
input->coverageInput()->setToUnknown();
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
break;
|
||||
case kLCDCoverageMask_MaskType:
|
||||
case kLCDDistanceField_MaskType:
|
||||
input->coverageInput()->setToLCDCoverage();
|
||||
*coverage = GrPipelineAnalysisCoverage::kLCD;
|
||||
break;
|
||||
case kColorBitmapMask_MaskType:
|
||||
input->coverageInput()->setToSolidCoverage();
|
||||
*coverage = GrPipelineAnalysisCoverage::kNone;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,8 @@ public:
|
||||
SkString dumpInfo() const override;
|
||||
|
||||
private:
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs*) const override;
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor*,
|
||||
GrPipelineAnalysisCoverage*) const override;
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations&) override;
|
||||
|
||||
struct FlushInfo {
|
||||
|
@ -296,9 +296,10 @@ private:
|
||||
this->setTransformedBounds(bounds, combinedMatrix, aaBloat, zeroArea);
|
||||
}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -132,9 +132,11 @@ private:
|
||||
isHairline ? IsZeroArea::kYes : IsZeroArea::kNo);
|
||||
}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fColor);
|
||||
input->coverageInput()->setToScalar(this->coverage());
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fColor);
|
||||
*coverage = this->coverage() == 0xff ? GrPipelineAnalysisCoverage::kNone
|
||||
: GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -39,13 +39,14 @@ private:
|
||||
GrDrawAtlasOp(GrColor color, const SkMatrix& viewMatrix, int spriteCount,
|
||||
const SkRSXform* xforms, const SkRect* rects, const SkColor* colors);
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
if (this->hasColors()) {
|
||||
input->colorInput()->setToUnknown();
|
||||
color->setToUnknown();
|
||||
} else {
|
||||
input->colorInput()->setToConstant(fGeoData[0].fColor);
|
||||
color->setToConstant(fGeoData[0].fColor);
|
||||
}
|
||||
input->coverageInput()->setToSolidCoverage();
|
||||
*coverage = GrPipelineAnalysisCoverage::kNone;
|
||||
}
|
||||
|
||||
void onPrepareDraws(Target*) const override;
|
||||
|
@ -43,8 +43,8 @@ protected:
|
||||
GrPipelineOptimizations initPipeline(const GrOpFlushState&, GrPipeline*);
|
||||
const GrProcessorSet::FragmentProcessorAnalysis& doFragmentProcessorAnalysis(
|
||||
const GrCaps& caps, const GrAppliedClip* clip) {
|
||||
fProcessorSet.analyzeAndEliminateFragmentProcessors(&fAnalysis, fAnalysis.inputColor(),
|
||||
GrColor_WHITE, clip, caps);
|
||||
fProcessorSet.analyzeAndEliminateFragmentProcessors(
|
||||
&fAnalysis, fAnalysis.inputColor(), GrPipelineAnalysisCoverage::kNone, clip, caps);
|
||||
return fAnalysis;
|
||||
}
|
||||
const GrProcessorSet::FragmentProcessorAnalysis& fragmentProcessorAnalysis() const {
|
||||
|
@ -75,13 +75,13 @@ GrDrawVerticesOp::GrDrawVerticesOp(sk_sp<SkVertices> vertices, GrPrimitiveType p
|
||||
}
|
||||
|
||||
void GrDrawVerticesOp::getFragmentProcessorAnalysisInputs(
|
||||
FragmentProcessorAnalysisInputs* input) const {
|
||||
GrPipelineAnalysisColor* color, GrPipelineAnalysisCoverage* coverage) const {
|
||||
if (this->requiresPerVertexColors()) {
|
||||
input->colorInput()->setToUnknown();
|
||||
color->setToUnknown();
|
||||
} else {
|
||||
input->colorInput()->setToConstant(fMeshes[0].fColor);
|
||||
color->setToConstant(fMeshes[0].fColor);
|
||||
}
|
||||
input->coverageInput()->setToSolidCoverage();
|
||||
*coverage = GrPipelineAnalysisCoverage::kNone;
|
||||
}
|
||||
|
||||
void GrDrawVerticesOp::applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) {
|
||||
|
@ -70,7 +70,8 @@ private:
|
||||
GrRenderTargetContext::ColorArrayType, const SkMatrix& viewMatrix,
|
||||
uint32_t flags = 0);
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override;
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override;
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations&) override;
|
||||
void onPrepareDraws(Target*) const override;
|
||||
|
||||
|
@ -61,9 +61,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToUnknown();
|
||||
input->coverageInput()->setToSolidCoverage();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToUnknown();
|
||||
*coverage = GrPipelineAnalysisCoverage::kNone;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& analysioptimizations) override {
|
||||
|
@ -259,9 +259,10 @@ private:
|
||||
this->setBounds(devBounds, HasAABloat::kNo, IsZeroArea::kNo);
|
||||
}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fPaths[0].fColor);
|
||||
input->coverageInput()->setToSolidCoverage();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fPaths[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kNone;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -33,9 +33,10 @@ public:
|
||||
const GrProcessorSet& processors,
|
||||
const GrAppliedClip* appliedClip,
|
||||
const GrCaps& caps) const {
|
||||
FragmentProcessorAnalysisInputs input;
|
||||
this->getFragmentProcessorAnalysisInputs(&input);
|
||||
analysis->init(*input.colorInput(), *input.coverageInput(), processors, appliedClip, caps);
|
||||
GrPipelineAnalysisColor inputColor;
|
||||
GrPipelineAnalysisCoverage inputCoverage;
|
||||
this->getFragmentProcessorAnalysisInputs(&inputColor, &inputCoverage);
|
||||
analysis->init(inputColor, inputCoverage, processors, appliedClip, caps);
|
||||
}
|
||||
|
||||
void initPipeline(const GrPipeline::InitArgs& args) {
|
||||
@ -98,27 +99,13 @@ protected:
|
||||
return &fPipeline;
|
||||
}
|
||||
|
||||
/**
|
||||
* This describes aspects of the GrPrimitiveProcessor produced by a GrDrawOp that are used in
|
||||
* pipeline analysis.
|
||||
*/
|
||||
class FragmentProcessorAnalysisInputs {
|
||||
public:
|
||||
FragmentProcessorAnalysisInputs() = default;
|
||||
GrPipelineInput* colorInput() { return &fColorInput; }
|
||||
GrPipelineInput* coverageInput() { return &fCoverageInput; }
|
||||
|
||||
private:
|
||||
GrPipelineInput fColorInput;
|
||||
GrPipelineInput fCoverageInput;
|
||||
};
|
||||
|
||||
private:
|
||||
/**
|
||||
* Provides information about the GrPrimitiveProccesor color and coverage outputs which become
|
||||
* inputs to the first color and coverage fragment processors.
|
||||
*/
|
||||
virtual void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs*) const = 0;
|
||||
virtual void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor*,
|
||||
GrPipelineAnalysisCoverage*) const = 0;
|
||||
|
||||
/**
|
||||
* After GrPipeline analysis is complete this is called so that the op can use the analysis
|
||||
|
@ -110,9 +110,10 @@ public:
|
||||
private:
|
||||
NonAAFillRectOp() : INHERITED(ClassID()) {}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fRects[0].fColor);
|
||||
input->coverageInput()->setToSolidCoverage();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fRects[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kNone;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -130,9 +130,10 @@ public:
|
||||
private:
|
||||
NonAAFillRectPerspectiveOp() : INHERITED(ClassID()) {}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fRects[0].fColor);
|
||||
input->coverageInput()->setToSolidCoverage();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fRects[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kNone;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -102,9 +102,10 @@ public:
|
||||
private:
|
||||
NonAAStrokeRectOp() : INHERITED(ClassID()) {}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fColor);
|
||||
input->coverageInput()->setToSolidCoverage();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kNone;
|
||||
}
|
||||
|
||||
void onPrepareDraws(Target* target) const override {
|
||||
|
@ -805,9 +805,10 @@ public:
|
||||
private:
|
||||
CircleOp() : INHERITED(ClassID()) {}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fGeoData[0].fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fGeoData[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
@ -1256,9 +1257,10 @@ public:
|
||||
private:
|
||||
EllipseOp() : INHERITED(ClassID()) {}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fGeoData[0].fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fGeoData[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
@ -1470,9 +1472,10 @@ public:
|
||||
private:
|
||||
DIEllipseOp() : INHERITED(ClassID()) {}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fGeoData[0].fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fGeoData[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
@ -1785,9 +1788,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fGeoData[0].fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fGeoData[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
@ -2148,9 +2152,10 @@ public:
|
||||
private:
|
||||
EllipticalRRectOp() : INHERITED(ClassID()) {}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fGeoData[0].fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fGeoData[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -77,9 +77,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fRegions[0].fColor);
|
||||
input->coverageInput()->setToSolidCoverage();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fRegions[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kNone;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -142,9 +142,10 @@ public:
|
||||
private:
|
||||
ShadowCircleOp() : INHERITED(ClassID()) {}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fCircles[0].fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fCircles[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
@ -562,9 +563,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fGeoData[0].fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fGeoData[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -199,9 +199,10 @@ private:
|
||||
|
||||
}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fShapes[0].fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fShapes[0].fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -180,9 +180,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -33,9 +33,10 @@ protected:
|
||||
bool usesLocalCoords() const { return fUsesLocalCoords; }
|
||||
|
||||
private:
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(fColor);
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(fColor);
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -93,13 +93,11 @@ public:
|
||||
};
|
||||
|
||||
static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps) {
|
||||
GrPipelineInput lcdInput;
|
||||
lcdInput.setToLCDCoverage();
|
||||
GrProcessorSet::FragmentProcessorAnalysis analysis(GrPipelineInput(), lcdInput, caps);
|
||||
|
||||
GrProcessorSet::FragmentProcessorAnalysis analysis(GrPipelineAnalysisColor(),
|
||||
GrPipelineAnalysisCoverage::kLCD, caps);
|
||||
SkASSERT(!analysis.isOutputColorOpaque());
|
||||
SkASSERT(!analysis.hasKnownOutputColor());
|
||||
SkASSERT(analysis.hasLCDCoverage());
|
||||
SkASSERT(analysis.outputCoverageType() == GrPipelineAnalysisCoverage::kLCD);
|
||||
|
||||
for (int m = 0; m <= (int)SkBlendMode::kLastCoeffMode; m++) {
|
||||
SkBlendMode xfermode = static_cast<SkBlendMode>(m);
|
||||
@ -263,12 +261,12 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
|
||||
}
|
||||
}
|
||||
static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const GrCaps& caps) {
|
||||
GrProcessorSet::FragmentProcessorAnalysis analysis(GrPipelineInput(), GrPipelineInput(), caps);
|
||||
GrProcessorSet::FragmentProcessorAnalysis analysis(
|
||||
GrPipelineAnalysisColor(), GrPipelineAnalysisCoverage::kSingleChannel, caps);
|
||||
|
||||
SkASSERT(!analysis.isOutputColorOpaque());
|
||||
SkASSERT(!analysis.hasKnownOutputColor());
|
||||
SkASSERT(!analysis.hasLCDCoverage());
|
||||
SkASSERT(analysis.hasCoverage());
|
||||
SkASSERT(analysis.outputCoverageType() == GrPipelineAnalysisCoverage::kSingleChannel);
|
||||
|
||||
for (int m = 0; m <= (int)SkBlendMode::kLastCoeffMode; m++) {
|
||||
SkBlendMode xfermode = static_cast<SkBlendMode>(m);
|
||||
@ -434,7 +432,7 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
|
||||
|
||||
static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const GrCaps& caps) {
|
||||
GrProcessorSet::FragmentProcessorAnalysis analysis(GrColorPackRGBA(229, 0, 154, 240),
|
||||
GrColorPackA4(255), caps);
|
||||
GrPipelineAnalysisCoverage::kNone, caps);
|
||||
|
||||
SkASSERT(!analysis.isOutputColorOpaque());
|
||||
SkASSERT(analysis.hasKnownOutputColor());
|
||||
@ -603,13 +601,13 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
|
||||
}
|
||||
|
||||
static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const GrCaps& caps) {
|
||||
GrProcessorSet::FragmentProcessorAnalysis analysis(GrPipelineInput::Opaque::kYes,
|
||||
GrPipelineInput(), caps);
|
||||
GrProcessorSet::FragmentProcessorAnalysis analysis(GrPipelineAnalysisColor::Opaque::kYes,
|
||||
GrPipelineAnalysisCoverage::kSingleChannel,
|
||||
caps);
|
||||
|
||||
SkASSERT(analysis.isOutputColorOpaque());
|
||||
SkASSERT(!analysis.hasKnownOutputColor());
|
||||
SkASSERT(analysis.hasCoverage());
|
||||
SkASSERT(!analysis.hasLCDCoverage());
|
||||
SkASSERT(analysis.outputCoverageType() == GrPipelineAnalysisCoverage::kSingleChannel);
|
||||
|
||||
for (int m = 0; m <= (int)SkBlendMode::kLastCoeffMode; m++) {
|
||||
SkBlendMode xfermode = static_cast<SkBlendMode>(m);
|
||||
@ -775,8 +773,8 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
|
||||
}
|
||||
|
||||
static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const GrCaps& caps) {
|
||||
GrProcessorSet::FragmentProcessorAnalysis analysis(GrPipelineInput::Opaque::kYes,
|
||||
GrColorPackA4(255), caps);
|
||||
GrProcessorSet::FragmentProcessorAnalysis analysis(GrPipelineAnalysisColor::Opaque::kYes,
|
||||
GrPipelineAnalysisCoverage::kNone, caps);
|
||||
|
||||
SkASSERT(analysis.isOutputColorOpaque());
|
||||
SkASSERT(!analysis.hasKnownOutputColor());
|
||||
@ -957,9 +955,10 @@ static void test_lcd_coverage_fallback_case(skiatest::Reporter* reporter, const
|
||||
|
||||
private:
|
||||
void getFragmentProcessorAnalysisInputs(
|
||||
FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToConstant(GrColorPackRGBA(123, 45, 67, 221));
|
||||
input->coverageInput()->setToLCDCoverage();
|
||||
GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToConstant(GrColorPackRGBA(123, 45, 67, 221));
|
||||
*coverage = GrPipelineAnalysisCoverage::kLCD;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations&) override {}
|
||||
@ -973,7 +972,7 @@ static void test_lcd_coverage_fallback_case(skiatest::Reporter* reporter, const
|
||||
testLCDCoverageOp.analyzeProcessors(&analysis, GrProcessorSet(GrPaint()), nullptr, caps);
|
||||
|
||||
SkASSERT(analysis.hasKnownOutputColor());
|
||||
SkASSERT(analysis.hasLCDCoverage());
|
||||
SkASSERT(analysis.outputCoverageType() == GrPipelineAnalysisCoverage::kLCD);
|
||||
|
||||
const GrXPFactory* xpf = GrPorterDuffXPFactory::Get(SkBlendMode::kSrcOver);
|
||||
TEST_ASSERT(!GrXPFactory::WillNeedDstTexture(xpf, caps, analysis));
|
||||
@ -1017,21 +1016,16 @@ DEF_GPUTEST(PorterDuffNoDualSourceBlending, reporter, /*factory*/) {
|
||||
fakeDstTexture.setTexture(
|
||||
ctx->resourceProvider()->wrapBackendTexture(fakeDesc, kBorrow_GrWrapOwnership));
|
||||
|
||||
static const GrPipelineInput colorInputs[] = {GrPipelineInput(),
|
||||
GrPipelineInput(GrPipelineInput::Opaque::kYes),
|
||||
GrPipelineInput(GrColorPackRGBA(0, 82, 17, 100)),
|
||||
GrPipelineInput(GrColorPackRGBA(0, 82, 17, 255))};
|
||||
static const GrPipelineAnalysisColor colorInputs[] = {
|
||||
GrPipelineAnalysisColor::Opaque::kNo, GrPipelineAnalysisColor::Opaque::kYes,
|
||||
GrPipelineAnalysisColor(GrColorPackRGBA(0, 82, 17, 100)),
|
||||
GrPipelineAnalysisColor(GrColorPackRGBA(0, 82, 17, 255))};
|
||||
|
||||
for (const auto& colorInput : colorInputs) {
|
||||
GrProcessorSet::FragmentProcessorAnalysis analysis;
|
||||
for (bool fractionalCoverage : {true, false}) {
|
||||
if (fractionalCoverage) {
|
||||
analysis = GrProcessorSet::FragmentProcessorAnalysis(colorInput, GrPipelineInput(),
|
||||
caps);
|
||||
} else {
|
||||
analysis = GrProcessorSet::FragmentProcessorAnalysis(colorInput, GrColorPackA4(255),
|
||||
caps);
|
||||
}
|
||||
for (GrPipelineAnalysisCoverage coverageType :
|
||||
{GrPipelineAnalysisCoverage::kSingleChannel, GrPipelineAnalysisCoverage::kNone}) {
|
||||
analysis = GrProcessorSet::FragmentProcessorAnalysis(colorInput, coverageType, caps);
|
||||
for (int m = 0; m <= (int)SkBlendMode::kLastCoeffMode; m++) {
|
||||
SkBlendMode xfermode = static_cast<SkBlendMode>(m);
|
||||
const GrXPFactory* xpf = GrPorterDuffXPFactory::Get(xfermode);
|
||||
|
@ -64,9 +64,10 @@ protected:
|
||||
SkRect fRect;
|
||||
|
||||
private:
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToUnknown();
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToUnknown();
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
|
||||
|
@ -40,9 +40,10 @@ private:
|
||||
this->setBounds(SkRect::MakeWH(1.f, 1.f), HasAABloat::kNo, IsZeroArea::kNo);
|
||||
}
|
||||
|
||||
void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs* input) const override {
|
||||
input->colorInput()->setToUnknown();
|
||||
input->coverageInput()->setToUnknown();
|
||||
void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor* color,
|
||||
GrPipelineAnalysisCoverage* coverage) const override {
|
||||
color->setToUnknown();
|
||||
*coverage = GrPipelineAnalysisCoverage::kSingleChannel;
|
||||
}
|
||||
|
||||
void applyPipelineOptimizations(const GrPipelineOptimizations&) override {}
|
||||
|
Loading…
Reference in New Issue
Block a user