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

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

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

Powered by Google App Engine
This is Rietveld 408576698