| 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 10 matching lines...) Expand all Loading... |
| 21 static GrXPFactory* Create(SkXfermode::Coeff src, SkXfermode::Coeff dst) { | 21 static GrXPFactory* Create(SkXfermode::Coeff src, SkXfermode::Coeff dst) { |
| 22 return SkNEW_ARGS(GrPorterDuffXPFactory, ((GrBlendCoeff)(src), (GrBlendC
oeff)(dst))); | 22 return SkNEW_ARGS(GrPorterDuffXPFactory, ((GrBlendCoeff)(src), (GrBlendC
oeff)(dst))); |
| 23 } | 23 } |
| 24 | 24 |
| 25 static GrXPFactory* Create(GrBlendCoeff src, GrBlendCoeff dst) { | 25 static GrXPFactory* Create(GrBlendCoeff src, GrBlendCoeff dst) { |
| 26 return SkNEW_ARGS(GrPorterDuffXPFactory, (src, dst)); | 26 return SkNEW_ARGS(GrPorterDuffXPFactory, (src, dst)); |
| 27 } | 27 } |
| 28 | 28 |
| 29 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
SK_OVERRIDE; | 29 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
SK_OVERRIDE; |
| 30 | 30 |
| 31 bool canApplyCoverage(const GrProcOptInfo& /*colorPOI*/, | |
| 32 const GrProcOptInfo& /*coveragePOI*/) const SK_OVERRID
E { | |
| 33 return true; | |
| 34 } | |
| 35 | |
| 36 bool canTweakAlphaForCoverage() const SK_OVERRIDE; | 31 bool canTweakAlphaForCoverage() const SK_OVERRIDE; |
| 37 | 32 |
| 38 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, | 33 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, |
| 39 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; | 34 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; |
| 40 | 35 |
| 41 private: | 36 private: |
| 42 GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst); | 37 GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst); |
| 43 | 38 |
| 44 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, | 39 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, |
| 45 const GrProcOptInfo& colorPOI, | 40 const GrProcOptInfo& colorPOI, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 57 | 52 |
| 58 GR_DECLARE_XP_FACTORY_TEST; | 53 GR_DECLARE_XP_FACTORY_TEST; |
| 59 | 54 |
| 60 GrBlendCoeff fSrcCoeff; | 55 GrBlendCoeff fSrcCoeff; |
| 61 GrBlendCoeff fDstCoeff; | 56 GrBlendCoeff fDstCoeff; |
| 62 | 57 |
| 63 typedef GrXPFactory INHERITED; | 58 typedef GrXPFactory INHERITED; |
| 64 }; | 59 }; |
| 65 | 60 |
| 66 #endif | 61 #endif |
| OLD | NEW |