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

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

Issue 1316513002: Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Address comments, fix roll(?) 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/GrCoverageSetOpXP.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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 bool GrCustomXferFP::onIsEqual(const GrFragmentProcessor& other) const { 499 bool GrCustomXferFP::onIsEqual(const GrFragmentProcessor& other) const {
500 const GrCustomXferFP& s = other.cast<GrCustomXferFP>(); 500 const GrCustomXferFP& s = other.cast<GrCustomXferFP>();
501 return fMode == s.fMode; 501 return fMode == s.fMode;
502 } 502 }
503 503
504 void GrCustomXferFP::onComputeInvariantOutput(GrInvariantOutput* inout) const { 504 void GrCustomXferFP::onComputeInvariantOutput(GrInvariantOutput* inout) const {
505 inout->setToUnknown(GrInvariantOutput::kWill_ReadInput); 505 inout->setToUnknown(GrInvariantOutput::kWill_ReadInput);
506 } 506 }
507 507
508 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrCustomXferFP); 508 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrCustomXferFP);
509 GrFragmentProcessor* GrCustomXferFP::TestCreate(GrProcessorTestData* d) { 509 const GrFragmentProcessor* GrCustomXferFP::TestCreate(GrProcessorTestData* d) {
510 int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode ::kLastSeparableMode); 510 int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode ::kLastSeparableMode);
511 511
512 return new GrCustomXferFP(d->fProcDataManager, static_cast<SkXfermode::Mode> (mode), 512 return new GrCustomXferFP(d->fProcDataManager, static_cast<SkXfermode::Mode> (mode),
513 d->fTextures[0]); 513 d->fTextures[0]);
514 } 514 }
515 515
516 /////////////////////////////////////////////////////////////////////////////// 516 ///////////////////////////////////////////////////////////////////////////////
517 // Xfer Processor 517 // Xfer Processor
518 /////////////////////////////////////////////////////////////////////////////// 518 ///////////////////////////////////////////////////////////////////////////////
519 519
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 return !can_use_hw_blend_equation(fHWBlendEquation, coveragePOI, caps); 798 return !can_use_hw_blend_equation(fHWBlendEquation, coveragePOI, caps);
799 } 799 }
800 800
801 void GrCustomXPFactory::getInvariantBlendedColor(const GrProcOptInfo& colorPOI, 801 void GrCustomXPFactory::getInvariantBlendedColor(const GrProcOptInfo& colorPOI,
802 InvariantBlendedColor* blendedC olor) const { 802 InvariantBlendedColor* blendedC olor) const {
803 blendedColor->fWillBlendWithDst = true; 803 blendedColor->fWillBlendWithDst = true;
804 blendedColor->fKnownColorFlags = kNone_GrColorComponentFlags; 804 blendedColor->fKnownColorFlags = kNone_GrColorComponentFlags;
805 } 805 }
806 806
807 GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory); 807 GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory);
808 GrXPFactory* GrCustomXPFactory::TestCreate(GrProcessorTestData* d) { 808 const GrXPFactory* GrCustomXPFactory::TestCreate(GrProcessorTestData* d) {
809 int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1, 809 int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1,
810 SkXfermode::kLastSeparableMode); 810 SkXfermode::kLastSeparableMode);
811 811
812 return new GrCustomXPFactory(static_cast<SkXfermode::Mode>(mode)); 812 return new GrCustomXPFactory(static_cast<SkXfermode::Mode>(mode));
813 } 813 }
814 814
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCoverageSetOpXP.cpp ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698