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

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

Issue 912413002: Pass in ProcOptInfos into willNeedDstCopy on XPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Review cleanup Created 5 years, 10 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.h ('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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 604
605 GrCustomXPFactory::GrCustomXPFactory(SkXfermode::Mode mode) 605 GrCustomXPFactory::GrCustomXPFactory(SkXfermode::Mode mode)
606 : fMode(mode) { 606 : fMode(mode) {
607 this->initClassID<GrCustomXPFactory>(); 607 this->initClassID<GrCustomXPFactory>();
608 } 608 }
609 609
610 GrXferProcessor* 610 GrXferProcessor*
611 GrCustomXPFactory::onCreateXferProcessor(const GrProcOptInfo& colorPOI, 611 GrCustomXPFactory::onCreateXferProcessor(const GrProcOptInfo& colorPOI,
612 const GrProcOptInfo& coveragePOI, 612 const GrProcOptInfo& coveragePOI,
613 const GrDeviceCoordTexture* dstCopy) co nst { 613 const GrDeviceCoordTexture* dstCopy) co nst {
614 return CustomXP::Create(fMode, dstCopy, this->willReadDstColor()); 614 return CustomXP::Create(fMode, dstCopy, this->willReadDstColor(colorPOI, cov eragePOI));
615 } 615 }
616 616
617 617
618 void GrCustomXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI, 618 void GrCustomXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI,
619 const GrProcOptInfo& coveragePOI, 619 const GrProcOptInfo& coveragePOI,
620 GrXPFactory::InvariantOutput* out put) const { 620 GrXPFactory::InvariantOutput* out put) const {
621 output->fWillBlendWithDst = true; 621 output->fWillBlendWithDst = true;
622 output->fBlendedColorFlags = 0; 622 output->fBlendedColorFlags = 0;
623 } 623 }
624 624
625 GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory); 625 GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory);
626 GrXPFactory* GrCustomXPFactory::TestCreate(SkRandom* rand, 626 GrXPFactory* GrCustomXPFactory::TestCreate(SkRandom* rand,
627 GrContext*, 627 GrContext*,
628 const GrDrawTargetCaps&, 628 const GrDrawTargetCaps&,
629 GrTexture*[]) { 629 GrTexture*[]) {
630 int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLas tSeparableMode); 630 int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLas tSeparableMode);
631 631
632 return SkNEW_ARGS(GrCustomXPFactory, (static_cast<SkXfermode::Mode>(mode))); 632 return SkNEW_ARGS(GrCustomXPFactory, (static_cast<SkXfermode::Mode>(mode)));
633 } 633 }
634 634
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCoverageSetOpXP.h ('k') | src/gpu/effects/GrCustomXfermodePriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698