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

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

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrDistanceFieldGeoProc.h ('k') | src/gpu/effects/GrDitherEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDistanceFieldGeoProc.cpp
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
index e87021e978552ba1dd18682c8654a3fadc930b85..f43a1e89946faf9195e21453e30e2ff39b6059b8 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
@@ -260,7 +260,7 @@ GrGLSLPrimitiveProcessor* GrDistanceFieldA8TextGeoProc::createGLSLInstance(const
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldA8TextGeoProc);
-const GrGeometryProcessor* GrDistanceFieldA8TextGeoProc::TestCreate(GrProcessorTestData* d) {
+sk_sp<GrGeometryProcessor> GrDistanceFieldA8TextGeoProc::TestCreate(GrProcessorTestData* d) {
int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx :
GrProcessorUnitTest::kAlphaTextureIdx;
static const SkShader::TileMode kTileModes[] = {
@@ -281,14 +281,14 @@ const GrGeometryProcessor* GrDistanceFieldA8TextGeoProc::TestCreate(GrProcessorT
flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0;
}
- return GrDistanceFieldA8TextGeoProc::Create(GrRandomColor(d->fRandom),
- GrTest::TestMatrix(d->fRandom),
- d->fTextures[texIdx], params,
+ return GrDistanceFieldA8TextGeoProc::Make(GrRandomColor(d->fRandom),
+ GrTest::TestMatrix(d->fRandom),
+ d->fTextures[texIdx], params,
#ifdef SK_GAMMA_APPLY_TO_A8
- d->fRandom->nextF(),
+ d->fRandom->nextF(),
#endif
- flags,
- d->fRandom->nextBool());
+ flags,
+ d->fRandom->nextBool());
}
///////////////////////////////////////////////////////////////////////////////
@@ -497,7 +497,7 @@ GrGLSLPrimitiveProcessor* GrDistanceFieldPathGeoProc::createGLSLInstance(const G
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldPathGeoProc);
-const GrGeometryProcessor* GrDistanceFieldPathGeoProc::TestCreate(GrProcessorTestData* d) {
+sk_sp<GrGeometryProcessor> GrDistanceFieldPathGeoProc::TestCreate(GrProcessorTestData* d) {
int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
: GrProcessorUnitTest::kAlphaTextureIdx;
static const SkShader::TileMode kTileModes[] = {
@@ -518,12 +518,12 @@ const GrGeometryProcessor* GrDistanceFieldPathGeoProc::TestCreate(GrProcessorTes
flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0;
}
- return GrDistanceFieldPathGeoProc::Create(GrRandomColor(d->fRandom),
- GrTest::TestMatrix(d->fRandom),
- d->fTextures[texIdx],
- params,
- flags,
- d->fRandom->nextBool());
+ return GrDistanceFieldPathGeoProc::Make(GrRandomColor(d->fRandom),
+ GrTest::TestMatrix(d->fRandom),
+ d->fTextures[texIdx],
+ params,
+ flags,
+ d->fRandom->nextBool());
}
///////////////////////////////////////////////////////////////////////////////
@@ -794,7 +794,7 @@ GrGLSLPrimitiveProcessor* GrDistanceFieldLCDTextGeoProc::createGLSLInstance(cons
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldLCDTextGeoProc);
-const GrGeometryProcessor* GrDistanceFieldLCDTextGeoProc::TestCreate(GrProcessorTestData* d) {
+sk_sp<GrGeometryProcessor> GrDistanceFieldLCDTextGeoProc::TestCreate(GrProcessorTestData* d) {
int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx :
GrProcessorUnitTest::kAlphaTextureIdx;
static const SkShader::TileMode kTileModes[] = {
@@ -815,10 +815,10 @@ const GrGeometryProcessor* GrDistanceFieldLCDTextGeoProc::TestCreate(GrProcessor
flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0;
}
flags |= d->fRandom->nextBool() ? kBGR_DistanceFieldEffectFlag : 0;
- return GrDistanceFieldLCDTextGeoProc::Create(GrRandomColor(d->fRandom),
- GrTest::TestMatrix(d->fRandom),
- d->fTextures[texIdx], params,
- wa,
- flags,
- d->fRandom->nextBool());
+ return GrDistanceFieldLCDTextGeoProc::Make(GrRandomColor(d->fRandom),
+ GrTest::TestMatrix(d->fRandom),
+ d->fTextures[texIdx], params,
+ wa,
+ flags,
+ d->fRandom->nextBool());
}
« no previous file with comments | « src/gpu/effects/GrDistanceFieldGeoProc.h ('k') | src/gpu/effects/GrDitherEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698