diff options
author | Robert Phillips <robertphillips@google.com> | 2018-03-06 08:20:37 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-06 14:23:45 +0000 |
commit | 0c4b7b1f2f1dd37204d401a6993119e5431942a6 (patch) | |
tree | af37ee06f3a29a0aeeba00f8bbcf67fbfd0bbea4 /tests | |
parent | 2f8622029d265e79eb11df8eb06a29ff3faa7ac0 (diff) |
Move internal calls from GrContext to GrContextPriv
A mechanical bulk move just to get these out of the public API.
TBR=bsalomon@google.com
Change-Id: I813efbd54a09dd448275697c0e50947753a5cfd3
Reviewed-on: https://skia-review.googlesource.com/112262
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ClearTest.cpp | 5 | ||||
-rw-r--r-- | tests/DefaultPathRendererTest.cpp | 6 | ||||
-rw-r--r-- | tests/GLProgramsTest.cpp | 30 | ||||
-rw-r--r-- | tests/GrCCPRTest.cpp | 3 | ||||
-rw-r--r-- | tests/GrContextFactoryTest.cpp | 2 | ||||
-rw-r--r-- | tests/GrMeshTest.cpp | 4 | ||||
-rw-r--r-- | tests/GrPipelineDynamicStateTest.cpp | 4 | ||||
-rw-r--r-- | tests/GrSurfaceTest.cpp | 4 | ||||
-rw-r--r-- | tests/LazyProxyTest.cpp | 14 | ||||
-rw-r--r-- | tests/OnFlushCallbackTest.cpp | 4 | ||||
-rw-r--r-- | tests/PathRendererCacheTests.cpp | 2 | ||||
-rw-r--r-- | tests/PrimitiveProcessorTest.cpp | 12 | ||||
-rw-r--r-- | tests/ProcessorTest.cpp | 7 | ||||
-rw-r--r-- | tests/RectangleTextureTest.cpp | 4 | ||||
-rw-r--r-- | tests/ResourceCacheTest.cpp | 2 | ||||
-rw-r--r-- | tests/SRGBMipMapTest.cpp | 12 | ||||
-rw-r--r-- | tests/TessellatingPathRendererTests.cpp | 2 | ||||
-rw-r--r-- | tests/TextBlobCacheTest.cpp | 3 | ||||
-rw-r--r-- | tests/TextureProxyTest.cpp | 4 |
19 files changed, 67 insertions, 57 deletions
diff --git a/tests/ClearTest.cpp b/tests/ClearTest.cpp index 7424c5a3b5..429b9e1d5d 100644 --- a/tests/ClearTest.cpp +++ b/tests/ClearTest.cpp @@ -42,8 +42,9 @@ static bool check_rect(GrRenderTargetContext* rtc, const SkIRect& rect, uint32_t } sk_sp<GrRenderTargetContext> newRTC(GrContext* context, int w, int h) { - return context->makeDeferredRenderTargetContext(SkBackingFit::kExact, w, h, - kRGBA_8888_GrPixelConfig, nullptr); + return context->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, w, h, + kRGBA_8888_GrPixelConfig, nullptr); } static void clear_op_test(skiatest::Reporter* reporter, GrContext* context) { diff --git a/tests/DefaultPathRendererTest.cpp b/tests/DefaultPathRendererTest.cpp index 176461106f..155d6a7b43 100644 --- a/tests/DefaultPathRendererTest.cpp +++ b/tests/DefaultPathRendererTest.cpp @@ -68,7 +68,8 @@ static void run_test(GrContext* ctx, skiatest::Reporter* reporter) { GrStyle style(SkStrokeRec::kFill_InitStyle); { - auto rtc = ctx->makeDeferredRenderTargetContext(SkBackingFit::kApprox, + auto rtc = ctx->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kApprox, kBigSize/2+1, kBigSize/2+1, kRGBA_8888_GrPixelConfig, nullptr); @@ -88,7 +89,8 @@ static void run_test(GrContext* ctx, skiatest::Reporter* reporter) { } { - auto rtc = ctx->makeDeferredRenderTargetContext(SkBackingFit::kExact, kBigSize, kBigSize, + auto rtc = ctx->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, kBigSize, kBigSize, kRGBA_8888_GrPixelConfig, nullptr); rtc->clear(nullptr, GrColorPackRGBA(0x0, 0x0, 0x0, 0xFF), diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index 1384e3885b..e3639fbce6 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -155,15 +155,15 @@ static sk_sp<GrRenderTargetContext> random_render_target_context(GrContext* cont // Above could be 0 if msaa isn't supported. sampleCnt = SkTMax(1, sampleCnt); - sk_sp<GrRenderTargetContext> renderTargetContext(context->makeDeferredRenderTargetContext( - SkBackingFit::kExact, - kRenderTargetWidth, - kRenderTargetHeight, - kRGBA_8888_GrPixelConfig, - nullptr, - sampleCnt, - GrMipMapped::kNo, - origin)); + sk_sp<GrRenderTargetContext> renderTargetContext( + context->contextPriv().makeDeferredRenderTargetContext(SkBackingFit::kExact, + kRenderTargetWidth, + kRenderTargetHeight, + kRGBA_8888_GrPixelConfig, + nullptr, + sampleCnt, + GrMipMapped::kNo, + origin)); return renderTargetContext; } @@ -318,12 +318,12 @@ bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages, int ma drawingManager->flush(nullptr); // Validate that GrFPs work correctly without an input. - sk_sp<GrRenderTargetContext> renderTargetContext(context->makeDeferredRenderTargetContext( - SkBackingFit::kExact, - kRenderTargetWidth, - kRenderTargetHeight, - kRGBA_8888_GrPixelConfig, - nullptr)); + sk_sp<GrRenderTargetContext> renderTargetContext( + context->contextPriv().makeDeferredRenderTargetContext(SkBackingFit::kExact, + kRenderTargetWidth, + kRenderTargetHeight, + kRGBA_8888_GrPixelConfig, + nullptr)); if (!renderTargetContext) { SkDebugf("Could not allocate a renderTargetContext"); return false; diff --git a/tests/GrCCPRTest.cpp b/tests/GrCCPRTest.cpp index cba94b4bf5..2a51c1b176 100644 --- a/tests/GrCCPRTest.cpp +++ b/tests/GrCCPRTest.cpp @@ -59,7 +59,8 @@ public: CCPRPathDrawer(GrContext* ctx, skiatest::Reporter* reporter) : fCtx(ctx) , fCCPR(fCtx->contextPriv().drawingManager()->getCoverageCountingPathRenderer()) - , fRTC(fCtx->makeDeferredRenderTargetContext(SkBackingFit::kExact, kCanvasSize, + , fRTC(fCtx->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, kCanvasSize, kCanvasSize, kRGBA_8888_GrPixelConfig, nullptr)) { if (!fCCPR) { diff --git a/tests/GrContextFactoryTest.cpp b/tests/GrContextFactoryTest.cpp index 29f68366c3..bebfd4d530 100644 --- a/tests/GrContextFactoryTest.cpp +++ b/tests/GrContextFactoryTest.cpp @@ -166,7 +166,7 @@ DEF_GPUTEST(GrContextFactory_executorAndTaskGroup, reporter, options) { DEF_GPUTEST_FOR_ALL_CONTEXTS(GrContextDump, reporter, ctxInfo) { // Ensure that GrContext::dump doesn't assert (which is possible, if the JSON code is wrong) - SkString result = ctxInfo.grContext()->dump(); + SkString result = ctxInfo.grContext()->contextPriv().dump(); REPORTER_ASSERT(reporter, !result.isEmpty()); } diff --git a/tests/GrMeshTest.cpp b/tests/GrMeshTest.cpp index acac61b95f..80788ddc07 100644 --- a/tests/GrMeshTest.cpp +++ b/tests/GrMeshTest.cpp @@ -82,8 +82,8 @@ static void run_test(const char* testName, skiatest::Reporter*, const sk_sp<GrRe DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrMeshTest, reporter, ctxInfo) { GrContext* const context = ctxInfo.grContext(); - sk_sp<GrRenderTargetContext> rtc( - context->makeDeferredRenderTargetContext(SkBackingFit::kExact, kImageWidth, kImageHeight, + sk_sp<GrRenderTargetContext> rtc(context->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, kImageWidth, kImageHeight, kRGBA_8888_GrPixelConfig, nullptr)); if (!rtc) { ERRORF(reporter, "could not create render target context."); diff --git a/tests/GrPipelineDynamicStateTest.cpp b/tests/GrPipelineDynamicStateTest.cpp index f715684ef9..7db0d9457d 100644 --- a/tests/GrPipelineDynamicStateTest.cpp +++ b/tests/GrPipelineDynamicStateTest.cpp @@ -148,8 +148,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrPipelineDynamicStateTest, reporter, ctxInfo GrContext* const context = ctxInfo.grContext(); GrResourceProvider* rp = context->contextPriv().resourceProvider(); - sk_sp<GrRenderTargetContext> rtc( - context->makeDeferredRenderTargetContext(SkBackingFit::kExact, kScreenSize, kScreenSize, + sk_sp<GrRenderTargetContext> rtc(context->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, kScreenSize, kScreenSize, kRGBA_8888_GrPixelConfig, nullptr)); if (!rtc) { ERRORF(reporter, "could not create render target context."); diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp index daef511bb6..18c0275cba 100644 --- a/tests/GrSurfaceTest.cpp +++ b/tests/GrSurfaceTest.cpp @@ -197,7 +197,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(InitialTextureClear, reporter, context_info) texCtx->writePixels(info, data.get(), 0, 0, 0); } } - context->purgeAllUnlockedResources(); + context->contextPriv().purgeAllUnlockedResources_ForTesting(); // Try creating the texture as a deferred proxy. for (int i = 0; i < 2; ++i) { @@ -224,7 +224,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(InitialTextureClear, reporter, context_info) surfCtx->writePixels(info, data.get(), 0, 0, 0); } } - context->purgeAllUnlockedResources(); + context->contextPriv().purgeAllUnlockedResources_ForTesting(); } } } diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp index da83dcbbbc..9253678dbb 100644 --- a/tests/LazyProxyTest.cpp +++ b/tests/LazyProxyTest.cpp @@ -187,12 +187,12 @@ DEF_GPUTEST(LazyProxyTest, reporter, /* options */) { for (bool nullTexture : {false, true}) { LazyProxyTest test(reporter); ctx->contextPriv().addOnFlushCallbackObject(&test); - sk_sp<GrRenderTargetContext> rtc = - ctx->makeDeferredRenderTargetContext(SkBackingFit::kExact, 100, 100, - kRGBA_8888_GrPixelConfig, nullptr); + sk_sp<GrRenderTargetContext> rtc = ctx->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, 100, 100, + kRGBA_8888_GrPixelConfig, nullptr); REPORTER_ASSERT(reporter, rtc); - sk_sp<GrRenderTargetContext> mockAtlas = - ctx->makeDeferredRenderTargetContext(SkBackingFit::kExact, 10, 10, + sk_sp<GrRenderTargetContext> mockAtlas = ctx->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, 10, 10, kAlpha_half_GrPixelConfig, nullptr); REPORTER_ASSERT(reporter, mockAtlas); rtc->priv().testingOnly_addDrawOp(LazyProxyTest::Clip(&test, mockAtlas->asTextureProxy()), @@ -316,8 +316,8 @@ DEF_GPUTEST(LazyProxyFailedInstantiationTest, reporter, /* options */) { GrResourceProvider* resourceProvider = ctx->contextPriv().resourceProvider(); GrProxyProvider* proxyProvider = ctx->contextPriv().proxyProvider(); for (bool failInstantiation : {false, true}) { - sk_sp<GrRenderTargetContext> rtc = - ctx->makeDeferredRenderTargetContext(SkBackingFit::kExact, 100, 100, + sk_sp<GrRenderTargetContext> rtc = ctx->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, 100, 100, kRGBA_8888_GrPixelConfig, nullptr); REPORTER_ASSERT(reporter, rtc); diff --git a/tests/OnFlushCallbackTest.cpp b/tests/OnFlushCallbackTest.cpp index 5cd3bcd480..73ac5f191e 100644 --- a/tests/OnFlushCallbackTest.cpp +++ b/tests/OnFlushCallbackTest.cpp @@ -421,7 +421,7 @@ private: // This creates an off-screen rendertarget whose ops which eventually pull from the atlas. static sk_sp<GrTextureProxy> make_upstream_image(GrContext* context, AtlasObject* object, int start, sk_sp<GrTextureProxy> atlasProxy) { - sk_sp<GrRenderTargetContext> rtc(context->makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc(context->contextPriv().makeDeferredRenderTargetContext( SkBackingFit::kApprox, 3*kDrawnTileSize, kDrawnTileSize, @@ -535,7 +535,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(OnFlushCallbackTest, reporter, ctxInfo) { static const int kFinalWidth = 6*kDrawnTileSize; static const int kFinalHeight = kDrawnTileSize; - sk_sp<GrRenderTargetContext> rtc(context->makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc(context->contextPriv().makeDeferredRenderTargetContext( SkBackingFit::kApprox, kFinalWidth, kFinalHeight, diff --git a/tests/PathRendererCacheTests.cpp b/tests/PathRendererCacheTests.cpp index 19197b0d5f..f8c95b34a4 100644 --- a/tests/PathRendererCacheTests.cpp +++ b/tests/PathRendererCacheTests.cpp @@ -79,7 +79,7 @@ static void test_path(skiatest::Reporter* reporter, ctx->setResourceCacheLimits(100, 8000000); GrResourceCache* cache = ctx->contextPriv().getResourceCache(); - sk_sp<GrRenderTargetContext> rtc(ctx->makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc(ctx->contextPriv().makeDeferredRenderTargetContext( SkBackingFit::kApprox, 800, 800, kRGBA_8888_GrPixelConfig, nullptr, 1, GrMipMapped::kNo, kTopLeft_GrSurfaceOrigin)); if (!rtc) { diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp index 089d6ce1bf..b5f508bb7a 100644 --- a/tests/PrimitiveProcessorTest.cpp +++ b/tests/PrimitiveProcessorTest.cpp @@ -115,10 +115,10 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) { GrGpu* gpu = context->contextPriv().getGpu(); #endif - sk_sp<GrRenderTargetContext> renderTargetContext(context->makeDeferredRenderTargetContext( - SkBackingFit::kApprox, - 1, 1, kRGBA_8888_GrPixelConfig, - nullptr)); + sk_sp<GrRenderTargetContext> renderTargetContext( + context->contextPriv().makeDeferredRenderTargetContext(SkBackingFit::kApprox, + 1, 1, kRGBA_8888_GrPixelConfig, + nullptr)); if (!renderTargetContext) { ERRORF(reporter, "Could not create render target context."); return; @@ -129,7 +129,7 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) { return; } context->flush(); - context->resetGpuStats(); + context->contextPriv().resetGpuStats(); #if GR_GPU_STATS REPORTER_ASSERT(reporter, gpu->stats()->numDraws() == 0); REPORTER_ASSERT(reporter, gpu->stats()->numFailedDraws() == 0); @@ -145,7 +145,7 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) { REPORTER_ASSERT(reporter, gpu->stats()->numDraws() == 1); REPORTER_ASSERT(reporter, gpu->stats()->numFailedDraws() == 0); #endif - context->resetGpuStats(); + context->contextPriv().resetGpuStats(); renderTargetContext->priv().testingOnly_addDrawOp(Op::Make(attribCnt + 1)); context->flush(); #if GR_GPU_STATS diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp index aea5208368..2694bca005 100644 --- a/tests/ProcessorTest.cpp +++ b/tests/ProcessorTest.cpp @@ -168,7 +168,8 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(ProcessorRefTest, reporter, ctxInfo) { for (bool makeClone : {false, true}) { for (int parentCnt = 0; parentCnt < 2; parentCnt++) { sk_sp<GrRenderTargetContext> renderTargetContext( - context->makeDeferredRenderTargetContext(SkBackingFit::kApprox, 1, 1, + context->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kApprox, 1, 1, kRGBA_8888_GrPixelConfig, nullptr)); { bool texelBufferSupport = context->caps()->shaderCaps()->texelBufferSupport(); @@ -365,7 +366,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, repor // Make the destination context for the test. static constexpr int kRenderSize = 256; - sk_sp<GrRenderTargetContext> rtc = context->makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc = context->contextPriv().makeDeferredRenderTargetContext( SkBackingFit::kExact, kRenderSize, kRenderSize, kRGBA_8888_GrPixelConfig, nullptr); sk_sp<GrTextureProxy> proxies[2]; @@ -497,7 +498,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorCloneTest, reporter, ctxInfo) { // Make the destination context for the test. static constexpr int kRenderSize = 1024; - sk_sp<GrRenderTargetContext> rtc = context->makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc = context->contextPriv().makeDeferredRenderTargetContext( SkBackingFit::kExact, kRenderSize, kRenderSize, kRGBA_8888_GrPixelConfig, nullptr); sk_sp<GrTextureProxy> proxies[2]; diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp index 8994f56127..08cedd0be3 100644 --- a/tests/RectangleTextureTest.cpp +++ b/tests/RectangleTextureTest.cpp @@ -22,8 +22,8 @@ // skbug.com/5932 static void test_basic_draw_as_src(skiatest::Reporter* reporter, GrContext* context, sk_sp<GrTextureProxy> rectProxy, uint32_t expectedPixelValues[]) { - sk_sp<GrRenderTargetContext> rtContext( - context->makeDeferredRenderTargetContext(SkBackingFit::kExact, rectProxy->width(), + sk_sp<GrRenderTargetContext> rtContext(context->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, rectProxy->width(), rectProxy->height(), rectProxy->config(), nullptr)); for (auto filter : {GrSamplerState::Filter::kNearest, diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp index 55f4f856d2..2ceb567688 100644 --- a/tests/ResourceCacheTest.cpp +++ b/tests/ResourceCacheTest.cpp @@ -1465,7 +1465,7 @@ static void test_partial_purge(skiatest::Reporter* reporter) { }; // ensure all are purged before the next - context->purgeAllUnlockedResources(); + context->contextPriv().purgeAllUnlockedResources_ForTesting(); REPORTER_ASSERT(reporter, 0 == cache->getBudgetedResourceCount()); REPORTER_ASSERT(reporter, 0 == cache->getPurgeableBytes()); diff --git a/tests/SRGBMipMapTest.cpp b/tests/SRGBMipMapTest.cpp index 466aad2dcc..91294dedb7 100644 --- a/tests/SRGBMipMapTest.cpp +++ b/tests/SRGBMipMapTest.cpp @@ -136,10 +136,14 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SRGBMipMaps, reporter, ctxInfo) { // Create two render target contexts (L32 and S32) sk_sp<SkColorSpace> srgbColorSpace = SkColorSpace::MakeSRGB(); - sk_sp<GrRenderTargetContext> l32RenderTargetContext = context->makeDeferredRenderTargetContext( - SkBackingFit::kExact, rtS, rtS, kRGBA_8888_GrPixelConfig, nullptr); - sk_sp<GrRenderTargetContext> s32RenderTargetContext = context->makeDeferredRenderTargetContext( - SkBackingFit::kExact, rtS, rtS, kSRGBA_8888_GrPixelConfig, std::move(srgbColorSpace)); + sk_sp<GrRenderTargetContext> l32RenderTargetContext = + context->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, rtS, rtS, + kRGBA_8888_GrPixelConfig, nullptr); + sk_sp<GrRenderTargetContext> s32RenderTargetContext = + context->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, rtS, rtS, + kSRGBA_8888_GrPixelConfig, std::move(srgbColorSpace)); SkRect rect = SkRect::MakeWH(SkIntToScalar(rtS), SkIntToScalar(rtS)); GrNoClip noClip; diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp index f6304f5b18..451391762d 100644 --- a/tests/TessellatingPathRendererTests.cpp +++ b/tests/TessellatingPathRendererTests.cpp @@ -485,7 +485,7 @@ static void test_path(GrContext* ctx, DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) { GrContext* ctx = ctxInfo.grContext(); - sk_sp<GrRenderTargetContext> rtc(ctx->makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc(ctx->contextPriv().makeDeferredRenderTargetContext( SkBackingFit::kApprox, 800, 800, kRGBA_8888_GrPixelConfig, nullptr, 1, GrMipMapped::kNo, kTopLeft_GrSurfaceOrigin)); if (!rtc) { diff --git a/tests/TextBlobCacheTest.cpp b/tests/TextBlobCacheTest.cpp index bd74301117..4d606c9550 100644 --- a/tests/TextBlobCacheTest.cpp +++ b/tests/TextBlobCacheTest.cpp @@ -25,6 +25,7 @@ #if SK_SUPPORT_GPU #include "GrContext.h" +#include "GrContextPriv.h" #include "GrTest.h" static void draw(SkCanvas* canvas, int redraw, const SkTArray<sk_sp<SkTextBlob>>& blobs) { @@ -54,7 +55,7 @@ static void text_blob_cache_inner(skiatest::Reporter* reporter, GrContext* conte // configure our context for maximum stressing of cache and atlas if (stressTest) { GrTest::SetupAlwaysEvictAtlas(context); - context->setTextBlobCacheLimit_ForTesting(0); + context->contextPriv().setTextBlobCacheLimit_ForTesting(0); } SkImageInfo info = SkImageInfo::Make(kWidth, kHeight, kN32_SkColorType, kPremul_SkAlphaType); diff --git a/tests/TextureProxyTest.cpp b/tests/TextureProxyTest.cpp index 8d0df6f6d7..0c93977a74 100644 --- a/tests/TextureProxyTest.cpp +++ b/tests/TextureProxyTest.cpp @@ -232,7 +232,7 @@ static void invalidation_test(GrContext* context, skiatest::Reporter* reporter) REPORTER_ASSERT(reporter, 1 == cache->getResourceCount()); textureImg = nullptr; - context->purgeAllUnlockedResources(); + context->contextPriv().purgeAllUnlockedResources_ForTesting(); REPORTER_ASSERT(reporter, 0 == proxyProvider->numUniqueKeyProxies_TestOnly()); REPORTER_ASSERT(reporter, 0 == cache->getResourceCount()); @@ -271,7 +271,7 @@ static void invalidation_and_instantiation_test(GrContext* context, skiatest::Re REPORTER_ASSERT(reporter, 1 == cache->getResourceCount()); proxy = nullptr; - context->purgeAllUnlockedResources(); + context->contextPriv().purgeAllUnlockedResources_ForTesting(); REPORTER_ASSERT(reporter, 0 == proxyProvider->numUniqueKeyProxies_TestOnly()); REPORTER_ASSERT(reporter, 0 == cache->getResourceCount()); |