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

Unified Diff: src/gpu/effects/GrCustomXfermode.cpp

Issue 1213623022: fix up test create functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrCoverageSetOpXP.cpp ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrCustomXfermode.cpp
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp
index 94d50f684ee9a9d205f77696bdcb1d50a2462820..c1ff3af1edb40a5bad93816ee0764e5aed37684f 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -509,15 +509,11 @@ void GrCustomXferFP::onComputeInvariantOutput(GrInvariantOutput* inout) const {
}
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrCustomXferFP);
-GrFragmentProcessor* GrCustomXferFP::TestCreate(SkRandom* rand,
- GrContext*,
- const GrCaps&,
- GrTexture* textures[]) {
- int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLastSeparableMode);
-
- GrShaderDataManager shaderDataManager;
- return SkNEW_ARGS(GrCustomXferFP, (&shaderDataManager, static_cast<SkXfermode::Mode>(mode),
- textures[0]));
+GrFragmentProcessor* GrCustomXferFP::TestCreate(GrProcessorTestData* d) {
+ int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLastSeparableMode);
+
+ return SkNEW_ARGS(GrCustomXferFP, (d->fShaderDataManager, static_cast<SkXfermode::Mode>(mode),
+ d->fTextures[0]));
}
///////////////////////////////////////////////////////////////////////////////
@@ -817,11 +813,9 @@ void GrCustomXPFactory::getInvariantBlendedColor(const GrProcOptInfo& colorPOI,
}
GR_DEFINE_XP_FACTORY_TEST(GrCustomXPFactory);
-GrXPFactory* GrCustomXPFactory::TestCreate(SkRandom* rand,
- GrContext*,
- const GrCaps&,
- GrTexture*[]) {
- int mode = rand->nextRangeU(SkXfermode::kLastCoeffMode + 1, SkXfermode::kLastSeparableMode);
+GrXPFactory* GrCustomXPFactory::TestCreate(GrProcessorTestData* d) {
+ int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1,
+ SkXfermode::kLastSeparableMode);
return SkNEW_ARGS(GrCustomXPFactory, (static_cast<SkXfermode::Mode>(mode)));
}
« 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