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

Side by Side Diff: include/gpu/effects/GrPorterDuffXferProcessor.h

Issue 767873006: Check XpFactory equality in DrawState (Closed) Base URL: https://skia.googlesource.com/skia.git@moveXPHeader
Patch Set: Rebase Created 6 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 | « include/gpu/GrXferProcessor.h ('k') | src/gpu/GrDrawState.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 GrPorterDuffXferProcessor_DEFINED 8 #ifndef GrPorterDuffXferProcessor_DEFINED
9 #define GrPorterDuffXferProcessor_DEFINED 9 #define GrPorterDuffXferProcessor_DEFINED
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 static GrXPFactory* Create(GrBlendCoeff src, GrBlendCoeff dst) { 62 static GrXPFactory* Create(GrBlendCoeff src, GrBlendCoeff dst) {
63 return SkNEW_ARGS(GrPorterDuffXPFactory, (src, dst)); 63 return SkNEW_ARGS(GrPorterDuffXPFactory, (src, dst));
64 } 64 }
65 65
66 const GrXferProcessor* createXferProcessor() const SK_OVERRIDE; 66 const GrXferProcessor* createXferProcessor() const SK_OVERRIDE;
67 67
68 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const SK_OVERRIDE; 68 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const SK_OVERRIDE;
69 69
70 private: 70 private:
71 GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst) 71 GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst);
72 : fSrc(src), fDst(dst) {} 72
73 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE {
74 const GrPorterDuffXPFactory& xpf = xpfBase.cast<GrPorterDuffXPFactory>() ;
75 return (fSrc == xpf.fSrc && fDst == xpf.fDst);
76 }
73 77
74 GrBlendCoeff fSrc; 78 GrBlendCoeff fSrc;
75 GrBlendCoeff fDst; 79 GrBlendCoeff fDst;
76 80
77 typedef GrXPFactory INHERITED; 81 typedef GrXPFactory INHERITED;
78 }; 82 };
79 83
80 #endif 84 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrXferProcessor.h ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698