| 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 GrDisableColorXP_DEFINED | 8 #ifndef GrDisableColorXP_DEFINED |
| 9 #define GrDisableColorXP_DEFINED | 9 #define GrDisableColorXP_DEFINED |
| 10 | 10 |
| 11 #include "GrTypes.h" | 11 #include "GrTypes.h" |
| 12 #include "GrXferProcessor.h" | 12 #include "GrXferProcessor.h" |
| 13 | 13 |
| 14 class GrProcOptInfo; | 14 class GrProcOptInfo; |
| 15 | 15 |
| 16 class GrDisableColorXPFactory : public GrXPFactory { | 16 class GrDisableColorXPFactory : public GrXPFactory { |
| 17 public: | 17 public: |
| 18 static GrXPFactory* Create() { return new GrDisableColorXPFactory; } | 18 static GrXPFactory* Create() { return new GrDisableColorXPFactory; } |
| 19 | 19 |
| 20 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
override { | |
| 21 return true; | |
| 22 } | |
| 23 | |
| 24 void getInvariantBlendedColor(const GrProcOptInfo& colorPOI, | 20 void getInvariantBlendedColor(const GrProcOptInfo& colorPOI, |
| 25 GrXPFactory::InvariantBlendedColor* blendedCol
or) const override { | 21 GrXPFactory::InvariantBlendedColor* blendedCol
or) const override { |
| 26 blendedColor->fKnownColorFlags = kNone_GrColorComponentFlags; | 22 blendedColor->fKnownColorFlags = kNone_GrColorComponentFlags; |
| 27 blendedColor->fWillBlendWithDst = false; | 23 blendedColor->fWillBlendWithDst = false; |
| 28 } | 24 } |
| 29 | 25 |
| 30 private: | 26 private: |
| 31 GrDisableColorXPFactory(); | 27 GrDisableColorXPFactory(); |
| 32 | 28 |
| 33 GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, | 29 GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 47 return true; | 43 return true; |
| 48 } | 44 } |
| 49 | 45 |
| 50 GR_DECLARE_XP_FACTORY_TEST; | 46 GR_DECLARE_XP_FACTORY_TEST; |
| 51 | 47 |
| 52 typedef GrXPFactory INHERITED; | 48 typedef GrXPFactory INHERITED; |
| 53 }; | 49 }; |
| 54 | 50 |
| 55 #endif | 51 #endif |
| 56 | 52 |
| OLD | NEW |