| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2011 Google Inc. | 2  * Copyright 2011 Google Inc. | 
| 3  * | 3  * | 
| 4  * Use of this source code is governed by a BSD-style license that can be | 4  * Use of this source code is governed by a BSD-style license that can be | 
| 5  * found in the LICENSE file. | 5  * found in the LICENSE file. | 
| 6  */ | 6  */ | 
| 7 | 7 | 
| 8 #ifndef GrDrawState_DEFINED | 8 #ifndef GrDrawState_DEFINED | 
| 9 #define GrDrawState_DEFINED | 9 #define GrDrawState_DEFINED | 
| 10 | 10 | 
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 101     int numColorStages() const { return fColorStages.count(); } | 101     int numColorStages() const { return fColorStages.count(); } | 
| 102     int numCoverageStages() const { return fCoverageStages.count(); } | 102     int numCoverageStages() const { return fCoverageStages.count(); } | 
| 103     int numFragmentStages() const { return this->numColorStages() + this->numCov
     erageStages(); } | 103     int numFragmentStages() const { return this->numColorStages() + this->numCov
     erageStages(); } | 
| 104 | 104 | 
| 105     const GrXPFactory* getXPFactory() const { return fXPFactory.get(); } | 105     const GrXPFactory* getXPFactory() const { return fXPFactory.get(); } | 
| 106 | 106 | 
| 107     const GrFragmentStage& getColorStage(int idx) const { return fColorStages[id
     x]; } | 107     const GrFragmentStage& getColorStage(int idx) const { return fColorStages[id
     x]; } | 
| 108     const GrFragmentStage& getCoverageStage(int idx) const { return fCoverageSta
     ges[idx]; } | 108     const GrFragmentStage& getCoverageStage(int idx) const { return fCoverageSta
     ges[idx]; } | 
| 109 | 109 | 
| 110     /** | 110     /** | 
| 111      * Checks whether any of the effects will read the dst pixel color. | 111      * Checks whether the xp will read the dst pixel color. | 
| 112      * TODO remove when we have an XP | 112      * TODO: remove when we have dstCpy contained inside of GrXP | 
| 113      */ | 113      */ | 
| 114     bool willEffectReadDstColor(const GrPrimitiveProcessor*) const; | 114     bool willEffectReadDstColor() const; | 
| 115 | 115 | 
| 116     /** | 116     /** | 
| 117      * The xfer processor factory. | 117      * The xfer processor factory. | 
| 118      */ | 118      */ | 
| 119     const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { | 119     const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { | 
| 120         fXPFactory.reset(SkRef(xpFactory)); | 120         fXPFactory.reset(SkRef(xpFactory)); | 
| 121         return xpFactory; | 121         return xpFactory; | 
| 122     } | 122     } | 
| 123 | 123 | 
| 124     void setPorterDuffXPFactory(SkXfermode::Mode mode) { | 124     void setPorterDuffXPFactory(SkXfermode::Mode mode) { | 
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 462     mutable bool fCoverageProcInfoValid; | 462     mutable bool fCoverageProcInfoValid; | 
| 463     mutable GrColor fColorCache; | 463     mutable GrColor fColorCache; | 
| 464     mutable GrColor fCoverageCache; | 464     mutable GrColor fCoverageCache; | 
| 465     mutable const GrPrimitiveProcessor* fColorPrimProc; | 465     mutable const GrPrimitiveProcessor* fColorPrimProc; | 
| 466     mutable const GrPrimitiveProcessor* fCoveragePrimProc; | 466     mutable const GrPrimitiveProcessor* fCoveragePrimProc; | 
| 467 | 467 | 
| 468     friend class GrOptDrawState; | 468     friend class GrOptDrawState; | 
| 469 }; | 469 }; | 
| 470 | 470 | 
| 471 #endif | 471 #endif | 
| OLD | NEW | 
|---|