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

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

Issue 1161273005: Update XPF invariant info to not account for conflation (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_reenablebea
Patch Set: rebase Created 5 years, 6 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.cpp ('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 * 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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 // No hardware support for advanced blend equations; we will need to do it in the shader. 800 // No hardware support for advanced blend equations; we will need to do it in the shader.
801 return true; 801 return true;
802 } 802 }
803 if (coveragePOI.isFourChannelOutput()) { 803 if (coveragePOI.isFourChannelOutput()) {
804 // Advanced blend equations can't tweak alpha for RGB coverage. 804 // Advanced blend equations can't tweak alpha for RGB coverage.
805 return true; 805 return true;
806 } 806 }
807 return false; 807 return false;
808 } 808 }
809 809
810 void GrCustomXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI, 810 void GrCustomXPFactory::getInvariantBlendedColor(const GrProcOptInfo& colorPOI,
811 const GrProcOptInfo& coveragePOI, 811 InvariantBlendedColor* blendedC olor) const {
812 GrXPFactory::InvariantOutput* out put) const { 812 blendedColor->fWillBlendWithDst = true;
813 output->fWillBlendWithDst = true; 813 blendedColor->fKnownColorFlags = kNone_GrColorComponentFlags;
814 output->fBlendedColorFlags = 0;
815 } 814 }
816 815
817 GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory); 816 GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory);
818 GrXPFactory* GrCustomXPFactory::TestCreate(SkRandom* rand, 817 GrXPFactory* GrCustomXPFactory::TestCreate(SkRandom* rand,
819 GrContext*, 818 GrContext*,
820 const GrCaps&, 819 const GrCaps&,
821 GrTexture*[]) { 820 GrTexture*[]) {
822 int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLas tSeparableMode); 821 int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLas tSeparableMode);
823 822
824 return SkNEW_ARGS(GrCustomXPFactory, (static_cast<SkXfermode::Mode>(mode))); 823 return SkNEW_ARGS(GrCustomXPFactory, (static_cast<SkXfermode::Mode>(mode)));
825 } 824 }
826 825
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCoverageSetOpXP.cpp ('k') | src/gpu/effects/GrCustomXfermodePriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698