diff options
author | Robert Phillips <robertphillips@google.com> | 2018-06-14 14:31:17 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-15 11:33:14 +0000 |
commit | c8cee446bf9c07da8848bbd032abf26e79966ac1 (patch) | |
tree | 5f024f9dfb1aca470915da9fae96eac0710f5884 /src/gpu/ops/GrClearOp.cpp | |
parent | 9e6402677f1c8f2c3bdc3b812ee38ea2931d92b3 (diff) |
Move op memory storage to GrContext
TBR=bsalomon@google.com
Change-Id: Ifa95bf0073b9d948f2c937d10088b7734b971f90
Reviewed-on: https://skia-review.googlesource.com/131500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/ops/GrClearOp.cpp')
-rw-r--r-- | src/gpu/ops/GrClearOp.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/ops/GrClearOp.cpp b/src/gpu/ops/GrClearOp.cpp index 70fc160c95..612ff2085d 100644 --- a/src/gpu/ops/GrClearOp.cpp +++ b/src/gpu/ops/GrClearOp.cpp @@ -21,7 +21,9 @@ std::unique_ptr<GrClearOp> GrClearOp::Make(GrContext* context, return nullptr; } - return std::unique_ptr<GrClearOp>(new GrClearOp(clip, color, dstProxy)); + GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + + return pool->allocate<GrClearOp>(clip, color, dstProxy); } std::unique_ptr<GrClearOp> GrClearOp::Make(GrContext* context, @@ -30,7 +32,9 @@ std::unique_ptr<GrClearOp> GrClearOp::Make(GrContext* context, bool fullScreen) { SkASSERT(fullScreen || !rect.isEmpty()); - return std::unique_ptr<GrClearOp>(new GrClearOp(rect, color, fullScreen)); + GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + + return pool->allocate<GrClearOp>(rect, color, fullScreen); } GrClearOp::GrClearOp(const GrFixedClip& clip, GrColor color, GrSurfaceProxy* proxy) |