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() { | 18 static GrXPFactory* Create() { |
19 return SkNEW(GrDisableColorXPFactory); | 19 return SkNEW(GrDisableColorXPFactory); |
20 } | 20 } |
21 | 21 |
22 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
SK_OVERRIDE { | 22 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
SK_OVERRIDE { |
23 return true; | 23 return true; |
24 } | 24 } |
25 | 25 |
26 bool canApplyCoverage(const GrProcOptInfo& colorPOI, | |
27 const GrProcOptInfo& coveragePOI) const SK_OVERRIDE { | |
28 return true; | |
29 } | |
30 | |
31 bool canTweakAlphaForCoverage() const SK_OVERRIDE { return true; } | 26 bool canTweakAlphaForCoverage() const SK_OVERRIDE { return true; } |
32 | 27 |
33 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, | 28 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, |
34 GrXPFactory::InvariantOutput* output) const SK_OVERR
IDE { | 29 GrXPFactory::InvariantOutput* output) const SK_OVERR
IDE { |
35 output->fBlendedColorFlags = 0; | 30 output->fBlendedColorFlags = 0; |
36 output->fWillBlendWithDst = 0; | 31 output->fWillBlendWithDst = 0; |
37 } | 32 } |
38 | 33 |
39 private: | 34 private: |
40 GrDisableColorXPFactory(); | 35 GrDisableColorXPFactory(); |
(...skipping 13 matching lines...) Expand all Loading... |
54 return true; | 49 return true; |
55 } | 50 } |
56 | 51 |
57 GR_DECLARE_XP_FACTORY_TEST; | 52 GR_DECLARE_XP_FACTORY_TEST; |
58 | 53 |
59 typedef GrXPFactory INHERITED; | 54 typedef GrXPFactory INHERITED; |
60 }; | 55 }; |
61 | 56 |
62 #endif | 57 #endif |
63 | 58 |
OLD | NEW |