From eee4d6e4e8cc5c4c79f065abcc3ce609f71238f9 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Mon, 5 Jun 2017 09:26:07 -0400 Subject: Make instantiate return a Boolean From an off-line conversation: The longer term idea will be to create a helper class isolates the ability to instantiate proxies until flush time. The peek* methods could then be moved to GrSurfaceProxy. Change-Id: I8e8c02c098475b77d515791c0d6b81f7e4a327dd Reviewed-on: https://skia-review.googlesource.com/18076 Commit-Queue: Robert Phillips Reviewed-by: Brian Salomon --- tests/ClipStackTest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/ClipStackTest.cpp') diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp index ba80933009..e0df2ca902 100644 --- a/tests/ClipStackTest.cpp +++ b/tests/ClipStackTest.cpp @@ -16,6 +16,7 @@ #include "GrClipStackClip.h" #include "GrReducedClip.h" #include "GrResourceCache.h" +#include "GrSurfaceProxyPriv.h" #include "GrTextureProxy.h" typedef GrReducedClip::ElementList ElementList; typedef GrReducedClip::InitialState InitialState; @@ -1442,7 +1443,8 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(ClipMaskCache, reporter, ctxInfo) { stack.save(); stack.clipPath(path, m, SkClipOp::kIntersect, true); sk_sp mask = GrClipStackClip(&stack).testingOnly_createClipMask(context); - GrTexture* tex = mask->instantiateTexture(context->resourceProvider()); + mask->instantiate(context->resourceProvider()); + GrTexture* tex = mask->priv().peekTexture(); REPORTER_ASSERT(reporter, 0 == strcmp(tex->getUniqueKey().tag(), kTag)); // Make sure mask isn't pinned in cache. mask.reset(nullptr); -- cgit v1.2.3