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

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: 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
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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 } 802 }
803 return SkNEW_ARGS(CustomXP, (fMode, dstTexture)); 803 return SkNEW_ARGS(CustomXP, (fMode, dstTexture));
804 } 804 }
805 805
806 bool GrCustomXPFactory::willReadDstColor(const GrCaps& caps, 806 bool GrCustomXPFactory::willReadDstColor(const GrCaps& caps,
807 const GrProcOptInfo& colorPOI, 807 const GrProcOptInfo& colorPOI,
808 const GrProcOptInfo& coveragePOI) const { 808 const GrProcOptInfo& coveragePOI) const {
809 return !can_use_hw_blend_equation(fHWBlendEquation, coveragePOI, caps); 809 return !can_use_hw_blend_equation(fHWBlendEquation, coveragePOI, caps);
810 } 810 }
811 811
812 void GrCustomXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI, 812 void GrCustomXPFactory::getInvariantBlendedColor(const GrProcOptInfo& /*colorPOI */,
bsalomon 2015/06/02 13:44:33 ditto
813 const GrProcOptInfo& coveragePOI, 813 const GrProcOptInfo& /*coverage POI*/,
814 GrXPFactory::InvariantOutput* out put) const { 814 InvariantBlendedColor* blendedC olor) const {
815 output->fWillBlendWithDst = true; 815 blendedColor->fWillBlendWithDst = true;
816 output->fBlendedColorFlags = 0; 816 blendedColor->fKnownColorFlags = kNone_GrColorComponentFlags;
817 } 817 }
818 818
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

Powered by Google App Engine
This is Rietveld 408576698