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

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

Issue 1040303002: Use texture barriers to read directly from the RT (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_zz1_reverseiter
Patch Set: Created 5 years, 8 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 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 override { 22 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const override {
23 return true; 23 return true;
24 } 24 }
25 25
26 bool canTweakAlphaForCoverage() const override { return true; } 26 bool canTweakAlphaForCoverage() const override { return true; }
27 27
28 bool willBlendCoherently(const GrDrawTargetCaps&) const override { return tr ue; }
29
28 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, 30 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
29 GrXPFactory::InvariantOutput* output) const override { 31 GrXPFactory::InvariantOutput* output) const override {
30 output->fBlendedColorFlags = 0; 32 output->fBlendedColorFlags = 0;
31 output->fWillBlendWithDst = 0; 33 output->fWillBlendWithDst = 0;
32 } 34 }
33 35
34 private: 36 private:
35 GrDisableColorXPFactory(); 37 GrDisableColorXPFactory();
36 38
37 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, 39 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps,
(...skipping 11 matching lines...) Expand all
49 return true; 51 return true;
50 } 52 }
51 53
52 GR_DECLARE_XP_FACTORY_TEST; 54 GR_DECLARE_XP_FACTORY_TEST;
53 55
54 typedef GrXPFactory INHERITED; 56 typedef GrXPFactory INHERITED;
55 }; 57 };
56 58
57 #endif 59 #endif
58 60
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698