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

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

Issue 1471053002: Don't create a GXPFactory when blend is SrcOver (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compile Created 5 years, 1 month 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/GrCustomXfermode.cpp ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | 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() { 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
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
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCustomXfermode.cpp ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698