aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ccpr/GrCCDrawPathsOp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/ccpr/GrCCDrawPathsOp.cpp')
-rw-r--r--src/gpu/ccpr/GrCCDrawPathsOp.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.cpp b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
index 16a2c663a5..35494b7a6d 100644
--- a/src/gpu/ccpr/GrCCDrawPathsOp.cpp
+++ b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
@@ -23,16 +23,22 @@ static bool has_coord_transforms(const GrPaint& paint) {
return false;
}
-std::unique_ptr<GrCCDrawPathsOp> GrCCDrawPathsOp::Make(GrContext*, const SkIRect& clipIBounds,
- const SkMatrix& m, const SkPath& path,
- const SkRect& devBounds, GrPaint&& paint) {
+std::unique_ptr<GrCCDrawPathsOp> GrCCDrawPathsOp::Make(GrContext* context,
+ const SkIRect& clipIBounds,
+ const SkMatrix& m,
+ const SkPath& path,
+ const SkRect& devBounds,
+ GrPaint&& paint) {
SkIRect looseClippedIBounds;
devBounds.roundOut(&looseClippedIBounds); // GrCCPathParser might find slightly tighter bounds.
if (!looseClippedIBounds.intersect(clipIBounds)) {
return nullptr;
}
- return std::unique_ptr<GrCCDrawPathsOp>(
- new GrCCDrawPathsOp(looseClippedIBounds, m, path, devBounds, std::move(paint)));
+
+ GrOpMemoryPool* pool = context->contextPriv().opMemoryPool();
+
+ return pool->allocate<GrCCDrawPathsOp>(looseClippedIBounds, m, path,
+ devBounds, std::move(paint));
}
GrCCDrawPathsOp::GrCCDrawPathsOp(const SkIRect& looseClippedIBounds, const SkMatrix& m,