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

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

Issue 1480353002: APIs which took colorPOI / coveragePOI pairs updated to take a GrPipelineOptimizations struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/GrDisableColorXP.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 void getInvariantBlendedColor(const GrProcOptInfo& colorPOI, 20 void getInvariantBlendedColor(const GrProcOptInfo& colorPOI,
21 GrXPFactory::InvariantBlendedColor* blendedCol or) const override { 21 GrXPFactory::InvariantBlendedColor* blendedCol or) const override {
22 blendedColor->fKnownColorFlags = kNone_GrColorComponentFlags; 22 blendedColor->fKnownColorFlags = kNone_GrColorComponentFlags;
23 blendedColor->fWillBlendWithDst = false; 23 blendedColor->fWillBlendWithDst = false;
24 } 24 }
25 25
26 private: 26 private:
27 GrDisableColorXPFactory(); 27 GrDisableColorXPFactory();
28 28
29 GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, 29 GrXferProcessor* onCreateXferProcessor(const GrCaps& caps,
30 const GrProcOptInfo& colorPOI, 30 const GrPipelineOptimizations& optimi zations,
31 const GrProcOptInfo& coveragePOI,
32 bool hasMixedSamples, 31 bool hasMixedSamples,
33 const DstTexture* dstTexture) const o verride; 32 const DstTexture* dstTexture) const o verride;
34 33
35 bool willReadDstColor(const GrCaps& caps, 34 bool willReadDstColor(const GrCaps& caps,
36 const GrProcOptInfo& colorPOI, 35 const GrPipelineOptimizations& optimizations,
37 const GrProcOptInfo& coveragePOI,
38 bool hasMixedSamples) const override { 36 bool hasMixedSamples) const override {
39 return false; 37 return false;
40 } 38 }
41 39
42 bool onIsEqual(const GrXPFactory& xpfBase) const override { 40 bool onIsEqual(const GrXPFactory& xpfBase) const override {
43 return true; 41 return true;
44 } 42 }
45 43
46 GR_DECLARE_XP_FACTORY_TEST; 44 GR_DECLARE_XP_FACTORY_TEST;
47 45
48 typedef GrXPFactory INHERITED; 46 typedef GrXPFactory INHERITED;
49 }; 47 };
50 48
51 #endif 49 #endif
52 50
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCustomXfermode.cpp ('k') | src/gpu/effects/GrDisableColorXP.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698