Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
GrPorterDuffTest::XPInfo Struct Reference

Public Member Functions

 XPInfo (skiatest::Reporter *reporter, SkBlendMode xfermode, const GrCaps &caps, GrProcessorAnalysisColor inputColor, GrProcessorAnalysisCoverage inputCoverage)
 

Public Attributes

bool fCompatibleWithCoverageAsAlpha
 
bool fUnaffectedByDstValue
 
bool fIgnoresInputColor
 
int fPrimaryOutputType
 
int fSecondaryOutputType
 
skgpu::BlendInfo fBlendInfo
 

Detailed Description

Definition at line 103 of file GrPorterDuffTest.cpp.

Constructor & Destructor Documentation

◆ XPInfo()

GrPorterDuffTest::XPInfo::XPInfo ( skiatest::Reporter reporter,
SkBlendMode  xfermode,
const GrCaps caps,
GrProcessorAnalysisColor  inputColor,
GrProcessorAnalysisCoverage  inputCoverage 
)
inline

Definition at line 104 of file GrPorterDuffTest.cpp.

105 {
106 const GrXPFactory* xpf = GrPorterDuffXPFactory::Get(xfermode);
107
108 bool isLCD = GrProcessorAnalysisCoverage::kLCD == inputCoverage;
109
110 GrProcessorSet::Analysis analysis = do_analysis(xpf, inputColor, inputCoverage, caps);
115 GrXPFactory::MakeXferProcessor(xpf, inputColor, inputCoverage, caps,
117 TEST_ASSERT(!analysis.requiresDstTexture() ||
118 (isLCD &&
120 (SkBlendMode::kSrcOver != xfermode ||
121 !inputColor.isOpaque())));
122 // Porter Duff modes currently only use fixed-function or shader blending, and Ganesh
123 // doesn't yet make use of framebuffer fetches that require a barrier
124 // (e.g., QCOM_shader_framebuffer_fetch_noncoherent). So dst textures and xfer barriers
125 // should always go hand in hand for Porter Duff modes.
128 fBlendInfo = xp->getBlendInfo();
129 TEST_ASSERT(!xp->willReadDstColor() ||
130 (isLCD && (SkBlendMode::kSrcOver != xfermode ||
131 !inputColor.isOpaque())));
132 TEST_ASSERT(xp->hasSecondaryOutput() ==
134 }
#define TEST_ASSERT(...)
static GrProcessorSet::Analysis do_analysis(const GrXPFactory *xpf, const GrProcessorAnalysisColor &colorInput, GrProcessorAnalysisCoverage coverageInput, const GrCaps &caps)
@ kSrcOver
r = s + (1-sa)*d
static bool isLCD(const SkScalerContextRec &rec)
const GrShaderCaps * shaderCaps() const
Definition: GrCaps.h:63
static void GetXPOutputTypes(const GrXferProcessor *xp, int *outPrimary, int *outSecondary)
static const GrXPFactory * Get(SkBlendMode blendMode)
bool inputColorIsIgnored() const
bool requiresNonOverlappingDraws() const
bool unaffectedByDstValue() const
bool requiresDstTexture() const
bool isCompatibleWithCoverageAsAlpha() const
static sk_sp< const GrXferProcessor > MakeXferProcessor(const GrXPFactory *, const GrProcessorAnalysisColor &, GrProcessorAnalysisCoverage, const GrCaps &caps, GrClampType)
static constexpr bool BlendCoeffRefsSrc2(const BlendCoeff coeff)
Definition: Blend.h:113
bool fDstReadInShaderSupport
Definition: GrShaderCaps.h:34
skgpu::BlendCoeff fDstBlend
Definition: Blend.h:96

Member Data Documentation

◆ fBlendInfo

skgpu::BlendInfo GrPorterDuffTest::XPInfo::fBlendInfo

Definition at line 141 of file GrPorterDuffTest.cpp.

◆ fCompatibleWithCoverageAsAlpha

bool GrPorterDuffTest::XPInfo::fCompatibleWithCoverageAsAlpha

Definition at line 136 of file GrPorterDuffTest.cpp.

◆ fIgnoresInputColor

bool GrPorterDuffTest::XPInfo::fIgnoresInputColor

Definition at line 138 of file GrPorterDuffTest.cpp.

◆ fPrimaryOutputType

int GrPorterDuffTest::XPInfo::fPrimaryOutputType

Definition at line 139 of file GrPorterDuffTest.cpp.

◆ fSecondaryOutputType

int GrPorterDuffTest::XPInfo::fSecondaryOutputType

Definition at line 140 of file GrPorterDuffTest.cpp.

◆ fUnaffectedByDstValue

bool GrPorterDuffTest::XPInfo::fUnaffectedByDstValue

Definition at line 137 of file GrPorterDuffTest.cpp.


The documentation for this struct was generated from the following file: