diff options
Diffstat (limited to 'gm')
-rw-r--r-- | gm/atlastext.cpp | 2 | ||||
-rw-r--r-- | gm/beziereffects.cpp | 13 | ||||
-rw-r--r-- | gm/convexpolyeffect.cpp | 4 |
3 files changed, 5 insertions, 14 deletions
diff --git a/gm/atlastext.cpp b/gm/atlastext.cpp index c30a6754db..226b83fdd7 100644 --- a/gm/atlastext.cpp +++ b/gm/atlastext.cpp @@ -8,7 +8,6 @@ #include "gm.h" #if SK_SUPPORT_ATLAS_TEXT -#include "GrContext.h" #include "SkAtlasTextContext.h" #include "SkAtlasTextFont.h" @@ -73,7 +72,6 @@ protected: if (!targetHandle) { return; } - fTarget = SkAtlasTextTarget::Make(fContext, kSize, kSize, targetHandle); fTypefaces[0] = sk_tool_utils::create_portable_typeface("serif", SkFontStyle::Italic()); diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp index 1c26989df2..dea6150549 100644 --- a/gm/beziereffects.cpp +++ b/gm/beziereffects.cpp @@ -80,9 +80,7 @@ public: sk_sp<GrGeometryProcessor> gp, const SkRect& rect, GrColor color) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); - - return pool->allocate<BezierCubicTestOp>(std::move(gp), rect, color); + return std::unique_ptr<GrDrawOp>(new BezierCubicTestOp(std::move(gp), rect, color)); } private: @@ -266,9 +264,8 @@ public: const SkRect& rect, GrColor color, const SkMatrix& klm) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); - - return pool->allocate<BezierConicTestOp>(std::move(gp), rect, color, klm); + return std::unique_ptr<GrMeshDrawOp>( + new BezierConicTestOp(std::move(gp), rect, color, klm)); } private: @@ -488,9 +485,7 @@ public: const SkRect& rect, GrColor color, const GrPathUtils::QuadUVMatrix& devToUV) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); - - return pool->allocate<BezierQuadTestOp>(std::move(gp), rect, color, devToUV); + return std::unique_ptr<GrDrawOp>(new BezierQuadTestOp(std::move(gp), rect, color, devToUV)); } private: diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp index 18c5ebdcdc..8f8d1b4d50 100644 --- a/gm/convexpolyeffect.cpp +++ b/gm/convexpolyeffect.cpp @@ -45,9 +45,7 @@ public: static std::unique_ptr<GrDrawOp> Make(GrContext* context, GrPaint&& paint, const SkRect& rect) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); - - return pool->allocate<PolyBoundsOp>(std::move(paint), rect); + return std::unique_ptr<GrDrawOp>(new PolyBoundsOp(std::move(paint), rect)); } const char* name() const override { return "PolyBoundsOp"; } |