From c8cee446bf9c07da8848bbd032abf26e79966ac1 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Thu, 14 Jun 2018 14:31:17 -0400 Subject: 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 Reviewed-by: Greg Daniel Commit-Queue: Robert Phillips --- tests/LazyProxyTest.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'tests/LazyProxyTest.cpp') diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp index c0dcbf9647..796e4870db 100644 --- a/tests/LazyProxyTest.cpp +++ b/tests/LazyProxyTest.cpp @@ -59,7 +59,9 @@ public: GrProxyProvider* proxyProvider, LazyProxyTest* test, bool nullTexture) { - return std::unique_ptr(new Op(proxyProvider, test, nullTexture)); + GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + + return pool->allocate(proxyProvider, test, nullTexture); } void visitProxies(const VisitProxyFunc& func) const override { @@ -270,8 +272,11 @@ public: GrProxyProvider* proxyProvider, int* testExecuteValue, bool shouldFailInstantiation) { - return std::unique_ptr(new LazyFailedInstantiationTestOp( - proxyProvider, testExecuteValue, shouldFailInstantiation)); + GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + + return pool->allocate(proxyProvider, + testExecuteValue, + shouldFailInstantiation); } void visitProxies(const VisitProxyFunc& func) const override { @@ -367,7 +372,9 @@ public: DEFINE_OP_CLASS_ID static std::unique_ptr Make(GrContext* context, sk_sp proxy) { - return std::unique_ptr(new LazyUninstantiateTestOp(std::move(proxy))); + GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + + return pool->allocate(std::move(proxy)); } void visitProxies(const VisitProxyFunc& func) const override { -- cgit v1.2.3