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

Side by Side Diff: include/gpu/GrPaint.h

Issue 926593005: Use SkXfermode as public facing enum for GrPorterDuffXP (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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
« no previous file with comments | « no previous file | include/gpu/GrTypes.h » ('j') | include/gpu/GrXferProcessor.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef GrPaint_DEFINED 10 #ifndef GrPaint_DEFINED
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { 64 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) {
65 fXPFactory.reset(SkRef(xpFactory)); 65 fXPFactory.reset(SkRef(xpFactory));
66 return xpFactory; 66 return xpFactory;
67 } 67 }
68 68
69 void setPorterDuffXPFactory(SkXfermode::Mode mode) { 69 void setPorterDuffXPFactory(SkXfermode::Mode mode) {
70 fXPFactory.reset(GrPorterDuffXPFactory::Create(mode)); 70 fXPFactory.reset(GrPorterDuffXPFactory::Create(mode));
71 } 71 }
72 72
73 void setPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst) { 73 void setPorterDuffXPFactory(SkXfermode::Coeff src, SkXfermode::Coeff dst) {
74 fXPFactory.reset(GrPorterDuffXPFactory::Create(src, dst)); 74 fXPFactory.reset(GrPorterDuffXPFactory::Create(src, dst));
75 } 75 }
76 76
77 /** 77 /**
78 * Appends an additional color processor to the color computation. 78 * Appends an additional color processor to the color computation.
79 */ 79 */
80 const GrFragmentProcessor* addColorProcessor(const GrFragmentProcessor* fp) { 80 const GrFragmentProcessor* addColorProcessor(const GrFragmentProcessor* fp) {
81 SkASSERT(fp); 81 SkASSERT(fp);
82 SkNEW_APPEND_TO_TARRAY(&fColorStages, GrFragmentStage, (fp)); 82 SkNEW_APPEND_TO_TARRAY(&fColorStages, GrFragmentStage, (fp));
83 return fp; 83 return fp;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 SkSTArray<4, GrFragmentStage> fColorStages; 140 SkSTArray<4, GrFragmentStage> fColorStages;
141 SkSTArray<2, GrFragmentStage> fCoverageStages; 141 SkSTArray<2, GrFragmentStage> fCoverageStages;
142 142
143 bool fAntiAlias; 143 bool fAntiAlias;
144 bool fDither; 144 bool fDither;
145 145
146 GrColor fColor; 146 GrColor fColor;
147 }; 147 };
148 148
149 #endif 149 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrTypes.h » ('j') | include/gpu/GrXferProcessor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698