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

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

Issue 1213013003: Revert of Rework GrPipelineInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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/GrTestBatch.h ('k') | src/gpu/effects/GrDashingEffect.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 #include "effects/GrCustomXfermode.h" 8 #include "effects/GrCustomXfermode.h"
9 #include "effects/GrCustomXfermodePriv.h" 9 #include "effects/GrCustomXfermodePriv.h"
10 10
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 745
746 746
747 f * blend(Sa, Da) + (1-f) * Da 747 f * blend(Sa, Da) + (1-f) * Da
748 = f * (Sa + Da - Sa * Da) + (1-f) * Da 748 = f * (Sa + Da - Sa * Da) + (1-f) * Da
749 = f*Sa + f*Da - f*Sa * Da + Da - f*Da 749 = f*Sa + f*Da - f*Sa * Da + Da - f*Da
750 = f*Sa - f*Sa * Da + Da 750 = f*Sa - f*Sa * Da + Da
751 = f*Sa + Da - f*Sa * Da 751 = f*Sa + Da - f*Sa * Da
752 = blend(f*Sa, Da) 752 = blend(f*Sa, Da)
753 */ 753 */
754 754
755 OptFlags flags = kNone_OptFlags; 755 OptFlags flags = kNone_Opt;
756 if (colorPOI.allStagesMultiplyInput()) { 756 if (colorPOI.allStagesMultiplyInput()) {
757 flags |= kCanTweakAlphaForCoverage_OptFlag; 757 flags |= kCanTweakAlphaForCoverage_OptFlag;
758 } 758 }
759 if (this->hasHWBlendEquation() && coveragePOI.isSolidWhite()) { 759 if (this->hasHWBlendEquation() && coveragePOI.isSolidWhite()) {
760 flags |= kIgnoreCoverage_OptFlag; 760 flags |= kIgnoreCoverage_OptFlag;
761 } 761 }
762 return flags; 762 return flags;
763 } 763 }
764 764
765 bool CustomXP::onWillNeedXferBarrier(const GrRenderTarget* rt, 765 bool CustomXP::onWillNeedXferBarrier(const GrRenderTarget* rt,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory); 816 GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory);
817 GrXPFactory* GrCustomXPFactory::TestCreate(SkRandom* rand, 817 GrXPFactory* GrCustomXPFactory::TestCreate(SkRandom* rand,
818 GrContext*, 818 GrContext*,
819 const GrCaps&, 819 const GrCaps&,
820 GrTexture*[]) { 820 GrTexture*[]) {
821 int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLas tSeparableMode); 821 int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLas tSeparableMode);
822 822
823 return SkNEW_ARGS(GrCustomXPFactory, (static_cast<SkXfermode::Mode>(mode))); 823 return SkNEW_ARGS(GrCustomXPFactory, (static_cast<SkXfermode::Mode>(mode)));
824 } 824 }
825 825
OLDNEW
« no previous file with comments | « src/gpu/GrTestBatch.h ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698