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

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

Issue 1313573005: Revert of Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Created 5 years, 3 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/GrOvalEffect.cpp ('k') | src/gpu/effects/GrRRectEffect.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 #include "effects/GrPorterDuffXferProcessor.h" 8 #include "effects/GrPorterDuffXferProcessor.h"
9 9
10 #include "GrBlend.h" 10 #include "GrBlend.h"
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 if (covPOI.isFourChannelOutput()) { 748 if (covPOI.isFourChannelOutput()) {
749 return false; // The LCD XP will abort rather than doing a dst read. 749 return false; // The LCD XP will abort rather than doing a dst read.
750 } 750 }
751 // We fallback on the shader XP when the blend formula would use dual source blending but we 751 // We fallback on the shader XP when the blend formula would use dual source blending but we
752 // don't have support for it. 752 // don't have support for it.
753 return get_blend_formula(colorPOI, covPOI, hasMixedSamples, fXfermode).hasSe condaryOutput(); 753 return get_blend_formula(colorPOI, covPOI, hasMixedSamples, fXfermode).hasSe condaryOutput();
754 } 754 }
755 755
756 GR_DEFINE_XP_FACTORY_TEST(GrPorterDuffXPFactory); 756 GR_DEFINE_XP_FACTORY_TEST(GrPorterDuffXPFactory);
757 757
758 const GrXPFactory* GrPorterDuffXPFactory::TestCreate(GrProcessorTestData* d) { 758 GrXPFactory* GrPorterDuffXPFactory::TestCreate(GrProcessorTestData* d) {
759 SkXfermode::Mode mode = SkXfermode::Mode(d->fRandom->nextULessThan(SkXfermod e::kLastCoeffMode)); 759 SkXfermode::Mode mode = SkXfermode::Mode(d->fRandom->nextULessThan(SkXfermod e::kLastCoeffMode));
760 return GrPorterDuffXPFactory::Create(mode); 760 return GrPorterDuffXPFactory::Create(mode);
761 } 761 }
762 762
763 void GrPorterDuffXPFactory::TestGetXPOutputTypes(const GrXferProcessor* xp, 763 void GrPorterDuffXPFactory::TestGetXPOutputTypes(const GrXferProcessor* xp,
764 int* outPrimary, 764 int* outPrimary,
765 int* outSecondary) { 765 int* outSecondary) {
766 if (!!strcmp(xp->name(), "Porter Duff")) { 766 if (!!strcmp(xp->name(), "Porter Duff")) {
767 *outPrimary = *outSecondary = -1; 767 *outPrimary = *outSecondary = -1;
768 return; 768 return;
769 } 769 }
770 BlendFormula blendFormula = static_cast<const PorterDuffXferProcessor*>(xp)- >getBlendFormula(); 770 BlendFormula blendFormula = static_cast<const PorterDuffXferProcessor*>(xp)- >getBlendFormula();
771 *outPrimary = blendFormula.fPrimaryOutputType; 771 *outPrimary = blendFormula.fPrimaryOutputType;
772 *outSecondary = blendFormula.fSecondaryOutputType; 772 *outSecondary = blendFormula.fSecondaryOutputType;
773 } 773 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrOvalEffect.cpp ('k') | src/gpu/effects/GrRRectEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698