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

Side by Side Diff: src/gpu/effects/GrCoverageSetOpXP.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: 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
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 GrCoverageSetOpXP_DEFINED 8 #ifndef GrCoverageSetOpXP_DEFINED
9 #define GrCoverageSetOpXP_DEFINED 9 #define GrCoverageSetOpXP_DEFINED
10 10
11 #include "GrTypes.h" 11 #include "GrTypes.h"
12 #include "GrXferProcessor.h" 12 #include "GrXferProcessor.h"
13 #include "SkRegion.h" 13 #include "SkRegion.h"
14 14
15 class GrProcOptInfo; 15 class GrProcOptInfo;
16 16
17 class GrCoverageSetOpXPFactory : public GrXPFactory { 17 class GrCoverageSetOpXPFactory : public GrXPFactory {
18 public: 18 public:
19 static GrXPFactory* Create(SkRegion::Op regionOp, bool invertCoverage = fals e); 19 static GrXPFactory* Create(SkRegion::Op regionOp, bool invertCoverage = fals e);
20 20
21 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const SK_OVERRIDE { 21 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const SK_OVERRIDE {
22 return true; 22 return true;
23 } 23 }
24 24
25 bool canApplyCoverage(const GrProcOptInfo& colorPOI,
26 const GrProcOptInfo& coveragePOI) const SK_OVERRIDE {
27 return true;
28 }
29
30 bool canTweakAlphaForCoverage() const SK_OVERRIDE { return false; } 25 bool canTweakAlphaForCoverage() const SK_OVERRIDE { return false; }
31 26
32 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, 27 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
33 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; 28 GrXPFactory::InvariantOutput*) const SK_OVERRIDE;
34 29
35 private: 30 private:
36 GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage); 31 GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage);
37 32
38 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, 33 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps,
39 const GrProcOptInfo& colorPOI, 34 const GrProcOptInfo& colorPOI,
(...skipping 13 matching lines...) Expand all
53 48
54 GR_DECLARE_XP_FACTORY_TEST; 49 GR_DECLARE_XP_FACTORY_TEST;
55 50
56 SkRegion::Op fRegionOp; 51 SkRegion::Op fRegionOp;
57 bool fInvertCoverage; 52 bool fInvertCoverage;
58 53
59 typedef GrXPFactory INHERITED; 54 typedef GrXPFactory INHERITED;
60 }; 55 };
61 #endif 56 #endif
62 57
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698