diff options
author | Robert Phillips <robertphillips@google.com> | 2018-01-16 15:07:54 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-16 20:53:28 +0000 |
commit | 6be756b673b823881e90a2ef68c12b640ddde549 (patch) | |
tree | f7e09cae44e5d5b3faddef00d9250962eec0e05a /tests/ProcessorTest.cpp | |
parent | 1ea485fd56a977b4e84b4e82039e8f2487813c1e (diff) |
Move resourceProvider accessor to GrContextPriv (take 2)
TBR=bsalomon@google.com
Change-Id: I3fd46ebfad0d04b8a2bfa6190f81308f3a6be620
Reviewed-on: https://skia-review.googlesource.com/95121
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests/ProcessorTest.cpp')
-rw-r--r-- | tests/ProcessorTest.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp index e675335118..26f10a383a 100644 --- a/tests/ProcessorTest.cpp +++ b/tests/ProcessorTest.cpp @@ -158,6 +158,7 @@ void testingOnly_getIORefCnts(GrTextureProxy* proxy, int* refCnt, int* readCnt, DEF_GPUTEST_FOR_ALL_CONTEXTS(ProcessorRefTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrResourceProvider* resourceProvider = context->contextPriv().resourceProvider(); GrSurfaceDesc desc; desc.fOrigin = kTopLeft_GrSurfaceOrigin; @@ -181,7 +182,7 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(ProcessorRefTest, reporter, ctxInfo) { sk_sp<GrTextureProxy> proxy4 = proxyProvider->createProxy(desc, SkBackingFit::kExact, SkBudgeted::kYes); sk_sp<GrBuffer> buffer(texelBufferSupport - ? context->resourceProvider()->createBuffer( + ? resourceProvider->createBuffer( 1024, GrBufferType::kTexel_GrBufferType, GrAccessPattern::kStatic_GrAccessPattern, 0) : nullptr); @@ -352,6 +353,7 @@ sk_sp<GrTextureProxy> make_input_texture(GrProxyProvider* proxyProvider, int wid DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + auto resourceProvider = context->contextPriv().resourceProvider(); using FPFactory = GrFragmentProcessorTestFactory; uint32_t seed = 0; @@ -391,7 +393,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, repor } for (int j = 0; j < timesToInvokeFactory; ++j) { fp = FPFactory::MakeIdx(i, &testData); - if (!fp->instantiate(context->resourceProvider())) { + if (!fp->instantiate(resourceProvider)) { continue; } @@ -490,6 +492,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, repor DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorCloneTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + auto resourceProvider = context->contextPriv().resourceProvider(); SkRandom random; @@ -522,8 +525,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorCloneTest, reporter, ctxInfo) { continue; } const char* name = fp->name(); - if (!fp->instantiate(context->resourceProvider()) || - !clone->instantiate(context->resourceProvider())) { + if (!fp->instantiate(resourceProvider) || !clone->instantiate(resourceProvider)) { continue; } REPORTER_ASSERT(reporter, !strcmp(fp->name(), clone->name())); |