From 875218ebd816eb8931c64c5018ce2dc9bc8fd695 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Fri, 24 Feb 2017 08:37:13 -0500 Subject: Wrap cached GrTextures in GrTextureProxies (e.g., blur profiles, nine-patch blurs, etc.) This is pulled out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors) Change-Id: I5feac04dc1bf54bd74c65febdf6bba9e7ce28f55 Reviewed-on: https://skia-review.googlesource.com/8942 Reviewed-by: Brian Salomon Commit-Queue: Robert Phillips --- tests/ClipStackTest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/ClipStackTest.cpp') diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp index 744ef18d17..e3980504f2 100644 --- a/tests/ClipStackTest.cpp +++ b/tests/ClipStackTest.cpp @@ -1413,7 +1413,7 @@ DEF_TEST(ClipStack, reporter) { ////////////////////////////////////////////////////////////////////////////// #if SK_SUPPORT_GPU -sk_sp GrClipStackClip::testingOnly_createClipMask(GrContext* context) const { +sk_sp GrClipStackClip::testingOnly_createClipMask(GrContext* context) const { const GrReducedClip reducedClip(*fStack, SkRect::MakeWH(512, 512), 0); return this->createSoftwareClipMask(context, reducedClip); } @@ -1440,8 +1440,9 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(ClipMaskCache, reporter, ctxInfo) { m.setTranslate(0.5, 0.5); stack.save(); stack.clipPath(path, m, SkClipOp::kIntersect, true); - auto mask = GrClipStackClip(&stack).testingOnly_createClipMask(context); - REPORTER_ASSERT(reporter, 0 == strcmp(mask->getUniqueKey().tag(), kTag)); + sk_sp mask = GrClipStackClip(&stack).testingOnly_createClipMask(context); + GrTexture* tex = mask->instantiate(context->textureProvider()); + REPORTER_ASSERT(reporter, 0 == strcmp(tex->getUniqueKey().tag(), kTag)); // Make sure mask isn't pinned in cache. mask.reset(nullptr); context->flush(); -- cgit v1.2.3