| Index: src/gpu/GrOvalRenderer.cpp
|
| diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
|
| index c66e12575c83309916403e0111eb756e835112eb..6aba34b68bf1933ee58bf1c78262866d68b620f8 100644
|
| --- a/src/gpu/GrOvalRenderer.cpp
|
| +++ b/src/gpu/GrOvalRenderer.cpp
|
| @@ -667,29 +667,29 @@ public:
|
| return string;
|
| }
|
|
|
| - void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
|
| + void computePipelineOptimizations(GrInitInvariantOutput* color,
|
| + GrInitInvariantOutput* coverage,
|
| + GrBatchToXPOverrides* overrides) const override {
|
| // When this is called on a batch, there is only one geometry bundle
|
| - out->setKnownFourComponents(fGeoData[0].fColor);
|
| - }
|
| -
|
| - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
|
| - out->setUnknownSingleComponent();
|
| + color->setKnownFourComponents(fGeoData[0].fColor);
|
| + coverage->setUnknownSingleComponent();
|
| + overrides->fUsePLSDstRead = false;
|
| }
|
|
|
| private:
|
| - void initBatchTracker(const GrPipelineOptimizations& opt) override {
|
| + void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
|
| // Handle any color overrides
|
| - if (!opt.readsColor()) {
|
| + if (!overrides.readsColor()) {
|
| fGeoData[0].fColor = GrColor_ILLEGAL;
|
| }
|
| - opt.getOverrideColorIfSet(&fGeoData[0].fColor);
|
| + overrides.getOverrideColorIfSet(&fGeoData[0].fColor);
|
|
|
| // setup batch properties
|
| - fBatch.fColorIgnored = !opt.readsColor();
|
| + fBatch.fColorIgnored = !overrides.readsColor();
|
| fBatch.fColor = fGeoData[0].fColor;
|
| fBatch.fStroke = fGeoData[0].fStroke;
|
| - fBatch.fUsesLocalCoords = opt.readsLocalCoords();
|
| - fBatch.fCoverageIgnored = !opt.readsCoverage();
|
| + fBatch.fUsesLocalCoords = overrides.readsLocalCoords();
|
| + fBatch.fCoverageIgnored = !overrides.readsCoverage();
|
| }
|
|
|
| void onPrepareDraws(Target* target) override {
|
| @@ -887,28 +887,29 @@ public:
|
|
|
| const char* name() const override { return "EllipseBatch"; }
|
|
|
| - void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
|
| + void computePipelineOptimizations(GrInitInvariantOutput* color,
|
| + GrInitInvariantOutput* coverage,
|
| + GrBatchToXPOverrides* overrides) const override {
|
| // When this is called on a batch, there is only one geometry bundle
|
| - out->setKnownFourComponents(fGeoData[0].fColor);
|
| - }
|
| - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
|
| - out->setUnknownSingleComponent();
|
| + color->setKnownFourComponents(fGeoData[0].fColor);
|
| + coverage->setUnknownSingleComponent();
|
| + overrides->fUsePLSDstRead = false;
|
| }
|
|
|
| private:
|
| - void initBatchTracker(const GrPipelineOptimizations& opt) override {
|
| + void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
|
| // Handle any color overrides
|
| - if (!opt.readsCoverage()) {
|
| + if (!overrides.readsCoverage()) {
|
| fGeoData[0].fColor = GrColor_ILLEGAL;
|
| }
|
| - opt.getOverrideColorIfSet(&fGeoData[0].fColor);
|
| + overrides.getOverrideColorIfSet(&fGeoData[0].fColor);
|
|
|
| // setup batch properties
|
| - fBatch.fColorIgnored = !opt.readsColor();
|
| + fBatch.fColorIgnored = !overrides.readsColor();
|
| fBatch.fColor = fGeoData[0].fColor;
|
| fBatch.fStroke = fGeoData[0].fStroke;
|
| - fBatch.fUsesLocalCoords = opt.readsLocalCoords();
|
| - fBatch.fCoverageIgnored = !opt.readsCoverage();
|
| + fBatch.fUsesLocalCoords = overrides.readsLocalCoords();
|
| + fBatch.fCoverageIgnored = !overrides.readsCoverage();
|
| }
|
|
|
| void onPrepareDraws(Target* target) override {
|
| @@ -1158,29 +1159,30 @@ public:
|
|
|
| const char* name() const override { return "DIEllipseBatch"; }
|
|
|
| - void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
|
| + void computePipelineOptimizations(GrInitInvariantOutput* color,
|
| + GrInitInvariantOutput* coverage,
|
| + GrBatchToXPOverrides* overrides) const override {
|
| // When this is called on a batch, there is only one geometry bundle
|
| - out->setKnownFourComponents(fGeoData[0].fColor);
|
| - }
|
| - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
|
| - out->setUnknownSingleComponent();
|
| + color->setKnownFourComponents(fGeoData[0].fColor);
|
| + coverage->setUnknownSingleComponent();
|
| + overrides->fUsePLSDstRead = false;
|
| }
|
|
|
| private:
|
|
|
| - void initBatchTracker(const GrPipelineOptimizations& opt) override {
|
| + void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
|
| // Handle any color overrides
|
| - if (!opt.readsColor()) {
|
| + if (!overrides.readsColor()) {
|
| fGeoData[0].fColor = GrColor_ILLEGAL;
|
| }
|
| - opt.getOverrideColorIfSet(&fGeoData[0].fColor);
|
| + overrides.getOverrideColorIfSet(&fGeoData[0].fColor);
|
|
|
| // setup batch properties
|
| - fBatch.fColorIgnored = !opt.readsColor();
|
| + fBatch.fColorIgnored = !overrides.readsColor();
|
| fBatch.fColor = fGeoData[0].fColor;
|
| fBatch.fMode = fGeoData[0].fMode;
|
| - fBatch.fUsesLocalCoords = opt.readsLocalCoords();
|
| - fBatch.fCoverageIgnored = !opt.readsCoverage();
|
| + fBatch.fUsesLocalCoords = overrides.readsLocalCoords();
|
| + fBatch.fCoverageIgnored = !overrides.readsCoverage();
|
| }
|
|
|
| void onPrepareDraws(Target* target) override {
|
| @@ -1513,28 +1515,29 @@ public:
|
|
|
| const char* name() const override { return "RRectCircleBatch"; }
|
|
|
| - void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
|
| + void computePipelineOptimizations(GrInitInvariantOutput* color,
|
| + GrInitInvariantOutput* coverage,
|
| + GrBatchToXPOverrides* overrides) const override {
|
| // When this is called on a batch, there is only one geometry bundle
|
| - out->setKnownFourComponents(fGeoData[0].fColor);
|
| - }
|
| - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
|
| - out->setUnknownSingleComponent();
|
| + color->setKnownFourComponents(fGeoData[0].fColor);
|
| + coverage->setUnknownSingleComponent();
|
| + overrides->fUsePLSDstRead = false;
|
| }
|
|
|
| private:
|
| - void initBatchTracker(const GrPipelineOptimizations& opt) override {
|
| + void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
|
| // Handle any color overrides
|
| - if (!opt.readsColor()) {
|
| + if (!overrides.readsColor()) {
|
| fGeoData[0].fColor = GrColor_ILLEGAL;
|
| }
|
| - opt.getOverrideColorIfSet(&fGeoData[0].fColor);
|
| + overrides.getOverrideColorIfSet(&fGeoData[0].fColor);
|
|
|
| // setup batch properties
|
| - fBatch.fColorIgnored = !opt.readsColor();
|
| + fBatch.fColorIgnored = !overrides.readsColor();
|
| fBatch.fColor = fGeoData[0].fColor;
|
| fBatch.fStroke = fGeoData[0].fStroke;
|
| - fBatch.fUsesLocalCoords = opt.readsLocalCoords();
|
| - fBatch.fCoverageIgnored = !opt.readsCoverage();
|
| + fBatch.fUsesLocalCoords = overrides.readsLocalCoords();
|
| + fBatch.fCoverageIgnored = !overrides.readsCoverage();
|
| }
|
|
|
| void onPrepareDraws(Target* target) override {
|
| @@ -1692,28 +1695,29 @@ public:
|
|
|
| const char* name() const override { return "RRectEllipseRendererBatch"; }
|
|
|
| - void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
|
| + void computePipelineOptimizations(GrInitInvariantOutput* color,
|
| + GrInitInvariantOutput* coverage,
|
| + GrBatchToXPOverrides* overrides) const override {
|
| // When this is called on a batch, there is only one geometry bundle
|
| - out->setKnownFourComponents(fGeoData[0].fColor);
|
| - }
|
| - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
|
| - out->setUnknownSingleComponent();
|
| + color->setKnownFourComponents(fGeoData[0].fColor);
|
| + coverage->setUnknownSingleComponent();
|
| + overrides->fUsePLSDstRead = false;
|
| }
|
|
|
| private:
|
| - void initBatchTracker(const GrPipelineOptimizations& opt) override {
|
| + void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
|
| // Handle any color overrides
|
| - if (!opt.readsColor()) {
|
| + if (!overrides.readsColor()) {
|
| fGeoData[0].fColor = GrColor_ILLEGAL;
|
| }
|
| - opt.getOverrideColorIfSet(&fGeoData[0].fColor);
|
| + overrides.getOverrideColorIfSet(&fGeoData[0].fColor);
|
|
|
| // setup batch properties
|
| - fBatch.fColorIgnored = !opt.readsColor();
|
| + fBatch.fColorIgnored = !overrides.readsColor();
|
| fBatch.fColor = fGeoData[0].fColor;
|
| fBatch.fStroke = fGeoData[0].fStroke;
|
| - fBatch.fUsesLocalCoords = opt.readsLocalCoords();
|
| - fBatch.fCoverageIgnored = !opt.readsCoverage();
|
| + fBatch.fUsesLocalCoords = overrides.readsLocalCoords();
|
| + fBatch.fCoverageIgnored = !overrides.readsCoverage();
|
| }
|
|
|
| void onPrepareDraws(Target* target) override {
|
|
|