| Index: include/gpu/GrXferProcessor.h
|
| diff --git a/include/gpu/GrXferProcessor.h b/include/gpu/GrXferProcessor.h
|
| index 7ed98a34bc049cbfd8832855437e525db12d22cd..8f2c69d9956e89de59ccc97041162e5c217b1751 100644
|
| --- a/include/gpu/GrXferProcessor.h
|
| +++ b/include/gpu/GrXferProcessor.h
|
| @@ -252,6 +252,13 @@ public:
|
| }
|
|
|
| /**
|
| + * If we are performing a dst read, returns whether the base class will use mixed samples to
|
| + * antialias the shader's final output. If not doing a dst read, the subclass is responsible
|
| + * for antialiasing and this returns false.
|
| + */
|
| + bool dstReadUsesMixedSamples() const { return fDstReadUsesMixedSamples; }
|
| +
|
| + /**
|
| * Returns whether or not the XP will look at coverage when doing its blending.
|
| */
|
| bool readsCoverage() const { return fReadsCoverage; }
|
| @@ -285,12 +292,15 @@ public:
|
| if (this->fDstTextureOffset != that.fDstTextureOffset) {
|
| return false;
|
| }
|
| + if (this->fDstReadUsesMixedSamples != that.fDstReadUsesMixedSamples) {
|
| + return false;
|
| + }
|
| return this->onIsEqual(that);
|
| }
|
|
|
| protected:
|
| GrXferProcessor();
|
| - GrXferProcessor(const DstTexture*, bool willReadDstColor);
|
| + GrXferProcessor(const DstTexture*, bool willReadDstColor, bool hasMixedSamples);
|
|
|
| private:
|
| virtual OptFlags onGetOptimizations(const GrProcOptInfo& colorPOI,
|
| @@ -318,21 +328,22 @@ private:
|
|
|
| /**
|
| * If we are not performing a dst read, returns whether the subclass will set a secondary
|
| - * output. When using dst reads, the base class disables the secondary output and this method
|
| + * output. When using dst reads, the base class controls the secondary output and this method
|
| * will not be called.
|
| */
|
| virtual bool onHasSecondaryOutput() const { return false; }
|
|
|
| /**
|
| * If we are not performing a dst read, retrieves the fixed-function blend state required by the
|
| - * subclass. When using dst reads, the base class disables fixed-function blending and this
|
| - * method will not be called. The BlendInfo struct comes initialized to "no blending".
|
| + * subclass. When using dst reads, the base class controls the fixed-function blend state and
|
| + * this method will not be called. The BlendInfo struct comes initialized to "no blending".
|
| */
|
| virtual void onGetBlendInfo(BlendInfo*) const {}
|
|
|
| virtual bool onIsEqual(const GrXferProcessor&) const = 0;
|
|
|
| bool fWillReadDstColor;
|
| + bool fDstReadUsesMixedSamples;
|
| bool fReadsCoverage;
|
| SkIPoint fDstTextureOffset;
|
| GrTextureAccess fDstTexture;
|
| @@ -360,6 +371,7 @@ public:
|
| typedef GrXferProcessor::DstTexture DstTexture;
|
| GrXferProcessor* createXferProcessor(const GrProcOptInfo& colorPOI,
|
| const GrProcOptInfo& coveragePOI,
|
| + bool hasMixedSamples,
|
| const DstTexture*,
|
| const GrCaps& caps) const;
|
|
|
| @@ -389,7 +401,7 @@ public:
|
| InvariantBlendedColor*) const = 0;
|
|
|
| bool willNeedDstTexture(const GrCaps& caps, const GrProcOptInfo& colorPOI,
|
| - const GrProcOptInfo& coveragePOI) const;
|
| + const GrProcOptInfo& coveragePOI, bool hasMixedSamples) const;
|
|
|
| bool isEqual(const GrXPFactory& that) const {
|
| if (this->classID() != that.classID()) {
|
| @@ -419,6 +431,7 @@ private:
|
| virtual GrXferProcessor* onCreateXferProcessor(const GrCaps& caps,
|
| const GrProcOptInfo& colorPOI,
|
| const GrProcOptInfo& coveragePOI,
|
| + bool hasMixedSamples,
|
| const DstTexture*) const = 0;
|
| /**
|
| * Returns true if the XP generated by this factory will explicitly read dst in the fragment
|
| @@ -426,7 +439,8 @@ private:
|
| */
|
| virtual bool willReadDstColor(const GrCaps& caps,
|
| const GrProcOptInfo& colorPOI,
|
| - const GrProcOptInfo& coveragePOI) const = 0;
|
| + const GrProcOptInfo& coveragePOI,
|
| + bool hasMixedSamples) const = 0;
|
|
|
| virtual bool onIsEqual(const GrXPFactory&) const = 0;
|
|
|
|
|