added a default constructor for GrBatchToXPOverrides
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1657803002 Review URL: https://codereview.chromium.org/1657803002
This commit is contained in:
parent
6404981b0c
commit
3b7af78e81
@ -25,6 +25,9 @@ class GrDeviceCoordTexture;
|
||||
class GrPipelineBuilder;
|
||||
|
||||
struct GrBatchToXPOverrides {
|
||||
GrBatchToXPOverrides()
|
||||
: fUsePLSDstRead(false) {}
|
||||
|
||||
bool fUsePLSDstRead;
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,6 @@ GrDrawBatch::~GrDrawBatch() {
|
||||
void GrDrawBatch::getPipelineOptimizations(GrPipelineOptimizations* opt) const {
|
||||
GrInitInvariantOutput color;
|
||||
GrInitInvariantOutput coverage;
|
||||
opt->fOverrides.fUsePLSDstRead = false;
|
||||
this->computePipelineOptimizations(&color, &coverage, &opt->fOverrides);
|
||||
opt->fColorPOI.initUsingInvariantOutput(color);
|
||||
opt->fCoveragePOI.initUsingInvariantOutput(coverage);
|
||||
|
@ -98,7 +98,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
|
||||
opt.fColorPOI.calcWithInitialValues(NULL, 0, 0, kNone_GrColorComponentFlags, false);
|
||||
// Setting 2nd to last value to false and last to true will force covPOI to LCD coverage.
|
||||
opt.fCoveragePOI.calcWithInitialValues(NULL, 0, 0, kNone_GrColorComponentFlags, false, true);
|
||||
opt.fOverrides.fUsePLSDstRead = false;
|
||||
|
||||
SkASSERT(!opt.fColorPOI.isOpaque());
|
||||
SkASSERT(!opt.fColorPOI.isSolidWhite());
|
||||
@ -291,7 +290,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
|
||||
false);
|
||||
optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, 0, kNone_GrColorComponentFlags,
|
||||
true);
|
||||
optimizations.fOverrides.fUsePLSDstRead = false;
|
||||
|
||||
SkASSERT(!optimizations.fColorPOI.isOpaque());
|
||||
SkASSERT(!optimizations.fColorPOI.isSolidWhite());
|
||||
@ -486,7 +484,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
|
||||
kR_GrColorComponentFlag | kB_GrColorComponentFlag, false);
|
||||
optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, GrColorPackA4(255),
|
||||
kRGBA_GrColorComponentFlags, true);
|
||||
optimizations.fOverrides.fUsePLSDstRead = false;
|
||||
|
||||
SkASSERT(!optimizations.fColorPOI.isOpaque());
|
||||
SkASSERT(!optimizations.fColorPOI.isSolidWhite());
|
||||
@ -691,7 +688,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
|
||||
kA_GrColorComponentFlag, false);
|
||||
optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, 0, kNone_GrColorComponentFlags,
|
||||
true);
|
||||
optimizations.fOverrides.fUsePLSDstRead = false;
|
||||
|
||||
SkASSERT(optimizations.fColorPOI.isOpaque());
|
||||
SkASSERT(!optimizations.fColorPOI.isSolidWhite());
|
||||
@ -891,7 +887,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
|
||||
kG_GrColorComponentFlag | kA_GrColorComponentFlag, false);
|
||||
optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, GrColorPackA4(255),
|
||||
kRGBA_GrColorComponentFlags, true);
|
||||
optimizations.fOverrides.fUsePLSDstRead = false;
|
||||
|
||||
SkASSERT(optimizations.fColorPOI.isOpaque());
|
||||
SkASSERT(!optimizations.fColorPOI.isSolidWhite());
|
||||
@ -1193,7 +1188,6 @@ DEF_GPUTEST(PorterDuffNoDualSourceBlending, reporter, /*factory*/) {
|
||||
GrPipelineOptimizations optimizations;
|
||||
optimizations.fColorPOI.calcWithInitialValues(nullptr, 0, testColors[c], testColorFlags[c],
|
||||
false);
|
||||
optimizations.fOverrides.fUsePLSDstRead = false;
|
||||
for (int f = 0; f <= 1; f++) {
|
||||
if (!f) {
|
||||
optimizations.fCoveragePOI.calcWithInitialValues(nullptr, 0, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user