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

Side by Side Diff: src/gpu/GrPipelineBuilder.h

Issue 926593005: Use SkXfermode as public facing enum for GrPorterDuffXP (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Review fixes 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 | « src/gpu/GrPaint.cpp ('k') | src/gpu/SkGpuDevice.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 2015 Google Inc. 2 * Copyright 2015 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 GrPipelineBuilder_DEFINED 8 #ifndef GrPipelineBuilder_DEFINED
9 #define GrPipelineBuilder_DEFINED 9 #define GrPipelineBuilder_DEFINED
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const GrProcOptInfo& coveragePOI) const; 107 const GrProcOptInfo& coveragePOI) const;
108 108
109 /** 109 /**
110 * The xfer processor factory. 110 * The xfer processor factory.
111 */ 111 */
112 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { 112 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) {
113 fXPFactory.reset(SkRef(xpFactory)); 113 fXPFactory.reset(SkRef(xpFactory));
114 return xpFactory; 114 return xpFactory;
115 } 115 }
116 116
117 void setPorterDuffXPFactory(SkXfermode::Mode mode) {
118 fXPFactory.reset(GrPorterDuffXPFactory::Create(mode));
119 }
120
121 void setPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst) {
122 fXPFactory.reset(GrPorterDuffXPFactory::Create(src, dst));
123 }
124
125 void setCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage = false) { 117 void setCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage = false) {
126 fXPFactory.reset(GrCoverageSetOpXPFactory::Create(regionOp, invertCovera ge)); 118 fXPFactory.reset(GrCoverageSetOpXPFactory::Create(regionOp, invertCovera ge));
127 } 119 }
128 120
129 void setDisableColorXPFactory() { 121 void setDisableColorXPFactory() {
130 fXPFactory.reset(GrDisableColorXPFactory::Create()); 122 fXPFactory.reset(GrDisableColorXPFactory::Create());
131 } 123 }
132 124
133 const GrFragmentProcessor* addColorProcessor(const GrFragmentProcessor* effe ct) { 125 const GrFragmentProcessor* addColorProcessor(const GrFragmentProcessor* effe ct) {
134 SkASSERT(effect); 126 SkASSERT(effect);
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 mutable GrProcOptInfo fCoverageProcInfo; 453 mutable GrProcOptInfo fCoverageProcInfo;
462 mutable bool fColorProcInfoValid; 454 mutable bool fColorProcInfoValid;
463 mutable bool fCoverageProcInfoValid; 455 mutable bool fCoverageProcInfoValid;
464 mutable GrColor fColorCache; 456 mutable GrColor fColorCache;
465 mutable GrColor fCoverageCache; 457 mutable GrColor fCoverageCache;
466 458
467 friend class GrPipeline; 459 friend class GrPipeline;
468 }; 460 };
469 461
470 #endif 462 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPaint.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698