| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrPorterDuffXferProcessor_DEFINED | 8 #ifndef GrPorterDuffXferProcessor_DEFINED |
| 9 #define GrPorterDuffXferProcessor_DEFINED | 9 #define GrPorterDuffXferProcessor_DEFINED |
| 10 | 10 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 } | 126 } |
| 127 | 127 |
| 128 GrXferProcessor* createXferProcessor(const GrProcOptInfo& colorPOI, | 128 GrXferProcessor* createXferProcessor(const GrProcOptInfo& colorPOI, |
| 129 const GrProcOptInfo& coveragePOI) const
SK_OVERRIDE; | 129 const GrProcOptInfo& coveragePOI) const
SK_OVERRIDE; |
| 130 | 130 |
| 131 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
SK_OVERRIDE; | 131 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
SK_OVERRIDE; |
| 132 | 132 |
| 133 bool canApplyCoverage(const GrProcOptInfo& colorPOI, const GrProcOptInfo& co
veragePOI, | 133 bool canApplyCoverage(const GrProcOptInfo& colorPOI, const GrProcOptInfo& co
veragePOI, |
| 134 bool colorWriteDisabled) const SK_OVERRIDE; | 134 bool colorWriteDisabled) const SK_OVERRIDE; |
| 135 | 135 |
| 136 bool willBlendWithDst(const GrProcOptInfo& colorPOI, const GrProcOptInfo& co
veragePOI, | |
| 137 bool colorWriteDisabled) const SK_OVERRIDE; | |
| 138 | |
| 139 bool canTweakAlphaForCoverage() const SK_OVERRIDE; | 136 bool canTweakAlphaForCoverage() const SK_OVERRIDE; |
| 140 | 137 |
| 141 bool getOpaqueAndKnownColor(const GrProcOptInfo& colorPOI, | 138 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, |
| 142 const GrProcOptInfo& coveragePOI, | 139 bool colorWriteDisabled, |
| 143 GrColor* solidColor, | 140 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; |
| 144 uint32_t* solidColorKnownComponents) const SK_OV
ERRIDE; | |
| 145 | 141 |
| 146 private: | 142 private: |
| 147 GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst); | 143 GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst); |
| 148 | 144 |
| 149 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { | 145 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { |
| 150 const GrPorterDuffXPFactory& xpf = xpfBase.cast<GrPorterDuffXPFactory>()
; | 146 const GrPorterDuffXPFactory& xpf = xpfBase.cast<GrPorterDuffXPFactory>()
; |
| 151 return (fSrcCoeff == xpf.fSrcCoeff && fDstCoeff == xpf.fDstCoeff); | 147 return (fSrcCoeff == xpf.fSrcCoeff && fDstCoeff == xpf.fDstCoeff); |
| 152 } | 148 } |
| 153 | 149 |
| 154 GR_DECLARE_XP_FACTORY_TEST; | 150 GR_DECLARE_XP_FACTORY_TEST; |
| 155 | 151 |
| 156 GrBlendCoeff fSrcCoeff; | 152 GrBlendCoeff fSrcCoeff; |
| 157 GrBlendCoeff fDstCoeff; | 153 GrBlendCoeff fDstCoeff; |
| 158 | 154 |
| 159 typedef GrXPFactory INHERITED; | 155 typedef GrXPFactory INHERITED; |
| 160 }; | 156 }; |
| 161 | 157 |
| 162 #endif | 158 #endif |
| OLD | NEW |