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

Unified Diff: src/gpu/effects/GrBezierEffect.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/GrBezierEffect.h ('k') | src/gpu/effects/GrBicubicEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrBezierEffect.cpp
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp
index 075ce164340d193336f692b6886113ab87941329..9d3e8eec4fb368481d0ca2d08f1d00506241fae3 100644
--- a/src/gpu/effects/GrBezierEffect.cpp
+++ b/src/gpu/effects/GrBezierEffect.cpp
@@ -272,15 +272,15 @@ GrConicEffect::GrConicEffect(GrColor color, const SkMatrix& viewMatrix, uint8_t
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrConicEffect);
-const GrGeometryProcessor* GrConicEffect::TestCreate(GrProcessorTestData* d) {
- GrGeometryProcessor* gp;
+sk_sp<GrGeometryProcessor> GrConicEffect::TestCreate(GrProcessorTestData* d) {
+ sk_sp<GrGeometryProcessor> gp;
do {
GrPrimitiveEdgeType edgeType =
static_cast<GrPrimitiveEdgeType>(
d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt));
- gp = GrConicEffect::Create(GrRandomColor(d->fRandom), GrTest::TestMatrix(d->fRandom),
- edgeType, *d->fCaps,
- GrTest::TestMatrix(d->fRandom), d->fRandom->nextBool());
+ gp = GrConicEffect::Make(GrRandomColor(d->fRandom), GrTest::TestMatrix(d->fRandom),
+ edgeType, *d->fCaps,
+ GrTest::TestMatrix(d->fRandom), d->fRandom->nextBool());
} while (nullptr == gp);
return gp;
}
@@ -488,16 +488,16 @@ GrQuadEffect::GrQuadEffect(GrColor color, const SkMatrix& viewMatrix, uint8_t co
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrQuadEffect);
-const GrGeometryProcessor* GrQuadEffect::TestCreate(GrProcessorTestData* d) {
- GrGeometryProcessor* gp;
+sk_sp<GrGeometryProcessor> GrQuadEffect::TestCreate(GrProcessorTestData* d) {
+ sk_sp<GrGeometryProcessor> gp;
do {
GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>(
d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt));
- gp = GrQuadEffect::Create(GrRandomColor(d->fRandom),
- GrTest::TestMatrix(d->fRandom),
- edgeType, *d->fCaps,
- GrTest::TestMatrix(d->fRandom),
- d->fRandom->nextBool());
+ gp = GrQuadEffect::Make(GrRandomColor(d->fRandom),
+ GrTest::TestMatrix(d->fRandom),
+ edgeType, *d->fCaps,
+ GrTest::TestMatrix(d->fRandom),
+ d->fRandom->nextBool());
} while (nullptr == gp);
return gp;
}
@@ -716,14 +716,14 @@ GrCubicEffect::GrCubicEffect(GrColor color, const SkMatrix& viewMatrix,
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrCubicEffect);
-const GrGeometryProcessor* GrCubicEffect::TestCreate(GrProcessorTestData* d) {
- GrGeometryProcessor* gp;
+sk_sp<GrGeometryProcessor> GrCubicEffect::TestCreate(GrProcessorTestData* d) {
+ sk_sp<GrGeometryProcessor> gp;
do {
GrPrimitiveEdgeType edgeType =
static_cast<GrPrimitiveEdgeType>(
d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt));
- gp = GrCubicEffect::Create(GrRandomColor(d->fRandom),
- GrTest::TestMatrix(d->fRandom), edgeType, *d->fCaps);
+ gp = GrCubicEffect::Make(GrRandomColor(d->fRandom),
+ GrTest::TestMatrix(d->fRandom), edgeType, *d->fCaps);
} while (nullptr == gp);
return gp;
}
« no previous file with comments | « src/gpu/effects/GrBezierEffect.h ('k') | src/gpu/effects/GrBicubicEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698