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

Side by Side Diff: src/gpu/effects/GrCoverageSetOpXP.cpp

Issue 851143003: Remove willReadDst from GrFragmentProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@xferXP
Patch Set: Rebase Created 5 years, 11 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/effects/GrCoverageSetOpXP.h ('k') | src/gpu/effects/GrCustomXfermodePriv.h » ('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 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 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 #include "effects/GrCoverageSetOpXP.h" 9 #include "effects/GrCoverageSetOpXP.h"
10 #include "GrColor.h" 10 #include "GrColor.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 const GrProcOptInfo& coverageP OI, 188 const GrProcOptInfo& coverageP OI,
189 GrXPFactory::InvariantOutput* output) const { 189 GrXPFactory::InvariantOutput* output) const {
190 if (SkRegion::kReplace_Op == fRegionOp) { 190 if (SkRegion::kReplace_Op == fRegionOp) {
191 if (coveragePOI.isSolidWhite()) { 191 if (coveragePOI.isSolidWhite()) {
192 output->fBlendedColor = GrColor_WHITE; 192 output->fBlendedColor = GrColor_WHITE;
193 output->fBlendedColorFlags = kRGBA_GrColorComponentFlags; 193 output->fBlendedColorFlags = kRGBA_GrColorComponentFlags;
194 } else { 194 } else {
195 output->fBlendedColorFlags = 0; 195 output->fBlendedColorFlags = 0;
196 } 196 }
197 197
198 if (coveragePOI.readsDst()) { 198 output->fWillBlendWithDst = false;
199 output->fWillBlendWithDst = true;
200 } else {
201 output->fWillBlendWithDst = false;
202 }
203 } else { 199 } else {
204 output->fBlendedColorFlags = 0; 200 output->fBlendedColorFlags = 0;
205 output->fWillBlendWithDst = true; 201 output->fWillBlendWithDst = true;
206 } 202 }
207 } 203 }
208 204
209 bool GrCoverageSetOpXPFactory::willReadDst(const GrProcOptInfo& colorPOI,
210 const GrProcOptInfo& coveragePOI) con st {
211 return coveragePOI.readsDst();
212 }
213
214 GR_DEFINE_XP_FACTORY_TEST(GrCoverageSetOpXPFactory); 205 GR_DEFINE_XP_FACTORY_TEST(GrCoverageSetOpXPFactory);
215 206
216 GrXPFactory* GrCoverageSetOpXPFactory::TestCreate(SkRandom* random, 207 GrXPFactory* GrCoverageSetOpXPFactory::TestCreate(SkRandom* random,
217 GrContext*, 208 GrContext*,
218 const GrDrawTargetCaps&, 209 const GrDrawTargetCaps&,
219 GrTexture*[]) { 210 GrTexture*[]) {
220 SkRegion::Op regionOp = SkRegion::Op(random->nextULessThan(SkRegion::kLastOp + 1)); 211 SkRegion::Op regionOp = SkRegion::Op(random->nextULessThan(SkRegion::kLastOp + 1));
221 bool invertCoverage = random->nextBool(); 212 bool invertCoverage = random->nextBool();
222 return GrCoverageSetOpXPFactory::Create(regionOp, invertCoverage); 213 return GrCoverageSetOpXPFactory::Create(regionOp, invertCoverage);
223 } 214 }
224 215
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCoverageSetOpXP.h ('k') | src/gpu/effects/GrCustomXfermodePriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698