Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: src/gpu/effects/GrDisableColorXP.h

Issue 919683002: Remove canApplyCoverage from XP and all related functions in gpu code. (Closed) Base URL: https://skia.googlesource.com/skia.git@pdDstCopy
Patch Set: Rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/effects/GrCustomXfermodePriv.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCustomXfermodePriv.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698