| Index: src/gpu/effects/GrBezierEffect.h
|
| diff --git a/src/gpu/effects/GrBezierEffect.h b/src/gpu/effects/GrBezierEffect.h
|
| index ddb249b587ac86dd297a22b2e2d8d58f4fc6f848..50dca99242d2d3da7a45d69b92e29203b61d5df7 100644
|
| --- a/src/gpu/effects/GrBezierEffect.h
|
| +++ b/src/gpu/effects/GrBezierEffect.h
|
| @@ -58,30 +58,33 @@ class GrGLConicEffect;
|
|
|
| class GrConicEffect : public GrGeometryProcessor {
|
| public:
|
| - static GrGeometryProcessor* Create(GrColor color,
|
| - const SkMatrix& viewMatrix,
|
| - const GrPrimitiveEdgeType edgeType,
|
| - const GrCaps& caps,
|
| - const SkMatrix& localMatrix,
|
| - bool usesLocalCoords,
|
| - uint8_t coverage = 0xff) {
|
| + static sk_sp<GrGeometryProcessor> Make(GrColor color,
|
| + const SkMatrix& viewMatrix,
|
| + const GrPrimitiveEdgeType edgeType,
|
| + const GrCaps& caps,
|
| + const SkMatrix& localMatrix,
|
| + bool usesLocalCoords,
|
| + uint8_t coverage = 0xff) {
|
| switch (edgeType) {
|
| case kFillAA_GrProcessorEdgeType:
|
| if (!caps.shaderCaps()->shaderDerivativeSupport()) {
|
| return nullptr;
|
| }
|
| - return new GrConicEffect(color, viewMatrix, coverage, kFillAA_GrProcessorEdgeType,
|
| - localMatrix, usesLocalCoords);
|
| + return sk_sp<GrGeometryProcessor>(
|
| + new GrConicEffect(color, viewMatrix, coverage, kFillAA_GrProcessorEdgeType,
|
| + localMatrix, usesLocalCoords));
|
| case kHairlineAA_GrProcessorEdgeType:
|
| if (!caps.shaderCaps()->shaderDerivativeSupport()) {
|
| return nullptr;
|
| }
|
| - return new GrConicEffect(color, viewMatrix, coverage,
|
| - kHairlineAA_GrProcessorEdgeType, localMatrix,
|
| - usesLocalCoords);
|
| + return sk_sp<GrGeometryProcessor>(
|
| + new GrConicEffect(color, viewMatrix, coverage,
|
| + kHairlineAA_GrProcessorEdgeType, localMatrix,
|
| + usesLocalCoords));
|
| case kFillBW_GrProcessorEdgeType:
|
| - return new GrConicEffect(color, viewMatrix, coverage, kFillBW_GrProcessorEdgeType,
|
| - localMatrix, usesLocalCoords);
|
| + return sk_sp<GrGeometryProcessor>(
|
| + new GrConicEffect(color, viewMatrix, coverage, kFillBW_GrProcessorEdgeType,
|
| + localMatrix, usesLocalCoords));
|
| default:
|
| return nullptr;
|
| }
|
| @@ -138,30 +141,33 @@ class GrGLQuadEffect;
|
|
|
| class GrQuadEffect : public GrGeometryProcessor {
|
| public:
|
| - static GrGeometryProcessor* Create(GrColor color,
|
| - const SkMatrix& viewMatrix,
|
| - const GrPrimitiveEdgeType edgeType,
|
| - const GrCaps& caps,
|
| - const SkMatrix& localMatrix,
|
| - bool usesLocalCoords,
|
| - uint8_t coverage = 0xff) {
|
| + static sk_sp<GrGeometryProcessor> Make(GrColor color,
|
| + const SkMatrix& viewMatrix,
|
| + const GrPrimitiveEdgeType edgeType,
|
| + const GrCaps& caps,
|
| + const SkMatrix& localMatrix,
|
| + bool usesLocalCoords,
|
| + uint8_t coverage = 0xff) {
|
| switch (edgeType) {
|
| case kFillAA_GrProcessorEdgeType:
|
| if (!caps.shaderCaps()->shaderDerivativeSupport()) {
|
| return nullptr;
|
| }
|
| - return new GrQuadEffect(color, viewMatrix, coverage, kFillAA_GrProcessorEdgeType,
|
| - localMatrix, usesLocalCoords);
|
| + return sk_sp<GrGeometryProcessor>(
|
| + new GrQuadEffect(color, viewMatrix, coverage, kFillAA_GrProcessorEdgeType,
|
| + localMatrix, usesLocalCoords));
|
| case kHairlineAA_GrProcessorEdgeType:
|
| if (!caps.shaderCaps()->shaderDerivativeSupport()) {
|
| return nullptr;
|
| }
|
| - return new GrQuadEffect(color, viewMatrix, coverage,
|
| - kHairlineAA_GrProcessorEdgeType, localMatrix,
|
| - usesLocalCoords);
|
| + return sk_sp<GrGeometryProcessor>(
|
| + new GrQuadEffect(color, viewMatrix, coverage,
|
| + kHairlineAA_GrProcessorEdgeType, localMatrix,
|
| + usesLocalCoords));
|
| case kFillBW_GrProcessorEdgeType:
|
| - return new GrQuadEffect(color, viewMatrix, coverage, kFillBW_GrProcessorEdgeType,
|
| - localMatrix, usesLocalCoords);
|
| + return sk_sp<GrGeometryProcessor>(
|
| + new GrQuadEffect(color, viewMatrix, coverage, kFillBW_GrProcessorEdgeType,
|
| + localMatrix, usesLocalCoords));
|
| default:
|
| return nullptr;
|
| }
|
| @@ -220,23 +226,26 @@ class GrGLCubicEffect;
|
|
|
| class GrCubicEffect : public GrGeometryProcessor {
|
| public:
|
| - static GrGeometryProcessor* Create(GrColor color,
|
| - const SkMatrix& viewMatrix,
|
| - const GrPrimitiveEdgeType edgeType,
|
| - const GrCaps& caps) {
|
| + static sk_sp<GrGeometryProcessor> Make(GrColor color,
|
| + const SkMatrix& viewMatrix,
|
| + const GrPrimitiveEdgeType edgeType,
|
| + const GrCaps& caps) {
|
| switch (edgeType) {
|
| case kFillAA_GrProcessorEdgeType:
|
| if (!caps.shaderCaps()->shaderDerivativeSupport()) {
|
| return nullptr;
|
| }
|
| - return new GrCubicEffect(color, viewMatrix, kFillAA_GrProcessorEdgeType);
|
| + return sk_sp<GrGeometryProcessor>(
|
| + new GrCubicEffect(color, viewMatrix, kFillAA_GrProcessorEdgeType));
|
| case kHairlineAA_GrProcessorEdgeType:
|
| if (!caps.shaderCaps()->shaderDerivativeSupport()) {
|
| return nullptr;
|
| }
|
| - return new GrCubicEffect(color, viewMatrix, kHairlineAA_GrProcessorEdgeType);
|
| + return sk_sp<GrGeometryProcessor>(
|
| + new GrCubicEffect(color, viewMatrix, kHairlineAA_GrProcessorEdgeType));
|
| case kFillBW_GrProcessorEdgeType:
|
| - return new GrCubicEffect(color, viewMatrix, kFillBW_GrProcessorEdgeType);
|
| + return sk_sp<GrGeometryProcessor>(
|
| + new GrCubicEffect(color, viewMatrix, kFillBW_GrProcessorEdgeType));
|
| default:
|
| return nullptr;
|
| }
|
|
|