Rename GrContext::contextPriv to priv Mechanical. This makes the priv() accessor the same for all the context types. Change-Id: I40850eb05a33b8d7cc3eabdd42226d24b2ba58aa Reviewed-on: https://skia-review.googlesource.com/c/189164 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/bench/GrResourceCacheBench.cpp b/bench/GrResourceCacheBench.cpp index 527e0ff..8d96480 100644 --- a/bench/GrResourceCacheBench.cpp +++ b/bench/GrResourceCacheBench.cpp
@@ -76,13 +76,13 @@ // Set the cache budget to be very large so no purging occurs. context->setResourceCacheLimits(CACHE_SIZE_COUNT, 1 << 30); - GrResourceCache* cache = context->contextPriv().getResourceCache(); + GrResourceCache* cache = context->priv().getResourceCache(); // Make sure the cache is empty. cache->purgeAllUnlocked(); SkASSERT(0 == cache->getResourceCount() && 0 == cache->getResourceBytes()); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); for (int i = 0; i < loops; ++i) { populate_cache(gpu, CACHE_SIZE_COUNT, fKeyData32Count); @@ -122,13 +122,13 @@ // Set the cache budget to be very large so no purging occurs. fContext->setResourceCacheLimits(CACHE_SIZE_COUNT, 1 << 30); - GrResourceCache* cache = fContext->contextPriv().getResourceCache(); + GrResourceCache* cache = fContext->priv().getResourceCache(); // Make sure the cache is empty. cache->purgeAllUnlocked(); SkASSERT(0 == cache->getResourceCount() && 0 == cache->getResourceBytes()); - GrGpu* gpu = fContext->contextPriv().getGpu(); + GrGpu* gpu = fContext->priv().getGpu(); populate_cache(gpu, CACHE_SIZE_COUNT, fKeyData32Count); } @@ -137,7 +137,7 @@ if (!fContext) { return; } - GrResourceCache* cache = fContext->contextPriv().getResourceCache(); + GrResourceCache* cache = fContext->priv().getResourceCache(); SkASSERT(CACHE_SIZE_COUNT == cache->getResourceCount()); for (int i = 0; i < loops; ++i) { for (int k = 0; k < CACHE_SIZE_COUNT; ++k) {
diff --git a/bench/ImageCacheBudgetBench.cpp b/bench/ImageCacheBudgetBench.cpp index 2955945..a38a2d2 100644 --- a/bench/ImageCacheBudgetBench.cpp +++ b/bench/ImageCacheBudgetBench.cpp
@@ -47,7 +47,7 @@ GrContext* context = canvas->getGrContext(); SkASSERT(context); context->flush(); - context->contextPriv().purgeAllUnlockedResources_ForTesting(); + context->priv().purgeAllUnlockedResources_ForTesting(); sk_sp<SkImage> image; make_images(&image, 1); draw_image(canvas, image.get()); @@ -56,7 +56,7 @@ context->getResourceCacheUsage(&baselineCount, nullptr); baselineCount -= 1; // for the image's textures. context->setResourceCacheLimits(baselineCount + approxImagesInBudget, 1 << 30); - context->contextPriv().purgeAllUnlockedResources_ForTesting(); + context->priv().purgeAllUnlockedResources_ForTesting(); } //////////////////////////////////////////////////////////////////////////////
diff --git a/bench/SKPBench.cpp b/bench/SKPBench.cpp index 01ded9c..3a3bbaf 100644 --- a/bench/SKPBench.cpp +++ b/bench/SKPBench.cpp
@@ -154,13 +154,13 @@ static void draw_pic_for_stats(SkCanvas* canvas, GrContext* context, const SkPicture* picture, SkTArray<SkString>* keys, SkTArray<double>* values, const char* tag) { - context->contextPriv().resetGpuStats(); + context->priv().resetGpuStats(); canvas->drawPicture(picture); canvas->flush(); int offset = keys->count(); - context->contextPriv().dumpGpuStatsKeyValuePairs(keys, values); - context->contextPriv().dumpCacheStatsKeyValuePairs(keys, values); + context->priv().dumpGpuStatsKeyValuePairs(keys, values); + context->priv().dumpCacheStatsKeyValuePairs(keys, values); // append tag, but only to new tags for (int i = offset; i < keys->count(); i++, offset++) { @@ -179,7 +179,7 @@ context->flush(); context->freeGpuResources(); context->resetContext(); - context->contextPriv().getGpu()->resetShaderCacheForTesting(); + context->priv().getGpu()->resetShaderCacheForTesting(); draw_pic_for_stats(canvas, context, fPic.get(), keys, values, "first_frame"); // draw second frame
diff --git a/bench/VertexColorSpaceBench.cpp b/bench/VertexColorSpaceBench.cpp index 278c4e0..0d395c5 100644 --- a/bench/VertexColorSpaceBench.cpp +++ b/bench/VertexColorSpaceBench.cpp
@@ -251,11 +251,11 @@ SkASSERT(context); if (kHalf_Mode == fMode && - !context->contextPriv().caps()->halfFloatVertexAttributeSupport()) { + !context->priv().caps()->halfFloatVertexAttributeSupport()) { return; } - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); auto p3 = SkColorSpace::MakeRGB(SkNamedTransferFn::kSRGB, SkNamedGamut::kDCIP3); @@ -266,10 +266,10 @@ const int kDrawsPerLoop = 32; const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); for (int i = 0; i < loops; ++i) { sk_sp<GrRenderTargetContext> rtc( - context->contextPriv().makeDeferredRenderTargetContext( + context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, 100, 100, kRGBA_8888_GrPixelConfig, p3)); SkASSERT(rtc);
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 3123b27..b4d0035 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp
@@ -216,7 +216,7 @@ const GrGLubyte* version; if (this->contextInfo.backend() == GrBackendApi::kOpenGL) { const GrGLInterface* gl = - static_cast<GrGLGpu*>(this->contextInfo.grContext()->contextPriv().getGpu()) + static_cast<GrGLGpu*>(this->contextInfo.grContext()->priv().getGpu()) ->glInterface(); GR_GL_CALL_RET(gl, version, GetString(GR_GL_VERSION)); log.appendString("GL_VERSION", (const char*)(version)); @@ -233,8 +233,8 @@ } void dumpStats() override { - this->contextInfo.grContext()->contextPriv().printCacheStats(); - this->contextInfo.grContext()->contextPriv().printGpuStats(); + this->contextInfo.grContext()->priv().printCacheStats(); + this->contextInfo.grContext()->priv().printGpuStats(); } }; @@ -426,7 +426,7 @@ if (const GrContext* ctx = factory.get(ctxType, ctxOverrides)) { GrPixelConfig grPixConfig = SkColorType2GrPixelConfig(colorType); int supportedSampleCount = - ctx->contextPriv().caps()->getRenderTargetSampleCount(sampleCount, grPixConfig); + ctx->priv().caps()->getRenderTargetSampleCount(sampleCount, grPixConfig); if (sampleCount != supportedSampleCount) { SkDebugf("Configuration '%s' sample count %d is not a supported sample count.\n", config->getTag().c_str(), sampleCount);
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 427cbb5..17ec172 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp
@@ -1436,7 +1436,7 @@ SkImageInfo::Make(size.width(), size.height(), fColorType, fAlphaType, fColorSpace); sk_sp<SkSurface> surface; GrContext* context = factory.getContextInfo(fContextType, fContextOverrides).grContext(); - const int maxDimension = context->contextPriv().caps()->maxTextureSize(); + const int maxDimension = context->priv().caps()->maxTextureSize(); if (maxDimension < SkTMax(size.width(), size.height())) { return Error::Nonfatal("Src too large to create a texture.\n"); } @@ -1450,7 +1450,7 @@ &props); break; case SkCommandLineConfigGpu::SurfType::kBackendTexture: - backendTexture = context->contextPriv().getGpu()->createTestingOnlyBackendTexture( + backendTexture = context->priv().getGpu()->createTestingOnlyBackendTexture( nullptr, info.width(), info.height(), info.colorType(), true, GrMipMapped::kNo); surface = SkSurface::MakeFromBackendTexture(context, backendTexture, kTopLeft_GrSurfaceOrigin, fSampleCount, @@ -1459,7 +1459,7 @@ case SkCommandLineConfigGpu::SurfType::kBackendRenderTarget: if (1 == fSampleCount) { auto colorType = SkColorTypeToGrColorType(info.colorType()); - backendRT = context->contextPriv().getGpu()->createTestingOnlyBackendRenderTarget( + backendRT = context->priv().getGpu()->createTestingOnlyBackendRenderTarget( info.width(), info.height(), colorType); surface = SkSurface::MakeFromBackendRenderTarget( context, backendRT, kBottomLeft_GrSurfaceOrigin, info.colorType(), @@ -1481,8 +1481,8 @@ } canvas->flush(); if (FLAGS_gpuStats) { - canvas->getGrContext()->contextPriv().dumpCacheStats(log); - canvas->getGrContext()->contextPriv().dumpGpuStats(log); + canvas->getGrContext()->priv().dumpCacheStats(log); + canvas->getGrContext()->priv().dumpGpuStats(log); } if (info.colorType() == kRGB_565_SkColorType || info.colorType() == kARGB_4444_SkColorType || info.colorType() == kRGB_888x_SkColorType) { @@ -1501,10 +1501,10 @@ if (!context->abandoned()) { surface.reset(); if (backendTexture.isValid()) { - context->contextPriv().getGpu()->deleteTestingOnlyBackendTexture(backendTexture); + context->priv().getGpu()->deleteTestingOnlyBackendTexture(backendTexture); } if (backendRT.isValid()) { - context->contextPriv().getGpu()->deleteTestingOnlyBackendRenderTarget(backendRT); + context->priv().getGpu()->deleteTestingOnlyBackendRenderTarget(backendRT); } } if (grOptions.fPersistentCache) { @@ -1969,7 +1969,7 @@ } auto draw = [&](SkCanvas* canvas) -> Error { GrContext* context = canvas->getGrContext(); - if (!context || !context->contextPriv().getGpu()) { + if (!context || !context->priv().getGpu()) { return SkStringPrintf("DDLs are GPU only"); } @@ -2003,7 +2003,7 @@ } else { // This ought to ensure that all promise image textures from the last pass are // released. - context->contextPriv().getGpu()->testingOnly_flushGpuAndSync(); + context->priv().getGpu()->testingOnly_flushGpuAndSync(); promiseImageHelper.replaceEveryOtherPromiseTexture(context); }
diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp index 7ab662c..7fac837 100644 --- a/fuzz/FuzzCanvas.cpp +++ b/fuzz/FuzzCanvas.cpp
@@ -1665,7 +1665,7 @@ #if SK_SUPPORT_GPU static void dump_GPU_info(GrContext* context) { - const GrGLInterface* gl = static_cast<GrGLGpu*>(context->contextPriv().getGpu()) + const GrGLInterface* gl = static_cast<GrGLGpu*>(context->priv().getGpu()) ->glInterface(); const GrGLubyte* output; GR_GL_CALL_RET(gl, output, GetString(GR_GL_RENDERER));
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp index c3e4c71..eaa9a7d 100644 --- a/gm/beziereffects.cpp +++ b/gm/beziereffects.cpp
@@ -81,7 +81,7 @@ const SkRect& rect, const SkPMColor4f& color, const SkMatrix& klm) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<BezierConicTestOp>(std::move(gp), rect, color, klm); } @@ -184,7 +184,7 @@ for(int edgeType = 0; edgeType < kGrClipEdgeTypeCnt; ++edgeType) { sk_sp<GrGeometryProcessor> gp; GrClipEdgeType et = (GrClipEdgeType)edgeType; - gp = GrConicEffect::Make(color, SkMatrix::I(), et, *context->contextPriv().caps(), + gp = GrConicEffect::Make(color, SkMatrix::I(), et, *context->priv().caps(), SkMatrix::I(), false); if (!gp) { continue; @@ -303,7 +303,7 @@ const SkRect& rect, const SkPMColor4f& color, const GrPathUtils::QuadUVMatrix& devToUV) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<BezierQuadTestOp>(std::move(gp), rect, color, devToUV); } @@ -399,7 +399,7 @@ for(int edgeType = 0; edgeType < kGrClipEdgeTypeCnt; ++edgeType) { sk_sp<GrGeometryProcessor> gp; GrClipEdgeType et = (GrClipEdgeType)edgeType; - gp = GrQuadEffect::Make(color, SkMatrix::I(), et, *context->contextPriv().caps(), + gp = GrQuadEffect::Make(color, SkMatrix::I(), et, *context->priv().caps(), SkMatrix::I(), false); if (!gp) { continue;
diff --git a/gm/bitmapshader.cpp b/gm/bitmapshader.cpp index 91bd5a7..c6dba20 100644 --- a/gm/bitmapshader.cpp +++ b/gm/bitmapshader.cpp
@@ -119,7 +119,7 @@ int bitmapW = 1; int bitmapH = 60000; if (auto* ctx = canvas->getGrContext()) { - bitmapH = ctx->contextPriv().caps()->maxTextureSize() + 1; + bitmapH = ctx->priv().caps()->maxTextureSize() + 1; } bitmap.setInfo(SkImageInfo::MakeA8(bitmapW, bitmapH), bitmapW); uint8_t* pixels = new uint8_t[bitmapH];
diff --git a/gm/clockwise.cpp b/gm/clockwise.cpp index 7086f98..637b570 100644 --- a/gm/clockwise.cpp +++ b/gm/clockwise.cpp
@@ -92,7 +92,7 @@ DEFINE_OP_CLASS_ID static std::unique_ptr<GrDrawOp> Make(GrContext* context, bool readSkFragCoord, int y = 0) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<ClockwiseTestOp>(readSkFragCoord, y); } @@ -153,7 +153,7 @@ rtc->priv().testingOnly_addDrawOp(ClockwiseTestOp::Make(ctx, true, 100)); // Draw the test to an off-screen, top-down render target. - if (auto topLeftRTC = ctx->contextPriv().makeDeferredRenderTargetContext( + if (auto topLeftRTC = ctx->priv().makeDeferredRenderTargetContext( rtc->asSurfaceProxy()->backendFormat(), SkBackingFit::kExact, 100, 200, rtc->asSurfaceProxy()->config(), nullptr, 1, GrMipMapped::kNo, kTopLeft_GrSurfaceOrigin, nullptr, SkBudgeted::kYes)) { @@ -169,7 +169,7 @@ } // Draw the test to an off-screen, bottom-up render target. - if (auto topLeftRTC = ctx->contextPriv().makeDeferredRenderTargetContext( + if (auto topLeftRTC = ctx->priv().makeDeferredRenderTargetContext( rtc->asSurfaceProxy()->backendFormat(), SkBackingFit::kExact, 100, 200, rtc->asSurfaceProxy()->config(), nullptr, 1, GrMipMapped::kNo, kBottomLeft_GrSurfaceOrigin, nullptr, SkBudgeted::kYes)) {
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp index 62d95d3..3888891 100644 --- a/gm/convexpolyeffect.cpp +++ b/gm/convexpolyeffect.cpp
@@ -44,7 +44,7 @@ static std::unique_ptr<GrDrawOp> Make(GrContext* context, GrPaint&& paint, const SkRect& rect) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<PolyBoundsOp>(std::move(paint), rect); }
diff --git a/gm/fontcache.cpp b/gm/fontcache.cpp index 052de62..39d3b80 100644 --- a/gm/fontcache.cpp +++ b/gm/fontcache.cpp
@@ -73,7 +73,7 @@ static const bool kShowAtlas = false; if (kShowAtlas) { if (auto ctx = canvas->getGrContext()) { - auto img = ctx->contextPriv().getFontAtlasImage_ForTesting(kA8_GrMaskFormat); + auto img = ctx->priv().getFontAtlasImage_ForTesting(kA8_GrMaskFormat); canvas->drawImage(img, 0, 0); } }
diff --git a/gm/fontregen.cpp b/gm/fontregen.cpp index 3d7dbee..fbb555d 100644 --- a/gm/fontregen.cpp +++ b/gm/fontregen.cpp
@@ -98,7 +98,7 @@ static const bool kShowAtlas = false; if (kShowAtlas) { if (auto ctx = canvas->getGrContext()) { - auto img = ctx->contextPriv().getFontAtlasImage_ForTesting(kA8_GrMaskFormat); + auto img = ctx->priv().getFontAtlasImage_ForTesting(kA8_GrMaskFormat); canvas->drawImage(img, 200, 0); } }
diff --git a/gm/fwidth_squircle.cpp b/gm/fwidth_squircle.cpp index eb5438d..c812382 100644 --- a/gm/fwidth_squircle.cpp +++ b/gm/fwidth_squircle.cpp
@@ -116,7 +116,7 @@ DEFINE_OP_CLASS_ID static std::unique_ptr<GrDrawOp> Make(GrContext* ctx, const SkMatrix& viewMatrix) { - GrOpMemoryPool* pool = ctx->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = ctx->priv().opMemoryPool(); return pool->allocate<FwidthSquircleTestOp>(viewMatrix); } @@ -173,7 +173,7 @@ return; } - if (!ctx->contextPriv().caps()->shaderCaps()->shaderDerivativeSupport()) { + if (!ctx->priv().caps()->shaderCaps()->shaderDerivativeSupport()) { SkFont font(sk_tool_utils::create_portable_typeface(), 15); DrawFailureMessage(canvas, "Shader derivatives not supported."); return;
diff --git a/gm/image_pict.cpp b/gm/image_pict.cpp index 4ff341e..2c842b7 100644 --- a/gm/image_pict.cpp +++ b/gm/image_pict.cpp
@@ -183,7 +183,7 @@ GrMipMapped mipMapped = willBeMipped ? GrMipMapped::kYes : GrMipMapped::kNo; - sk_sp<GrSurfaceContext> dstContext(fCtx->contextPriv().makeDeferredSurfaceContext( + sk_sp<GrSurfaceContext> dstContext(fCtx->priv().makeDeferredSurfaceContext( fProxy->backendFormat(), desc, fProxy->origin(), mipMapped, SkBackingFit::kExact, SkBudgeted::kYes)); if (!dstContext) {
diff --git a/gm/imagefromyuvtextures.cpp b/gm/imagefromyuvtextures.cpp index a86aad4..7ba86c0 100644 --- a/gm/imagefromyuvtextures.cpp +++ b/gm/imagefromyuvtextures.cpp
@@ -98,7 +98,7 @@ return; } - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); if (!gpu) { return; } @@ -120,7 +120,7 @@ return; } - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); if (!gpu) { return; } @@ -136,7 +136,7 @@ return; } - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); if (!gpu) { return; }
diff --git a/gm/rectangletexture.cpp b/gm/rectangletexture.cpp index c82b61d..fbc685a 100644 --- a/gm/rectangletexture.cpp +++ b/gm/rectangletexture.cpp
@@ -60,7 +60,7 @@ if (context->abandoned()) { return nullptr; } - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); if (!gpu) { return nullptr; }
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp index 05d0611..8eeefc2 100644 --- a/gm/texturedomaineffect.cpp +++ b/gm/texturedomaineffect.cpp
@@ -95,7 +95,7 @@ return; } - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); sk_sp<GrTextureProxy> proxy; if (fFilter == GrSamplerState::Filter::kMipMap) { SkBitmap copy;
diff --git a/gm/wacky_yuv_formats.cpp b/gm/wacky_yuv_formats.cpp index 9ff18d7..a974ab9 100644 --- a/gm/wacky_yuv_formats.cpp +++ b/gm/wacky_yuv_formats.cpp
@@ -786,7 +786,7 @@ return; } - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); if (!gpu) { return; } @@ -878,7 +878,7 @@ if (auto context = canvas->getGrContext()) { if (!context->abandoned()) { context->flush(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); SkASSERT(gpu); gpu->testingOnly_flushGpuAndSync(); for (const auto& tex : fBackendTextures) {
diff --git a/gm/windowrectangles.cpp b/gm/windowrectangles.cpp index 9362e68..89e08dd 100644 --- a/gm/windowrectangles.cpp +++ b/gm/windowrectangles.cpp
@@ -196,9 +196,9 @@ const int padRight = (kDeviceRect.right() - kCoverRect.right()) / 2; const int padBottom = (kDeviceRect.bottom() - kCoverRect.bottom()) / 2; const GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); + ctx->priv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); sk_sp<GrRenderTargetContext> maskRTC( - ctx->contextPriv().makeDeferredRenderTargetContextWithFallback( + ctx->priv().makeDeferredRenderTargetContextWithFallback( format, SkBackingFit::kExact, kCoverRect.width() + padRight, kCoverRect.height() + padBottom,
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp index 6a16aca..f2993389 100644 --- a/gm/yuvtorgbeffect.cpp +++ b/gm/yuvtorgbeffect.cpp
@@ -85,7 +85,7 @@ return; } - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); sk_sp<GrTextureProxy> proxies[3]; for (int i = 0; i < 3; ++i) { @@ -213,7 +213,7 @@ return; } - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); sk_sp<GrTextureProxy> proxies[2]; for (int i = 0; i < 2; ++i) {
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index 82317cf..8a18a53 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h
@@ -268,8 +268,8 @@ GrBackendSemaphore signalSemaphores[]); // Provides access to functions that aren't part of the public API. - GrContextPriv contextPriv(); - const GrContextPriv contextPriv() const; + GrContextPriv priv(); + const GrContextPriv priv() const; /** Enumerates all cached GPU resources and dumps their memory to traceMemoryDump. */ // Chrome is using this!
diff --git a/samplecode/SampleAnimatedText.cpp b/samplecode/SampleAnimatedText.cpp index ba46a87..143703c 100644 --- a/samplecode/SampleAnimatedText.cpp +++ b/samplecode/SampleAnimatedText.cpp
@@ -102,7 +102,7 @@ #if SK_SUPPORT_GPU GrContext* grContext = canvas->getGrContext(); if (grContext) { - sk_sp<SkImage> image = grContext->contextPriv().getFontAtlasImage_ForTesting( + sk_sp<SkImage> image = grContext->priv().getFontAtlasImage_ForTesting( GrMaskFormat::kA8_GrMaskFormat); canvas->drawImageRect(image, SkRect::MakeXYWH(512.0f, 10.0f, 512.0f, 512.0f), &paint);
diff --git a/samplecode/SampleCCPRGeometry.cpp b/samplecode/SampleCCPRGeometry.cpp index 06bd0ac..ae582c0 100644 --- a/samplecode/SampleCCPRGeometry.cpp +++ b/samplecode/SampleCCPRGeometry.cpp
@@ -180,13 +180,13 @@ GrContext* ctx = canvas->getGrContext(); SkASSERT(ctx); - GrOpMemoryPool* pool = ctx->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = ctx->priv().opMemoryPool(); const GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromGrColorType(GrColorType::kAlpha_F16, + ctx->priv().caps()->getBackendFormatFromGrColorType(GrColorType::kAlpha_F16, GrSRGBEncoded::kNo); sk_sp<GrRenderTargetContext> ccbuff = - ctx->contextPriv().makeDeferredRenderTargetContext(format, SkBackingFit::kApprox, + ctx->priv().makeDeferredRenderTargetContext(format, SkBackingFit::kApprox, this->width(), this->height(), kAlpha_half_GrPixelConfig, nullptr); @@ -378,7 +378,7 @@ SkIRect::MakeWH(fView->width(), fView->height()), {0, 0}); GrCCStroker::BatchID batchID = stroker.closeCurrentBatch(); - GrOnFlushResourceProvider onFlushRP(context->contextPriv().drawingManager()); + GrOnFlushResourceProvider onFlushRP(context->priv().drawingManager()); stroker.prepareToDraw(&onFlushRP); SkIRect ibounds;
diff --git a/samplecode/SampleChineseFling.cpp b/samplecode/SampleChineseFling.cpp index 9f33211..84181aa 100644 --- a/samplecode/SampleChineseFling.cpp +++ b/samplecode/SampleChineseFling.cpp
@@ -160,19 +160,19 @@ GrContext* grContext = canvas->getGrContext(); if (grContext) { sk_sp<SkImage> image = - grContext->contextPriv().getFontAtlasImage_ForTesting( + grContext->priv().getFontAtlasImage_ForTesting( GrMaskFormat::kA8_GrMaskFormat, 0); canvas->drawImageRect(image, SkRect::MakeXYWH(10.0f, 10.0f, 512.0f, 512.0), &paint); - image = grContext->contextPriv().getFontAtlasImage_ForTesting( + image = grContext->priv().getFontAtlasImage_ForTesting( GrMaskFormat::kA8_GrMaskFormat, 1); canvas->drawImageRect(image, SkRect::MakeXYWH(522.0f, 10.0f, 512.f, 512.0f), &paint); - image = grContext->contextPriv().getFontAtlasImage_ForTesting( + image = grContext->priv().getFontAtlasImage_ForTesting( GrMaskFormat::kA8_GrMaskFormat, 2); canvas->drawImageRect(image, SkRect::MakeXYWH(10.0f, 522.0f, 512.0f, 512.0f), &paint); - image = grContext->contextPriv().getFontAtlasImage_ForTesting( + image = grContext->priv().getFontAtlasImage_ForTesting( GrMaskFormat::kA8_GrMaskFormat, 3); canvas->drawImageRect(image, SkRect::MakeXYWH(522.0f, 522.0f, 512.0f, 512.0f), &paint);
diff --git a/src/atlastext/SkAtlasTextTarget.cpp b/src/atlastext/SkAtlasTextTarget.cpp index 29ea081..68dc6fa 100644 --- a/src/atlastext/SkAtlasTextTarget.cpp +++ b/src/atlastext/SkAtlasTextTarget.cpp
@@ -87,7 +87,7 @@ : GrTextTarget(width, height, kColorSpaceInfo) , SkAtlasTextTarget(std::move(context), width, height, handle) , fGlyphPainter(kProps, kColorSpaceInfo) { - fOpMemoryPool = fContext->internal().grContext()->contextPriv().refOpMemoryPool(); + fOpMemoryPool = fContext->internal().grContext()->priv().refOpMemoryPool(); } ~SkInternalAtlasTextTarget() override { @@ -155,7 +155,7 @@ SkSurfaceProps props(SkSurfaceProps::kUseDistanceFieldFonts_Flag, kUnknown_SkPixelGeometry); auto* grContext = this->context()->internal().grContext(); - auto atlasTextContext = grContext->contextPriv().drawingManager()->getTextContext(); + auto atlasTextContext = grContext->priv().drawingManager()->getTextContext(); SkGlyphRunBuilder builder; builder.drawGlyphsWithPositions(paint, font.makeFont(), SkSpan<const SkGlyphID>{glyphs, SkTo<size_t>(glyphCnt)}, @@ -173,7 +173,7 @@ if (op->maskType() != GrAtlasTextOp::kGrayscaleDistanceField_MaskType) { return; } - const GrCaps& caps = *this->context()->internal().grContext()->contextPriv().caps(); + const GrCaps& caps = *this->context()->internal().grContext()->priv().caps(); op->finalizeForTextTarget(fColor, caps); int n = SkTMin(kMaxBatchLookBack, fOps.count()); for (int i = 0; i < n; ++i) { @@ -219,9 +219,9 @@ FlushInfo flushInfo; SkExclusiveStrikePtr autoGlyphCache; auto& context = target->context()->internal(); - auto glyphCache = context.grContext()->contextPriv().getGlyphCache(); - auto atlasManager = context.grContext()->contextPriv().getAtlasManager(); - auto resourceProvider = context.grContext()->contextPriv().resourceProvider(); + auto glyphCache = context.grContext()->priv().getGlyphCache(); + auto atlasManager = context.grContext()->priv().getAtlasManager(); + auto resourceProvider = context.grContext()->priv().resourceProvider(); unsigned int numProxies; if (!atlasManager->getProxies(kA8_GrMaskFormat, &numProxies)) {
diff --git a/src/atlastext/SkInternalAtlasTextContext.cpp b/src/atlastext/SkInternalAtlasTextContext.cpp index ec93dd7..ba2924e 100644 --- a/src/atlastext/SkInternalAtlasTextContext.cpp +++ b/src/atlastext/SkInternalAtlasTextContext.cpp
@@ -38,7 +38,7 @@ SkInternalAtlasTextContext::~SkInternalAtlasTextContext() { if (fDistanceFieldAtlas.fProxy) { #ifdef SK_DEBUG - auto atlasManager = fGrContext->contextPriv().getAtlasManager(); + auto atlasManager = fGrContext->priv().getAtlasManager(); if (atlasManager) { unsigned int numProxies; atlasManager->getProxies(kA8_GrMaskFormat, &numProxies); @@ -50,11 +50,11 @@ } GrStrikeCache* SkInternalAtlasTextContext::glyphCache() { - return fGrContext->contextPriv().getGlyphCache(); + return fGrContext->priv().getGlyphCache(); } GrTextBlobCache* SkInternalAtlasTextContext::textBlobCache() { - return fGrContext->contextPriv().getTextBlobCache(); + return fGrContext->priv().getTextBlobCache(); } GrDeferredUploadToken SkInternalAtlasTextContext::addInlineUpload( @@ -88,7 +88,7 @@ } void SkInternalAtlasTextContext::flush() { - auto* atlasManager = fGrContext->contextPriv().getAtlasManager(); + auto* atlasManager = fGrContext->priv().getAtlasManager(); if (!fDistanceFieldAtlas.fProxy) { unsigned int numProxies; fDistanceFieldAtlas.fProxy = atlasManager->getProxies(kA8_GrMaskFormat, &numProxies)->get();
diff --git a/src/core/SkBlurMF.cpp b/src/core/SkBlurMF.cpp index 9ea0289..b3a1a6a 100644 --- a/src/core/SkBlurMF.cpp +++ b/src/core/SkBlurMF.cpp
@@ -757,7 +757,7 @@ return false; } - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); std::unique_ptr<GrFragmentProcessor> fp; if (devRRect.isRect() || SkRRectPriv::IsCircle(devRRect)) { @@ -765,7 +765,7 @@ SkScalar pad = 3.0f * xformedSigma; const SkRect dstCoverageRect = devRRect.rect().makeOutset(pad, pad); - fp = GrRectBlurEffect::Make(proxyProvider, *context->contextPriv().caps()->shaderCaps(), + fp = GrRectBlurEffect::Make(proxyProvider, *context->priv().caps()->shaderCaps(), dstCoverageRect, xformedSigma); } else { fp = GrCircleBlurFragmentProcessor::Make(proxyProvider, devRRect.rect(), xformedSigma);
diff --git a/src/core/SkDeferredDisplayListRecorder.cpp b/src/core/SkDeferredDisplayListRecorder.cpp index 3beaa54..1d7c970 100644 --- a/src/core/SkDeferredDisplayListRecorder.cpp +++ b/src/core/SkDeferredDisplayListRecorder.cpp
@@ -79,7 +79,7 @@ SkDeferredDisplayListRecorder::~SkDeferredDisplayListRecorder() { if (fContext) { - auto proxyProvider = fContext->contextPriv().proxyProvider(); + auto proxyProvider = fContext->priv().proxyProvider(); // This allows the uniquely keyed proxies to keep their keys but removes their back // pointer to the about-to-be-deleted proxy provider. The proxies will use their @@ -107,7 +107,7 @@ fLazyProxyData = sk_sp<SkDeferredDisplayList::LazyProxyData>( new SkDeferredDisplayList::LazyProxyData); - auto proxyProvider = fContext->contextPriv().proxyProvider(); + auto proxyProvider = fContext->priv().proxyProvider(); bool usesGLFBO0 = fCharacterization.usesGLFBO0(); if (usesGLFBO0) { @@ -131,7 +131,7 @@ // DDL is being replayed into. GrInternalSurfaceFlags surfaceFlags = GrInternalSurfaceFlags::kNone; - if (fContext->contextPriv().caps()->usesMixedSamples() && desc.fSampleCnt > 1 && !usesGLFBO0) { + if (fContext->priv().caps()->usesMixedSamples() && desc.fSampleCnt > 1 && !usesGLFBO0) { // In GL, FBO 0 never supports mixed samples surfaceFlags |= GrInternalSurfaceFlags::kMixedSampled; } @@ -145,7 +145,7 @@ optionalTextureInfo = &kTextureInfo; } - const GrBackendFormat format = fContext->contextPriv().caps()->getBackendFormatFromColorType( + const GrBackendFormat format = fContext->priv().caps()->getBackendFormatFromColorType( fCharacterization.colorType()); sk_sp<GrRenderTargetProxy> proxy = proxyProvider->createLazyRenderTargetProxy( @@ -167,7 +167,7 @@ SkBackingFit::kExact, SkBudgeted::kYes); - sk_sp<GrSurfaceContext> c = fContext->contextPriv().makeWrappedSurfaceContext( + sk_sp<GrSurfaceContext> c = fContext->priv().makeWrappedSurfaceContext( std::move(proxy), fCharacterization.refColorSpace(), &fCharacterization.surfaceProps()); @@ -202,7 +202,7 @@ auto ddl = std::unique_ptr<SkDeferredDisplayList>( new SkDeferredDisplayList(fCharacterization, std::move(fLazyProxyData))); - fContext->contextPriv().moveOpListsToDDL(ddl.get()); + fContext->priv().moveOpListsToDDL(ddl.get()); // We want a new lazy proxy target for each recorded DDL so force the (lazy proxy-backed) // SkSurface to be regenerated for each DDL.
diff --git a/src/core/SkGlyphRunPainter.cpp b/src/core/SkGlyphRunPainter.cpp index 4add012..a0af48c 100644 --- a/src/core/SkGlyphRunPainter.cpp +++ b/src/core/SkGlyphRunPainter.cpp
@@ -528,8 +528,8 @@ (mf && !as_MFB(mf)->asABlur(&blurRec))); SkScalerContextFlags scalerContextFlags = ComputeScalerContextFlags(target->colorSpaceInfo()); - auto glyphCache = context->contextPriv().getGlyphCache(); - GrTextBlobCache* textBlobCache = context->contextPriv().getTextBlobCache(); + auto glyphCache = context->priv().getGlyphCache(); + GrTextBlobCache* textBlobCache = context->priv().getTextBlobCache(); sk_sp<GrTextBlob> cacheBlob; GrTextBlob::Key key; @@ -564,7 +564,7 @@ textBlobCache->remove(cacheBlob.get()); cacheBlob = textBlobCache->makeCachedBlob(glyphRunList, key, blurRec, listPaint, color); cacheBlob->generateFromGlyphRunList( - glyphCache, *context->contextPriv().caps()->shaderCaps(), fOptions, + glyphCache, *context->priv().caps()->shaderCaps(), fOptions, listPaint, scalerContextFlags, viewMatrix, props, glyphRunList, target->glyphPainter()); } else { @@ -574,7 +574,7 @@ sk_sp<GrTextBlob> sanityBlob(textBlobCache->makeBlob(glyphRunList, color)); sanityBlob->setupKey(key, blurRec, listPaint); cacheBlob->generateFromGlyphRunList( - glyphCache, *context->contextPriv().caps()->shaderCaps(), fOptions, + glyphCache, *context->priv().caps()->shaderCaps(), fOptions, listPaint, scalerContextFlags, viewMatrix, props, glyphRunList, target->glyphPainter()); GrTextBlob::AssertEqual(*sanityBlob, *cacheBlob); @@ -587,7 +587,7 @@ cacheBlob = textBlobCache->makeBlob(glyphRunList, color); } cacheBlob->generateFromGlyphRunList( - glyphCache, *context->contextPriv().caps()->shaderCaps(), fOptions, listPaint, + glyphCache, *context->priv().caps()->shaderCaps(), fOptions, listPaint, scalerContextFlags, viewMatrix, props, glyphRunList, target->glyphPainter()); } @@ -882,7 +882,7 @@ const char* text, int x, int y) { - auto glyphCache = context->contextPriv().getGlyphCache(); + auto glyphCache = context->priv().getGlyphCache(); static SkSurfaceProps surfaceProps(SkSurfaceProps::kLegacyFontHost_InitType); @@ -898,12 +898,12 @@ auto glyphRunList = builder.useGlyphRunList(); sk_sp<GrTextBlob> blob; if (!glyphRunList.empty()) { - blob = context->contextPriv().getTextBlobCache()->makeBlob(glyphRunList, color); + blob = context->priv().getTextBlobCache()->makeBlob(glyphRunList, color); // Use the text and textLen below, because we don't want to mess with the paint. SkScalerContextFlags scalerContextFlags = ComputeScalerContextFlags(rtc->colorSpaceInfo()); blob->generateFromGlyphRunList( - glyphCache, *context->contextPriv().caps()->shaderCaps(), textContext->fOptions, + glyphCache, *context->priv().caps()->shaderCaps(), textContext->fOptions, skPaint, scalerContextFlags, viewMatrix, surfaceProps, glyphRunList, rtc->textTarget()->glyphPainter()); }
diff --git a/src/core/SkGpuBlurUtils.cpp b/src/core/SkGpuBlurUtils.cpp index 54f1bc7..7c79d72 100644 --- a/src/core/SkGpuBlurUtils.cpp +++ b/src/core/SkGpuBlurUtils.cpp
@@ -123,7 +123,7 @@ } sk_sp<GrRenderTargetContext> renderTargetContext; - renderTargetContext = context->contextPriv().makeDeferredRenderTargetContext( + renderTargetContext = context->priv().makeDeferredRenderTargetContext( format, dstFit, dstII.width(), dstII.height(), config, dstII.refColorSpace(), @@ -171,7 +171,7 @@ } sk_sp<GrRenderTargetContext> dstRenderTargetContext; - dstRenderTargetContext = context->contextPriv().makeDeferredRenderTargetContext( + dstRenderTargetContext = context->priv().makeDeferredRenderTargetContext( format, fit, srcRect.width(), srcRect.height(), @@ -297,7 +297,7 @@ shrink_irect_by_2(&dstRect, i < scaleFactorX, i < scaleFactorY); // We know this will not be the final draw so we are free to make it an approx match. - dstRenderTargetContext = context->contextPriv().makeDeferredRenderTargetContext( + dstRenderTargetContext = context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, dstRect.fRight, @@ -406,7 +406,7 @@ } sk_sp<GrRenderTargetContext> dstRenderTargetContext = - context->contextPriv().makeDeferredRenderTargetContext(format, + context->priv().makeDeferredRenderTargetContext(format, fit, dstII.width(), dstII.height(), config, dstII.refColorSpace(), 1, GrMipMapped::kNo, @@ -472,7 +472,7 @@ int scaleFactorX, radiusX; int scaleFactorY, radiusY; - int maxTextureSize = context->contextPriv().caps()->maxTextureSize(); + int maxTextureSize = context->priv().caps()->maxTextureSize(); sigmaX = adjust_sigma(sigmaX, maxTextureSize, &scaleFactorX, &radiusX); sigmaY = adjust_sigma(sigmaY, maxTextureSize, &scaleFactorY, &radiusY); SkASSERT(sigmaX || sigmaY);
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp index 4de7124..d6418f9 100644 --- a/src/core/SkImageFilter.cpp +++ b/src/core/SkImageFilter.cpp
@@ -249,10 +249,10 @@ sk_sp<SkColorSpace> colorSpace = sk_ref_sp(outputProperties.colorSpace()); GrPixelConfig config = SkColorType2GrPixelConfig(outputProperties.colorType()); GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType( + context->priv().caps()->getBackendFormatFromColorType( outputProperties.colorType()); sk_sp<GrRenderTargetContext> renderTargetContext( - context->contextPriv().makeDeferredRenderTargetContext( + context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, bounds.width(), bounds.height(), config, std::move(colorSpace))); if (!renderTargetContext) {
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp index a2032c6..e7a4143 100644 --- a/src/core/SkSpecialImage.cpp +++ b/src/core/SkSpecialImage.cpp
@@ -88,7 +88,7 @@ return curContext == context ? sk_sp<SkSpecialImage>(SkRef(this)) : nullptr; } - auto proxyProvider = context->contextPriv().proxyProvider(); + auto proxyProvider = context->priv().proxyProvider(); SkBitmap bmp; // At this point, we are definitely not texture-backed, so we must be raster or generator // backed. If we remove the special-wrapping-an-image subclass, we may be able to assert that @@ -192,7 +192,7 @@ #if SK_SUPPORT_GPU if (sk_sp<GrTextureProxy> proxy = as_IB(image)->asTextureProxyRef()) { - if (as_IB(image)->contextID() != context->contextPriv().contextID()) { + if (as_IB(image)->contextID() != context->priv().contextID()) { return nullptr; } @@ -245,7 +245,7 @@ #if SK_SUPPORT_GPU sk_sp<GrTextureProxy> onAsTextureProxyRef(GrContext* context) const override { if (context) { - return GrMakeCachedBitmapProxy(context->contextPriv().proxyProvider(), fBitmap); + return GrMakeCachedBitmapProxy(context->priv().proxyProvider(), fBitmap); } return nullptr; @@ -431,7 +431,7 @@ if (!rec) { return false; } - sk_sp<GrSurfaceContext> sContext = fContext->contextPriv().makeWrappedSurfaceContext( + sk_sp<GrSurfaceContext> sContext = fContext->priv().makeWrappedSurfaceContext( fTextureProxy, fColorSpace); if (!sContext) { return false; @@ -459,7 +459,7 @@ } GrBackendFormat format = - fContext->contextPriv().caps()->getBackendFormatFromColorType(outProps.colorType()); + fContext->priv().caps()->getBackendFormatFromColorType(outProps.colorType()); return SkSpecialSurface::MakeRenderTarget( fContext, format, size.width(), size.height(),
diff --git a/src/core/SkSpecialSurface.cpp b/src/core/SkSpecialSurface.cpp index a1d76f1..7f6a04a 100644 --- a/src/core/SkSpecialSurface.cpp +++ b/src/core/SkSpecialSurface.cpp
@@ -175,7 +175,7 @@ } sk_sp<GrRenderTargetContext> renderTargetContext( - context->contextPriv().makeDeferredRenderTargetContext( + context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, width, height, config, std::move(colorSpace), 1, GrMipMapped::kNo, kBottomLeft_GrSurfaceOrigin, props)); if (!renderTargetContext) {
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp index 2aa71f9..c8ebb1e 100644 --- a/src/effects/SkTableColorFilter.cpp +++ b/src/effects/SkTableColorFilter.cpp
@@ -398,7 +398,7 @@ return nullptr; } - sk_sp<GrTextureProxy> proxy = GrMakeCachedImageProxy(context->contextPriv().proxyProvider(), + sk_sp<GrTextureProxy> proxy = GrMakeCachedImageProxy(context->priv().proxyProvider(), std::move(srcImage)); if (!proxy) { return nullptr;
diff --git a/src/effects/imagefilters/SkAlphaThresholdFilter.cpp b/src/effects/imagefilters/SkAlphaThresholdFilter.cpp index 7056e4d..39b92f5 100644 --- a/src/effects/imagefilters/SkAlphaThresholdFilter.cpp +++ b/src/effects/imagefilters/SkAlphaThresholdFilter.cpp
@@ -106,9 +106,9 @@ const SkMatrix& inMatrix, const SkIRect& bounds) const { GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); sk_sp<GrRenderTargetContext> rtContext( - context->contextPriv().makeDeferredRenderTargetContextWithFallback( + context->priv().makeDeferredRenderTargetContextWithFallback( format, SkBackingFit::kApprox, bounds.width(), bounds.height(), kAlpha_8_GrPixelConfig, nullptr)); if (!rtContext) {
diff --git a/src/effects/imagefilters/SkArithmeticImageFilter.cpp b/src/effects/imagefilters/SkArithmeticImageFilter.cpp index 8e8dabf..f5603e4 100644 --- a/src/effects/imagefilters/SkArithmeticImageFilter.cpp +++ b/src/effects/imagefilters/SkArithmeticImageFilter.cpp
@@ -362,10 +362,10 @@ SkColorType colorType = outputProperties.colorType(); GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(colorType); + context->priv().caps()->getBackendFormatFromColorType(colorType); sk_sp<GrRenderTargetContext> renderTargetContext( - context->contextPriv().makeDeferredRenderTargetContext( + context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, bounds.width(), bounds.height(), SkColorType2GrPixelConfig(colorType), sk_ref_sp(outputProperties.colorSpace())));
diff --git a/src/effects/imagefilters/SkDisplacementMapEffect.cpp b/src/effects/imagefilters/SkDisplacementMapEffect.cpp index a29c38c..3c48d75 100644 --- a/src/effects/imagefilters/SkDisplacementMapEffect.cpp +++ b/src/effects/imagefilters/SkDisplacementMapEffect.cpp
@@ -301,10 +301,10 @@ SkColorType colorType = ctx.outputProperties().colorType(); GrPixelConfig config = SkColorType2GrPixelConfig(colorType); GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(colorType); + context->priv().caps()->getBackendFormatFromColorType(colorType); sk_sp<GrRenderTargetContext> renderTargetContext( - context->contextPriv().makeDeferredRenderTargetContext( + context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, bounds.width(), bounds.height(), config, sk_ref_sp(colorSpace))); if (!renderTargetContext) {
diff --git a/src/effects/imagefilters/SkLightingImageFilter.cpp b/src/effects/imagefilters/SkLightingImageFilter.cpp index 8e2357e..2b640d5 100644 --- a/src/effects/imagefilters/SkLightingImageFilter.cpp +++ b/src/effects/imagefilters/SkLightingImageFilter.cpp
@@ -466,10 +466,10 @@ SkColorType colorType = outputProperties.colorType(); GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(colorType); + context->priv().caps()->getBackendFormatFromColorType(colorType); sk_sp<GrRenderTargetContext> renderTargetContext( - context->contextPriv().makeDeferredRenderTargetContext( + context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, offsetBounds.width(), offsetBounds.height(), SkColorType2GrPixelConfig(colorType), sk_ref_sp(outputProperties.colorSpace())));
diff --git a/src/effects/imagefilters/SkMorphologyImageFilter.cpp b/src/effects/imagefilters/SkMorphologyImageFilter.cpp index 6ddc80d..46795fc 100644 --- a/src/effects/imagefilters/SkMorphologyImageFilter.cpp +++ b/src/effects/imagefilters/SkMorphologyImageFilter.cpp
@@ -472,7 +472,7 @@ sk_sp<SkColorSpace> colorSpace = sk_ref_sp(outputProperties.colorSpace()); SkColorType colorType = outputProperties.colorType(); GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(colorType); + context->priv().caps()->getBackendFormatFromColorType(colorType); GrPixelConfig config = SkColorType2GrPixelConfig(colorType); // setup new clip @@ -485,7 +485,7 @@ if (radius.fWidth > 0) { sk_sp<GrRenderTargetContext> dstRTContext( - context->contextPriv().makeDeferredRenderTargetContext( + context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, rect.width(), rect.height(), config, colorSpace)); if (!dstRTContext) { return nullptr; @@ -504,7 +504,7 @@ } if (radius.fHeight > 0) { sk_sp<GrRenderTargetContext> dstRTContext( - context->contextPriv().makeDeferredRenderTargetContext( + context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, rect.width(), rect.height(), config, colorSpace)); if (!dstRTContext) { return nullptr;
diff --git a/src/effects/imagefilters/SkXfermodeImageFilter.cpp b/src/effects/imagefilters/SkXfermodeImageFilter.cpp index 62147e3..a9d4ed8 100644 --- a/src/effects/imagefilters/SkXfermodeImageFilter.cpp +++ b/src/effects/imagefilters/SkXfermodeImageFilter.cpp
@@ -321,10 +321,10 @@ SkColorType colorType = outputProperties.colorType(); GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(colorType); + context->priv().caps()->getBackendFormatFromColorType(colorType); sk_sp<GrRenderTargetContext> renderTargetContext( - context->contextPriv().makeDeferredRenderTargetContext( + context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, bounds.width(), bounds.height(), SkColorType2GrPixelConfig(colorType), sk_ref_sp(outputProperties.colorSpace())));
diff --git a/src/gpu/GrAHardwareBufferImageGenerator.cpp b/src/gpu/GrAHardwareBufferImageGenerator.cpp index c90e090..3c52c40 100644 --- a/src/gpu/GrAHardwareBufferImageGenerator.cpp +++ b/src/gpu/GrAHardwareBufferImageGenerator.cpp
@@ -159,7 +159,7 @@ bool isProtectedContent, const GrBackendFormat& backendFormat) { SkASSERT(context->backend() == GrBackendApi::kVulkan); - GrVkGpu* gpu = static_cast<GrVkGpu*>(context->contextPriv().getGpu()); + GrVkGpu* gpu = static_cast<GrVkGpu*>(context->priv().getGpu()); VkPhysicalDevice physicalDevice = gpu->physicalDevice(); VkDevice device = gpu->device(); @@ -485,7 +485,7 @@ case AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM: return GrBackendFormat::MakeVk(VK_FORMAT_R8G8B8_UNORM); default: { - GrVkGpu* gpu = static_cast<GrVkGpu*>(context->contextPriv().getGpu()); + GrVkGpu* gpu = static_cast<GrVkGpu*>(context->priv().getGpu()); SkASSERT(gpu); VkDevice device = gpu->device(); @@ -544,7 +544,7 @@ GrBackendFormat backendFormat = get_backend_format(context, fHardwareBuffer, context->backend(), fBufferFormat); - GrPixelConfig pixelConfig = context->contextPriv().caps()->getConfigFromBackendFormat( + GrPixelConfig pixelConfig = context->priv().caps()->getConfigFromBackendFormat( backendFormat, this->getInfo().colorType()); if (pixelConfig == kUnknown_GrPixelConfig) { @@ -570,7 +570,7 @@ } } - auto proxyProvider = context->contextPriv().proxyProvider(); + auto proxyProvider = context->priv().proxyProvider(); AHardwareBuffer* hardwareBuffer = fHardwareBuffer; AHardwareBuffer_acquire(hardwareBuffer);
diff --git a/src/gpu/GrBackendTextureImageGenerator.cpp b/src/gpu/GrBackendTextureImageGenerator.cpp index 7926956..b968e141 100644 --- a/src/gpu/GrBackendTextureImageGenerator.cpp +++ b/src/gpu/GrBackendTextureImageGenerator.cpp
@@ -40,7 +40,7 @@ // Attach our texture to this context's resource cache. This ensures that deletion will happen // in the correct thread/context. This adds the only ref to the texture that will persist from // this point. That ref will be released when the generator's RefHelper is freed. - context->contextPriv().getResourceCache()->insertCrossContextGpuResource(texture.get()); + context->priv().getResourceCache()->insertCrossContextGpuResource(texture.get()); GrBackendTexture backendTexture = texture->getBackendTexture(); GrBackendFormat backendFormat = backendTexture.getBackendFormat(); @@ -48,7 +48,7 @@ return nullptr; } backendTexture.fConfig = - context->contextPriv().caps()->getConfigFromBackendFormat(backendFormat, colorType); + context->priv().caps()->getConfigFromBackendFormat(backendFormat, colorType); if (backendTexture.fConfig == kUnknown_GrPixelConfig) { return nullptr; } @@ -56,7 +56,7 @@ SkImageInfo info = SkImageInfo::Make(texture->width(), texture->height(), colorType, alphaType, std::move(colorSpace)); return std::unique_ptr<SkImageGenerator>(new GrBackendTextureImageGenerator( - info, texture.get(), origin, context->contextPriv().contextID(), + info, texture.get(), origin, context->priv().contextID(), std::move(semaphore), backendTexture)); } @@ -100,12 +100,12 @@ return nullptr; } - auto proxyProvider = context->contextPriv().proxyProvider(); + auto proxyProvider = context->priv().proxyProvider(); fBorrowingMutex.acquire(); sk_sp<GrReleaseProcHelper> releaseProcHelper; if (SK_InvalidGenID != fRefHelper->fBorrowingContextID) { - if (fRefHelper->fBorrowingContextID != context->contextPriv().contextID()) { + if (fRefHelper->fBorrowingContextID != context->priv().contextID()) { fBorrowingMutex.release(); return nullptr; } else { @@ -122,10 +122,10 @@ fRefHelper)); fRefHelper->fBorrowingContextReleaseProc = releaseProcHelper.get(); } - fRefHelper->fBorrowingContextID = context->contextPriv().contextID(); + fRefHelper->fBorrowingContextID = context->priv().contextID(); fBorrowingMutex.release(); - SkASSERT(fRefHelper->fBorrowingContextID == context->contextPriv().contextID()); + SkASSERT(fRefHelper->fBorrowingContextID == context->priv().contextID()); GrSurfaceDesc desc; desc.fWidth = fBackendTexture.width(); @@ -206,7 +206,7 @@ } sk_sp<GrRenderTargetContext> rtContext( - context->contextPriv().makeDeferredRenderTargetContext( + context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, info.width(), info.height(), proxy->config(), nullptr, 1, mipMapped, proxy->origin(), nullptr, SkBudgeted::kYes));
diff --git a/src/gpu/GrBitmapTextureMaker.cpp b/src/gpu/GrBitmapTextureMaker.cpp index 291d6b1..95f1c84 100644 --- a/src/gpu/GrBitmapTextureMaker.cpp +++ b/src/gpu/GrBitmapTextureMaker.cpp
@@ -36,7 +36,7 @@ return nullptr; } - GrProxyProvider* proxyProvider = this->context()->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = this->context()->priv().proxyProvider(); sk_sp<GrTextureProxy> proxy; if (fOriginalKey.isValid()) {
diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp index 331e415..816801a 100644 --- a/src/gpu/GrBlurUtils.cpp +++ b/src/gpu/GrBlurUtils.cpp
@@ -70,7 +70,7 @@ SkASSERT(filter); SkASSERT(!shape.style().applies()); - auto proxyProvider = context->contextPriv().proxyProvider(); + auto proxyProvider = context->priv().proxyProvider(); sk_sp<GrTextureProxy> filteredMask; @@ -176,9 +176,9 @@ const GrShape& shape, int sampleCnt) { GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); sk_sp<GrRenderTargetContext> rtContext( - context->contextPriv().makeDeferredRenderTargetContextWithFallback( + context->priv().makeDeferredRenderTargetContextWithFallback( format, SkBackingFit::kApprox, maskRect.width(), maskRect.height(), kAlpha_8_GrPixelConfig, nullptr, sampleCnt, GrMipMapped::kNo, kTopLeft_GrSurfaceOrigin)); @@ -388,7 +388,7 @@ sk_sp<GrTextureProxy> filteredMask; - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); if (maskKey.isValid()) { // TODO: this cache look up is duplicated in sw_draw_with_mask_filter for raster
diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp index bc91d30..67898c4 100644 --- a/src/gpu/GrBufferAllocPool.cpp +++ b/src/gpu/GrBufferAllocPool.cpp
@@ -366,7 +366,7 @@ } sk_sp<GrBuffer> GrBufferAllocPool::getBuffer(size_t size) { - auto resourceProvider = fGpu->getContext()->contextPriv().resourceProvider(); + auto resourceProvider = fGpu->getContext()->priv().resourceProvider(); return resourceProvider->createBuffer(size, fBufferType, kDynamic_GrAccessPattern, GrResourceProvider::Flags::kNone);
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp index 7aadaa4..c2209d9 100644 --- a/src/gpu/GrClipStackClip.cpp +++ b/src/gpu/GrClipStackClip.cpp
@@ -119,21 +119,21 @@ GrShape shape(path, GrStyle::SimpleFill()); GrPathRenderer::CanDrawPathArgs canDrawArgs; - canDrawArgs.fCaps = context->contextPriv().caps(); + canDrawArgs.fCaps = context->priv().caps(); canDrawArgs.fClipConservativeBounds = &scissorRect; canDrawArgs.fViewMatrix = &viewMatrix; canDrawArgs.fShape = &shape; canDrawArgs.fAAType = GrChooseAAType(GrAA(element->isAA()), renderTargetContext->fsaaType(), GrAllowMixedSamples::kYes, - *context->contextPriv().caps()); + *context->priv().caps()); SkASSERT(!renderTargetContext->wrapsVkSecondaryCB()); canDrawArgs.fTargetIsWrappedVkSecondaryCB = false; canDrawArgs.fHasUserStencilSettings = hasUserStencilSettings; // the 'false' parameter disallows use of the SW path renderer GrPathRenderer* pr = - context->contextPriv().drawingManager()->getPathRenderer(canDrawArgs, false, type); + context->priv().drawingManager()->getPathRenderer(canDrawArgs, false, type); if (prOut) { *prOut = pr; } @@ -160,7 +160,7 @@ // If we're avoiding stencils, always use SW. This includes drawing into a wrapped vulkan // secondary command buffer which can't handle stencils. - if (context->contextPriv().caps()->avoidStencilBuffers() || + if (context->priv().caps()->avoidStencilBuffers() || renderTargetContext->wrapsVkSecondaryCB()) { return true; } @@ -202,7 +202,7 @@ } int maxWindowRectangles = renderTargetContext->priv().maxWindowRectangles(); - int maxAnalyticFPs = context->contextPriv().caps()->maxClipAnalyticFPs(); + int maxAnalyticFPs = context->priv().caps()->maxClipAnalyticFPs(); if (GrFSAAType::kNone != renderTargetContext->fsaaType()) { // With mixed samples (non-msaa color buffer), any coverage info is lost from color once it // hits the color buffer anyway, so we may as well use coverage AA if nothing else in the @@ -211,11 +211,11 @@ maxAnalyticFPs = 0; } // We disable MSAA when avoiding stencil. - SkASSERT(!context->contextPriv().caps()->avoidStencilBuffers()); + SkASSERT(!context->priv().caps()->avoidStencilBuffers()); } - auto* ccpr = context->contextPriv().drawingManager()->getCoverageCountingPathRenderer(); + auto* ccpr = context->priv().drawingManager()->getCoverageCountingPathRenderer(); - GrReducedClip reducedClip(*fStack, devBounds, context->contextPriv().caps(), + GrReducedClip reducedClip(*fStack, devBounds, context->priv().caps(), maxWindowRectangles, maxAnalyticFPs, ccpr ? maxAnalyticFPs : 0); if (InitialState::kAllOut == reducedClip.initialState() && reducedClip.maskElements().isEmpty()) { @@ -262,7 +262,7 @@ // If the stencil buffer is multisampled we can use it to do everything. if ((GrFSAAType::kNone == renderTargetContext->fsaaType() && reducedClip.maskRequiresAA()) || - context->contextPriv().caps()->avoidStencilBuffers() || + context->priv().caps()->avoidStencilBuffers() || renderTargetContext->wrapsVkSecondaryCB()) { sk_sp<GrTextureProxy> result; if (UseSWOnlyPath(context, hasUserStencilSettings, renderTargetContext, reducedClip)) { @@ -282,7 +282,7 @@ // If alpha or software clip mask creation fails, fall through to the stencil code paths, // unless stencils are disallowed. - if (context->contextPriv().caps()->avoidStencilBuffers() || + if (context->priv().caps()->avoidStencilBuffers() || renderTargetContext->wrapsVkSecondaryCB()) { SkDebugf("WARNING: Clip mask requires stencil, but stencil unavailable. " "Clip will be ignored.\n"); @@ -325,7 +325,7 @@ static void add_invalidate_on_pop_message(GrContext* context, const SkClipStack& stack, uint32_t clipGenID, const GrUniqueKey& clipMaskKey) { - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart); while (const Element* element = iter.prev()) { @@ -339,7 +339,7 @@ sk_sp<GrTextureProxy> GrClipStackClip::createAlphaClipMask(GrContext* context, const GrReducedClip& reducedClip) const { - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); GrUniqueKey key; create_clip_mask_key(reducedClip.maskGenID(), reducedClip.scissor(), reducedClip.numAnalyticFPs(), &key); @@ -351,9 +351,9 @@ } GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); sk_sp<GrRenderTargetContext> rtc( - context->contextPriv().makeDeferredRenderTargetContextWithFallback( + context->priv().makeDeferredRenderTargetContextWithFallback( format, SkBackingFit::kApprox, reducedClip.width(), @@ -463,7 +463,7 @@ create_clip_mask_key(reducedClip.maskGenID(), reducedClip.scissor(), reducedClip.numAnalyticFPs(), &key); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); sk_sp<GrTextureProxy> proxy(proxyProvider->findOrCreateProxyByUniqueKey( key, kTopLeft_GrSurfaceOrigin)); @@ -475,7 +475,7 @@ // left corner of the resulting rect to the top left of the texture. SkIRect maskSpaceIBounds = SkIRect::MakeWH(reducedClip.width(), reducedClip.height()); - SkTaskGroup* taskGroup = context->contextPriv().getTaskGroup(); + SkTaskGroup* taskGroup = context->priv().getTaskGroup(); if (taskGroup && renderTargetContext) { // Create our texture proxy GrSurfaceDesc desc; @@ -484,7 +484,7 @@ desc.fConfig = kAlpha_8_GrPixelConfig; GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); // MDB TODO: We're going to fill this proxy with an ASAP upload (which is out of order wrt // to ops), so it can't have any pending IO.
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 8410b40..382b08c 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp
@@ -426,7 +426,7 @@ // For canvas2D putImageData performance we have a special code path for unpremul RGBA_8888 srcs // that are premultiplied on the GPU. This is kept as narrow as possible for now. bool canvas2DFastPath = - !fContext->contextPriv().caps()->avoidWritePixelsFastPath() && + !fContext->priv().caps()->avoidWritePixelsFastPath() && premul && !dst->colorSpaceInfo().colorSpace() && (srcColorType == GrColorType::kRGBA_8888 || srcColorType == GrColorType::kBGRA_8888) && @@ -434,7 +434,7 @@ (dstProxy->config() == kRGBA_8888_GrPixelConfig || dstProxy->config() == kBGRA_8888_GrPixelConfig) && !(pixelOpsFlags & kDontFlush_PixelOpsFlag) && - fContext->contextPriv().caps()->isConfigTexturable(kRGBA_8888_GrPixelConfig) && + fContext->priv().caps()->isConfigTexturable(kRGBA_8888_GrPixelConfig) && fContext->validPMUPMConversionExists(); const GrCaps* caps = this->caps(); @@ -455,7 +455,7 @@ if (canvas2DFastPath) { desc.fConfig = kRGBA_8888_GrPixelConfig; format = - fContext->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + fContext->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); } else { desc.fConfig = dstProxy->config(); format = dstProxy->backendFormat().makeTexture2D(); @@ -511,7 +511,7 @@ return false; } - GrColorType allowedColorType = fContext->contextPriv().caps()->supportedWritePixelsColorType( + GrColorType allowedColorType = fContext->priv().caps()->supportedWritePixelsColorType( dstProxy->config(), srcColorType); convert = convert || (srcColorType != allowedColorType); @@ -627,10 +627,10 @@ SkToBool(srcProxy->asTextureProxy()) && (srcProxy->config() == kRGBA_8888_GrPixelConfig || srcProxy->config() == kBGRA_8888_GrPixelConfig) && - fContext->contextPriv().caps()->isConfigRenderable(kRGBA_8888_GrPixelConfig) && + fContext->priv().caps()->isConfigRenderable(kRGBA_8888_GrPixelConfig) && fContext->validPMUPMConversionExists(); - if (!fContext->contextPriv().caps()->surfaceSupportsReadPixels(srcSurface) || + if (!fContext->priv().caps()->surfaceSupportsReadPixels(srcSurface) || canvas2DFastPath) { GrSurfaceDesc desc; desc.fFlags = canvas2DFastPath ? kRenderTarget_GrSurfaceFlag : kNone_GrSurfaceFlags; @@ -703,7 +703,7 @@ top = srcSurface->height() - top - height; } - GrColorType allowedColorType = fContext->contextPriv().caps()->supportedReadPixelsColorType( + GrColorType allowedColorType = fContext->priv().caps()->supportedReadPixelsColorType( srcProxy->config(), dstColorType); convert = convert || (dstColorType != allowedColorType); @@ -997,7 +997,7 @@ SkBudgeted budgeted) { GrBackendFormat localFormat = format; SkASSERT(sampleCnt > 0); - if (0 == fContext->contextPriv().caps()->getRenderTargetSampleCount(sampleCnt, config)) { + if (0 == fContext->priv().caps()->getRenderTargetSampleCount(sampleCnt, config)) { config = GrPixelConfigFallback(config); // TODO: First we should be checking the getRenderTargetSampleCount from the GrBackendFormat // and not GrPixelConfig. Besides that, we should implement the fallback in the caps, but
diff --git a/src/gpu/GrContextPriv.h b/src/gpu/GrContextPriv.h index 123745e..c3ccb1c 100644 --- a/src/gpu/GrContextPriv.h +++ b/src/gpu/GrContextPriv.h
@@ -303,9 +303,9 @@ friend class GrContext; // to construct/copy this type. }; -inline GrContextPriv GrContext::contextPriv() { return GrContextPriv(this); } +inline GrContextPriv GrContext::priv() { return GrContextPriv(this); } -inline const GrContextPriv GrContext::contextPriv () const { +inline const GrContextPriv GrContext::priv() const { return GrContextPriv(const_cast<GrContext*>(this)); }
diff --git a/src/gpu/GrDirectContext.cpp b/src/gpu/GrDirectContext.cpp index 47d226c..9fdb3b8 100644 --- a/src/gpu/GrDirectContext.cpp +++ b/src/gpu/GrDirectContext.cpp
@@ -33,7 +33,7 @@ ~GrDirectContext() override { // this if-test protects against the case where the context is being destroyed // before having been fully created - if (this->contextPriv().getGpu()) { + if (this->priv().getGpu()) { this->flush(); } @@ -80,13 +80,13 @@ allowMultitexturing = GrDrawOpAtlas::AllowMultitexturing::kYes; } - GrStrikeCache* glyphCache = this->contextPriv().getGlyphCache(); - GrProxyProvider* proxyProvider = this->contextPriv().proxyProvider(); + GrStrikeCache* glyphCache = this->priv().getGlyphCache(); + GrProxyProvider* proxyProvider = this->priv().proxyProvider(); fAtlasManager = new GrAtlasManager(proxyProvider, glyphCache, this->options().fGlyphCacheTextureMaximumBytes, allowMultitexturing); - this->contextPriv().addOnFlushCallbackObject(fAtlasManager); + this->priv().addOnFlushCallbackObject(fAtlasManager); return true; }
diff --git a/src/gpu/GrDrawOpTest.cpp b/src/gpu/GrDrawOpTest.cpp index d14e5b5..90c6e59 100644 --- a/src/gpu/GrDrawOpTest.cpp +++ b/src/gpu/GrDrawOpTest.cpp
@@ -16,7 +16,7 @@ #if GR_TEST_UTILS const GrUserStencilSettings* GrGetRandomStencil(SkRandom* random, GrContext* context) { - if (context->contextPriv().caps()->avoidStencilBuffers()) { + if (context->priv().caps()->avoidStencilBuffers()) { return &GrUserStencilSettings::kUnused; } static constexpr GrUserStencilSettings kReads(
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp index 942daf2..985131e 100644 --- a/src/gpu/GrDrawingManager.cpp +++ b/src/gpu/GrDrawingManager.cpp
@@ -174,7 +174,7 @@ } void GrDrawingManager::cleanup() { - fDAG.cleanup(fContext->contextPriv().caps()); + fDAG.cleanup(fContext->priv().caps()); fPathRendererChain = nullptr; fSoftwarePathRenderer = nullptr; @@ -215,7 +215,7 @@ } SkDEBUGCODE(this->validate()); - GrGpu* gpu = fContext->contextPriv().getGpu(); + GrGpu* gpu = fContext->priv().getGpu(); if (!gpu) { return GrSemaphoresSubmitted::kNo; // Can't flush while DDL recording } @@ -225,7 +225,7 @@ // needs to flush mid-draw. In that case, the SkGpuDevice's GrOpLists won't be closed // but need to be flushed anyway. Closing such GrOpLists here will mean new // GrOpLists will be created to replace them if the SkGpuDevice(s) write to them again. - fDAG.closeAll(fContext->contextPriv().caps()); + fDAG.closeAll(fContext->priv().caps()); fActiveOpList = nullptr; fDAG.prepForFlush(); @@ -235,7 +235,7 @@ fIndexBufferSpace.reset(new char[GrBufferAllocPool::kDefaultBufferSize]()); } - GrOpFlushState flushState(gpu, fContext->contextPriv().resourceProvider(), &fTokenTracker, + GrOpFlushState flushState(gpu, fContext->priv().resourceProvider(), &fTokenTracker, fVertexBufferSpace.get(), fIndexBufferSpace.get()); GrOnFlushResourceProvider onFlushProvider(this); @@ -264,7 +264,7 @@ SkASSERT(GrSurfaceProxy::LazyState::kNot == p->lazyInstantiationState()); }); #endif - onFlushOpList->makeClosed(*fContext->contextPriv().caps()); + onFlushOpList->makeClosed(*fContext->priv().caps()); onFlushOpList->prepare(&flushState); fOnFlushCBOpLists.push_back(std::move(onFlushOpList)); } @@ -283,7 +283,7 @@ bool flushed = false; { - GrResourceAllocator alloc(fContext->contextPriv().resourceProvider(), + GrResourceAllocator alloc(fContext->priv().resourceProvider(), flushState.deinstantiateProxyTracker()); for (int i = 0; i < fDAG.numOpLists(); ++i) { if (fDAG.opList(i)) { @@ -328,7 +328,7 @@ // When we move to partial flushes this assert will no longer be valid. // In DDL mode this check is somewhat superfluous since the memory for most of the ops/opLists // will be stored in the DDL's GrOpMemoryPools. - GrOpMemoryPool* opMemoryPool = fContext->contextPriv().opMemoryPool(); + GrOpMemoryPool* opMemoryPool = fContext->priv().opMemoryPool(); opMemoryPool->isEmpty(); #endif @@ -338,7 +338,7 @@ // Give the cache a chance to purge resources that become purgeable due to flushing. if (flushed) { - fContext->contextPriv().getResourceCache()->purgeAsNeeded(); + fContext->priv().getResourceCache()->purgeAsNeeded(); } for (GrOnFlushCallbackObject* onFlushCBObject : fOnFlushCBObjects) { onFlushCBObject->postFlush(fTokenTracker.nextTokenToFlush(), fFlushingOpListIDs.begin(), @@ -364,7 +364,7 @@ } #endif - GrResourceProvider* resourceProvider = fContext->contextPriv().resourceProvider(); + GrResourceProvider* resourceProvider = fContext->priv().resourceProvider(); bool anyOpListsExecuted = false; for (int i = startIndex; i < stopIndex; ++i) { @@ -389,7 +389,7 @@ // TODO: handle this instantiation via lazy surface proxies? // Instantiate all deferred proxies (being built on worker threads) so we can upload them - opList->instantiateDeferredProxies(fContext->contextPriv().resourceProvider()); + opList->instantiateDeferredProxies(fContext->priv().resourceProvider()); opList->prepare(flushState); } @@ -455,7 +455,7 @@ SkDEBUGCODE(this->validate()); SkASSERT(proxy); - GrGpu* gpu = fContext->contextPriv().getGpu(); + GrGpu* gpu = fContext->priv().getGpu(); if (!gpu) { return GrSemaphoresSubmitted::kNo; // Can't flush while DDL recording } @@ -465,7 +465,7 @@ result = this->flush(proxy, numSemaphores, backendSemaphores); } - if (!proxy->instantiate(fContext->contextPriv().resourceProvider())) { + if (!proxy->instantiate(fContext->priv().resourceProvider())) { return result; } @@ -492,7 +492,7 @@ SkDEBUGCODE(this->validate()); // no opList should receive a new command after this - fDAG.closeAll(fContext->contextPriv().caps()); + fDAG.closeAll(fContext->priv().caps()); fActiveOpList = nullptr; fDAG.swap(&ddl->fOpLists); @@ -515,7 +515,7 @@ // reordering so ops that (in the single opList world) would've just glommed onto the // end of the single opList but referred to a far earlier RT need to appear in their // own opList. - fActiveOpList->makeClosed(*fContext->contextPriv().caps()); + fActiveOpList->makeClosed(*fContext->priv().caps()); fActiveOpList = nullptr; } @@ -570,24 +570,24 @@ // they really only need to be split if they ever reference proxy's contents again but // that is hard to predict/handle). if (GrOpList* lastOpList = rtp->getLastOpList()) { - lastOpList->closeThoseWhoDependOnMe(*fContext->contextPriv().caps()); + lastOpList->closeThoseWhoDependOnMe(*fContext->priv().caps()); } } else if (fActiveOpList) { // This is a temporary fix for the partial-MDB world. In that world we're not // reordering so ops that (in the single opList world) would've just glommed onto the // end of the single opList but referred to a far earlier RT need to appear in their // own opList. - fActiveOpList->makeClosed(*fContext->contextPriv().caps()); + fActiveOpList->makeClosed(*fContext->priv().caps()); fActiveOpList = nullptr; } - auto resourceProvider = fContext->contextPriv().resourceProvider(); + auto resourceProvider = fContext->priv().resourceProvider(); sk_sp<GrRenderTargetOpList> opList(new GrRenderTargetOpList( resourceProvider, - fContext->contextPriv().refOpMemoryPool(), + fContext->priv().refOpMemoryPool(), rtp, - fContext->contextPriv().getAuditTrail())); + fContext->priv().getAuditTrail())); SkASSERT(rtp->getLastOpList() == opList.get()); if (managedOpList) { @@ -613,21 +613,21 @@ // overkill: they really only need to be split if they ever reference proxy's contents // again but that is hard to predict/handle). if (GrOpList* lastOpList = textureProxy->getLastOpList()) { - lastOpList->closeThoseWhoDependOnMe(*fContext->contextPriv().caps()); + lastOpList->closeThoseWhoDependOnMe(*fContext->priv().caps()); } } else if (fActiveOpList) { // This is a temporary fix for the partial-MDB world. In that world we're not // reordering so ops that (in the single opList world) would've just glommed onto the // end of the single opList but referred to a far earlier RT need to appear in their // own opList. - fActiveOpList->makeClosed(*fContext->contextPriv().caps()); + fActiveOpList->makeClosed(*fContext->priv().caps()); fActiveOpList = nullptr; } - sk_sp<GrTextureOpList> opList(new GrTextureOpList(fContext->contextPriv().resourceProvider(), - fContext->contextPriv().refOpMemoryPool(), + sk_sp<GrTextureOpList> opList(new GrTextureOpList(fContext->priv().resourceProvider(), + fContext->priv().refOpMemoryPool(), textureProxy, - fContext->contextPriv().getAuditTrail())); + fContext->priv().getAuditTrail())); SkASSERT(textureProxy->getLastOpList() == opList.get()); @@ -677,7 +677,7 @@ GrPathRenderer* GrDrawingManager::getSoftwarePathRenderer() { if (!fSoftwarePathRenderer) { fSoftwarePathRenderer.reset( - new GrSoftwarePathRenderer(fContext->contextPriv().proxyProvider(), + new GrSoftwarePathRenderer(fContext->priv().proxyProvider(), fOptionsForPathRendererChain.fAllowPathMaskCaching)); } return fSoftwarePathRenderer.get(); @@ -691,7 +691,7 @@ } void GrDrawingManager::flushIfNecessary() { - GrResourceCache* resourceCache = fContext->contextPriv().getResourceCache(); + GrResourceCache* resourceCache = fContext->priv().getResourceCache(); if (resourceCache && resourceCache->requestsFlush()) { this->flush(nullptr, 0, nullptr); resourceCache->purgeAsNeeded(); @@ -709,7 +709,7 @@ // SkSurface catches bad color space usage at creation. This check handles anything that slips // by, including internal usage. - if (!SkSurface_Gpu::Valid(fContext->contextPriv().caps(), sProxy->config(), colorSpace.get())) { + if (!SkSurface_Gpu::Valid(fContext->priv().caps(), sProxy->config(), colorSpace.get())) { SkDEBUGFAIL("Invalid config and colorspace combination"); return nullptr; } @@ -720,7 +720,7 @@ fContext, this, std::move(rtp), std::move(colorSpace), surfaceProps, - fContext->contextPriv().getAuditTrail(), + fContext->priv().getAuditTrail(), fSingleOwner, managedOpList)); } @@ -732,7 +732,7 @@ // SkSurface catches bad color space usage at creation. This check handles anything that slips // by, including internal usage. - if (!SkSurface_Gpu::Valid(fContext->contextPriv().caps(), sProxy->config(), colorSpace.get())) { + if (!SkSurface_Gpu::Valid(fContext->priv().caps(), sProxy->config(), colorSpace.get())) { SkDEBUGFAIL("Invalid config and colorspace combination"); return nullptr; } @@ -744,6 +744,6 @@ return sk_sp<GrTextureContext>(new GrTextureContext(fContext, this, std::move(textureProxy), std::move(colorSpace), - fContext->contextPriv().getAuditTrail(), + fContext->priv().getAuditTrail(), fSingleOwner)); }
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp index af801ca..1462bf1 100644 --- a/src/gpu/GrGpu.cpp +++ b/src/gpu/GrGpu.cpp
@@ -378,7 +378,7 @@ GrSemaphoresSubmitted GrGpu::finishFlush(int numSemaphores, GrBackendSemaphore backendSemaphores[]) { this->stats()->incNumFinishFlushes(); - GrResourceProvider* resourceProvider = fContext->contextPriv().resourceProvider(); + GrResourceProvider* resourceProvider = fContext->priv().resourceProvider(); if (this->caps()->fenceSyncSupport()) { for (int i = 0; i < numSemaphores; ++i) {
diff --git a/src/gpu/GrGpuCommandBuffer.cpp b/src/gpu/GrGpuCommandBuffer.cpp index e0923a2..2684219 100644 --- a/src/gpu/GrGpuCommandBuffer.cpp +++ b/src/gpu/GrGpuCommandBuffer.cpp
@@ -47,7 +47,7 @@ SkASSERT(!pipeline.isScissorEnabled() || fixedDynamicState || (dynamicStateArrays && dynamicStateArrays->fScissorRects)); - auto resourceProvider = this->gpu()->getContext()->contextPriv().resourceProvider(); + auto resourceProvider = this->gpu()->getContext()->priv().resourceProvider(); if (pipeline.isBad()) { return false;
diff --git a/src/gpu/GrGpuResource.cpp b/src/gpu/GrGpuResource.cpp index 02cc617..0c7c3a1 100644 --- a/src/gpu/GrGpuResource.cpp +++ b/src/gpu/GrGpuResource.cpp
@@ -17,8 +17,8 @@ static inline GrResourceCache* get_resource_cache(GrGpu* gpu) { SkASSERT(gpu); SkASSERT(gpu->getContext()); - SkASSERT(gpu->getContext()->contextPriv().getResourceCache()); - return gpu->getContext()->contextPriv().getResourceCache(); + SkASSERT(gpu->getContext()->priv().getResourceCache()); + return gpu->getContext()->priv().getResourceCache(); } GrGpuResource::GrGpuResource(GrGpu* gpu) : fGpu(gpu), fUniqueID(CreateUniqueID()) {
diff --git a/src/gpu/GrOnFlushResourceProvider.cpp b/src/gpu/GrOnFlushResourceProvider.cpp index e4cbea3..ced73c4 100644 --- a/src/gpu/GrOnFlushResourceProvider.cpp +++ b/src/gpu/GrOnFlushResourceProvider.cpp
@@ -40,29 +40,29 @@ bool GrOnFlushResourceProvider::assignUniqueKeyToProxy(const GrUniqueKey& key, GrTextureProxy* proxy) { - auto proxyProvider = fDrawingMgr->getContext()->contextPriv().proxyProvider(); + auto proxyProvider = fDrawingMgr->getContext()->priv().proxyProvider(); return proxyProvider->assignUniqueKeyToProxy(key, proxy); } void GrOnFlushResourceProvider::removeUniqueKeyFromProxy(GrTextureProxy* proxy) { - auto proxyProvider = fDrawingMgr->getContext()->contextPriv().proxyProvider(); + auto proxyProvider = fDrawingMgr->getContext()->priv().proxyProvider(); proxyProvider->removeUniqueKeyFromProxy(proxy); } void GrOnFlushResourceProvider::processInvalidUniqueKey(const GrUniqueKey& key) { - auto proxyProvider = fDrawingMgr->getContext()->contextPriv().proxyProvider(); + auto proxyProvider = fDrawingMgr->getContext()->priv().proxyProvider(); proxyProvider->processInvalidUniqueKey(key, nullptr, GrProxyProvider::InvalidateGPUResource::kYes); } sk_sp<GrTextureProxy> GrOnFlushResourceProvider::findOrCreateProxyByUniqueKey( const GrUniqueKey& key, GrSurfaceOrigin origin) { - auto proxyProvider = fDrawingMgr->getContext()->contextPriv().proxyProvider(); + auto proxyProvider = fDrawingMgr->getContext()->priv().proxyProvider(); return proxyProvider->findOrCreateProxyByUniqueKey(key, origin); } bool GrOnFlushResourceProvider::instatiateProxy(GrSurfaceProxy* proxy) { - auto resourceProvider = fDrawingMgr->getContext()->contextPriv().resourceProvider(); + auto resourceProvider = fDrawingMgr->getContext()->priv().resourceProvider(); if (GrSurfaceProxy::LazyState::kNot != proxy->lazyInstantiationState()) { // DDL TODO: Decide if we ever plan to have these proxies use the GrDeinstantiateTracker @@ -75,7 +75,7 @@ sk_sp<GrBuffer> GrOnFlushResourceProvider::makeBuffer(GrBufferType intendedType, size_t size, const void* data) { - auto resourceProvider = fDrawingMgr->getContext()->contextPriv().resourceProvider(); + auto resourceProvider = fDrawingMgr->getContext()->priv().resourceProvider(); return sk_sp<GrBuffer>(resourceProvider->createBuffer(size, intendedType, kDynamic_GrAccessPattern, GrResourceProvider::Flags::kNone, @@ -86,7 +86,7 @@ size_t size, const void* data, const GrUniqueKey& key) { - auto resourceProvider = fDrawingMgr->getContext()->contextPriv().resourceProvider(); + auto resourceProvider = fDrawingMgr->getContext()->priv().resourceProvider(); sk_sp<const GrBuffer> buffer = resourceProvider->findOrMakeStaticBuffer(intendedType, size, data, key); // Static buffers should never have pending IO. @@ -95,9 +95,9 @@ } uint32_t GrOnFlushResourceProvider::contextID() const { - return fDrawingMgr->getContext()->contextPriv().contextID(); + return fDrawingMgr->getContext()->priv().contextID(); } const GrCaps* GrOnFlushResourceProvider::caps() const { - return fDrawingMgr->getContext()->contextPriv().caps(); + return fDrawingMgr->getContext()->priv().caps(); }
diff --git a/src/gpu/GrOpFlushState.cpp b/src/gpu/GrOpFlushState.cpp index 3e82361..37ee176 100644 --- a/src/gpu/GrOpFlushState.cpp +++ b/src/gpu/GrOpFlushState.cpp
@@ -166,11 +166,11 @@ } GrStrikeCache* GrOpFlushState::glyphCache() const { - return fGpu->getContext()->contextPriv().getGlyphCache(); + return fGpu->getContext()->priv().getGlyphCache(); } GrAtlasManager* GrOpFlushState::atlasManager() const { - return fGpu->getContext()->contextPriv().getAtlasManager(); + return fGpu->getContext()->priv().getAtlasManager(); } //////////////////////////////////////////////////////////////////////////////
diff --git a/src/gpu/GrPathRenderer.cpp b/src/gpu/GrPathRenderer.cpp index 631f96d..d16ff49 100644 --- a/src/gpu/GrPathRenderer.cpp +++ b/src/gpu/GrPathRenderer.cpp
@@ -45,7 +45,7 @@ #ifdef SK_DEBUG args.validate(); CanDrawPathArgs canArgs; - canArgs.fCaps = args.fContext->contextPriv().caps(); + canArgs.fCaps = args.fContext->priv().caps(); canArgs.fClipConservativeBounds = args.fClipConservativeBounds; canArgs.fViewMatrix = args.fViewMatrix; canArgs.fShape = args.fShape;
diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp index dd3b0c2..64eb986 100644 --- a/src/gpu/GrPathRendererChain.cpp +++ b/src/gpu/GrPathRendererChain.cpp
@@ -23,13 +23,13 @@ #include "ops/GrTessellatingPathRenderer.h" GrPathRendererChain::GrPathRendererChain(GrContext* context, const Options& options) { - const GrCaps& caps = *context->contextPriv().caps(); + const GrCaps& caps = *context->priv().caps(); if (options.fGpuPathRenderers & GpuPathRenderers::kDashLine) { fChain.push_back(sk_make_sp<GrDashLinePathRenderer>()); } if (options.fGpuPathRenderers & GpuPathRenderers::kStencilAndCover) { sk_sp<GrPathRenderer> pr( - GrStencilAndCoverPathRenderer::Create(context->contextPriv().resourceProvider(), caps)); + GrStencilAndCoverPathRenderer::Create(context->priv().resourceProvider(), caps)); if (pr) { fChain.push_back(std::move(pr)); } @@ -41,9 +41,9 @@ using AllowCaching = GrCoverageCountingPathRenderer::AllowCaching; if (auto ccpr = GrCoverageCountingPathRenderer::CreateIfSupported( caps, AllowCaching(options.fAllowPathMaskCaching), - context->contextPriv().contextID())) { + context->priv().contextID())) { fCoverageCountingPathRenderer = ccpr.get(); - context->contextPriv().addOnFlushCallbackObject(fCoverageCountingPathRenderer); + context->priv().addOnFlushCallbackObject(fCoverageCountingPathRenderer); fChain.push_back(std::move(ccpr)); } } @@ -55,7 +55,7 @@ } if (options.fGpuPathRenderers & GpuPathRenderers::kSmall) { auto spr = sk_make_sp<GrSmallPathRenderer>(); - context->contextPriv().addOnFlushCallbackObject(spr.get()); + context->priv().addOnFlushCallbackObject(spr.get()); fChain.push_back(std::move(spr)); } if (options.fGpuPathRenderers & GpuPathRenderers::kTessellating) {
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp index aafe1d8..32be076 100644 --- a/src/gpu/GrProcessor.cpp +++ b/src/gpu/GrProcessor.cpp
@@ -18,14 +18,14 @@ #if GR_TEST_UTILS GrResourceProvider* GrProcessorTestData::resourceProvider() { - return fContext->contextPriv().resourceProvider(); + return fContext->priv().resourceProvider(); } GrProxyProvider* GrProcessorTestData::proxyProvider() { - return fContext->contextPriv().proxyProvider(); + return fContext->priv().proxyProvider(); } -const GrCaps* GrProcessorTestData::caps() { return fContext->contextPriv().caps(); } +const GrCaps* GrProcessorTestData::caps() { return fContext->priv().caps(); } #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS class GrFragmentProcessor;
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp index 1be1df7..967386f 100644 --- a/src/gpu/GrReducedClip.cpp +++ b/src/gpu/GrReducedClip.cpp
@@ -852,7 +852,7 @@ GrShape shape(clipPath, GrStyle::SimpleFill()); GrPathRenderer::CanDrawPathArgs canDrawArgs; - canDrawArgs.fCaps = context->contextPriv().caps(); + canDrawArgs.fCaps = context->priv().caps(); canDrawArgs.fClipConservativeBounds = &stencilClip.fixedClip().scissorRect(); canDrawArgs.fViewMatrix = &SkMatrix::I(); canDrawArgs.fShape = &shape; @@ -860,7 +860,7 @@ canDrawArgs.fHasUserStencilSettings = false; canDrawArgs.fTargetIsWrappedVkSecondaryCB = renderTargetContext->wrapsVkSecondaryCB(); - GrDrawingManager* dm = context->contextPriv().drawingManager(); + GrDrawingManager* dm = context->priv().drawingManager(); pr = dm->getPathRenderer(canDrawArgs, false, GrPathRendererChain::DrawType::kStencil, &stencilSupport); if (!pr) {
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp index a0728fe..2e20901 100644 --- a/src/gpu/GrRenderTargetContext.cpp +++ b/src/gpu/GrRenderTargetContext.cpp
@@ -172,7 +172,7 @@ , fOpList(sk_ref_sp(fRenderTargetProxy->getLastRenderTargetOpList())) , fSurfaceProps(SkSurfacePropsCopyOrDefault(surfaceProps)) , fManagedOpList(managedOpList) { - GrResourceProvider* resourceProvider = context->contextPriv().resourceProvider(); + GrResourceProvider* resourceProvider = context->priv().resourceProvider(); if (resourceProvider && !resourceProvider->explicitlyAllocateGPUResources()) { // MDB TODO: to ensure all resources still get allocated in the correct order in the hybrid // world we need to get the correct opList here so that it, in turn, can grab and hold @@ -982,7 +982,7 @@ GrAAType aaType = this->chooseAAType(GrAA::kYes, GrAllowMixedSamples::kNo); if (mode != SkBlendMode::kSrcOver || - !fContext->contextPriv().caps()->dynamicStateArrayGeometryProcessorTextureSupport()) { + !fContext->priv().caps()->dynamicStateArrayGeometryProcessorTextureSupport()) { // Draw one at a time with GrFillRectOp and a GrPaint that emulates what GrTextureOp does const GrXPFactory* xpFactory = SkBlendMode_AsXPFactory(mode); for (int i = 0; i < cnt; ++i) { @@ -1645,7 +1645,7 @@ return false; } - auto resourceProvider = fContext->contextPriv().resourceProvider(); + auto resourceProvider = fContext->priv().resourceProvider(); SkTArray<sk_sp<GrSemaphore>> semaphores(numSemaphores); for (int i = 0; i < numSemaphores; ++i) { @@ -1934,7 +1934,7 @@ const std::function<WillAddOpFn>& willAddFn) { ASSERT_SINGLE_OWNER if (this->drawingManager()->wasAbandoned()) { - fContext->contextPriv().opMemoryPool()->release(std::move(op)); + fContext->priv().opMemoryPool()->release(std::move(op)); return; } SkDEBUGCODE(this->validate();) @@ -1949,7 +1949,7 @@ if (!clip.apply(fContext, this, fixedFunctionFlags & GrDrawOp::FixedFunctionFlags::kUsesHWAA, fixedFunctionFlags & GrDrawOp::FixedFunctionFlags::kUsesStencil, &appliedClip, &bounds)) { - fContext->contextPriv().opMemoryPool()->release(std::move(op)); + fContext->priv().opMemoryPool()->release(std::move(op)); return; } @@ -1976,7 +1976,7 @@ GrProcessorSet::Analysis analysis = op->finalize(*this->caps(), &appliedClip); if (analysis.requiresDstTexture()) { if (!this->setupDstProxy(this->asRenderTargetProxy(), clip, *op, &dstProxy)) { - fContext->contextPriv().opMemoryPool()->release(std::move(op)); + fContext->priv().opMemoryPool()->release(std::move(op)); return; } } @@ -2068,7 +2068,7 @@ SkASSERT(rtProxy->backendFormat().textureType() == GrTextureType::k2D); const GrBackendFormat& format = rtProxy->backendFormat(); - sk_sp<GrSurfaceContext> sContext = fContext->contextPriv().makeDeferredSurfaceContext( + sk_sp<GrSurfaceContext> sContext = fContext->priv().makeDeferredSurfaceContext( format, desc, origin, GrMipMapped::kNo, fit, SkBudgeted::kYes, sk_ref_sp(this->colorSpaceInfo().colorSpace())); if (!sContext) {
diff --git a/src/gpu/GrRenderTargetContext.h b/src/gpu/GrRenderTargetContext.h index 07b52f0..f1e45bd 100644 --- a/src/gpu/GrRenderTargetContext.h +++ b/src/gpu/GrRenderTargetContext.h
@@ -378,7 +378,7 @@ void insertEventMarker(const SkString&); GrFSAAType fsaaType() const { return fRenderTargetProxy->fsaaType(); } - const GrCaps* caps() const { return fContext->contextPriv().caps(); } + const GrCaps* caps() const { return fContext->priv().caps(); } int width() const { return fRenderTargetProxy->width(); } int height() const { return fRenderTargetProxy->height(); } int numColorSamples() const { return fRenderTargetProxy->numColorSamples(); } @@ -395,7 +395,7 @@ GrRenderTarget* accessRenderTarget() { // TODO: usage of this entry point needs to be reduced and potentially eliminated // since it ends the deferral of the GrRenderTarget's allocation - if (!fRenderTargetProxy->instantiate(fContext->contextPriv().resourceProvider())) { + if (!fRenderTargetProxy->instantiate(fContext->priv().resourceProvider())) { return nullptr; } return fRenderTargetProxy->peekRenderTarget();
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp index a511146..f5469d1 100644 --- a/src/gpu/GrRenderTargetOpList.cpp +++ b/src/gpu/GrRenderTargetOpList.cpp
@@ -585,7 +585,7 @@ return false; } - this->addOp(std::move(op), *context->contextPriv().caps()); + this->addOp(std::move(op), *context->priv().caps()); return true; }
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp index be17b5f..f590176 100644 --- a/src/gpu/GrResourceProvider.cpp +++ b/src/gpu/GrResourceProvider.cpp
@@ -109,7 +109,7 @@ } GrContext* context = fGpu->getContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); SkColorType colorType; if (GrPixelConfigToColorType(desc.fConfig, &colorType)) { @@ -127,7 +127,7 @@ } auto srcInfo = SkImageInfo::Make(desc.fWidth, desc.fHeight, colorType, kUnknown_SkAlphaType); - sk_sp<GrSurfaceContext> sContext = context->contextPriv().makeWrappedSurfaceContext( + sk_sp<GrSurfaceContext> sContext = context->priv().makeWrappedSurfaceContext( std::move(proxy)); if (!sContext) { return nullptr;
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp index 41249be..2f21a67 100644 --- a/src/gpu/GrSWMaskHelper.cpp +++ b/src/gpu/GrSWMaskHelper.cpp
@@ -108,7 +108,7 @@ // TODO: http://skbug.com/8422: Although this fixes http://skbug.com/8351, it seems like these // should just participate in the normal allocation process and not need the pending IO flag. auto surfaceFlags = GrInternalSurfaceFlags::kNone; - if (!context->contextPriv().resourceProvider()) { + if (!context->priv().resourceProvider()) { // In DDL mode, this texture proxy will be instantiated at flush time, therfore it cannot // have pending IO. surfaceFlags |= GrInternalSurfaceFlags::kNoPendingIO; @@ -123,6 +123,6 @@ #if IS_WEBGL==1 clearFlag = kPerformInitialClear_GrSurfaceFlag; #endif - return context->contextPriv().proxyProvider()->createTextureProxy( + return context->priv().proxyProvider()->createTextureProxy( std::move(img), clearFlag, 1, SkBudgeted::kYes, fit, surfaceFlags); }
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp index 5220394..9fd8ecd 100644 --- a/src/gpu/GrSoftwarePathRenderer.cpp +++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -174,7 +174,7 @@ static sk_sp<GrTextureProxy> make_deferred_mask_texture_proxy(GrContext* context, SkBackingFit fit, int width, int height) { - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); GrSurfaceDesc desc; desc.fWidth = width; @@ -182,7 +182,7 @@ desc.fConfig = kAlpha_8_GrPixelConfig; const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); // MDB TODO: We're going to fill this proxy with an ASAP upload (which is out of order wrt to // ops), so it can't have any pending IO. @@ -331,7 +331,7 @@ SkBackingFit fit = useCache ? SkBackingFit::kExact : SkBackingFit::kApprox; GrAA aa = GrAAType::kCoverage == args.fAAType ? GrAA::kYes : GrAA::kNo; - SkTaskGroup* taskGroup = args.fContext->contextPriv().getTaskGroup(); + SkTaskGroup* taskGroup = args.fContext->priv().getTaskGroup(); if (taskGroup) { proxy = make_deferred_mask_texture_proxy(args.fContext, fit, boundsForMask->width(), @@ -374,7 +374,7 @@ SkASSERT(proxy->origin() == kTopLeft_GrSurfaceOrigin); fProxyProvider->assignUniqueKeyToProxy(maskKey, proxy.get()); args.fShape->addGenIDChangeListener( - sk_make_sp<PathInvalidator>(maskKey, args.fContext->contextPriv().contextID())); + sk_make_sp<PathInvalidator>(maskKey, args.fContext->priv().contextID())); } } if (inverseFilled) {
diff --git a/src/gpu/GrSurfaceContext.cpp b/src/gpu/GrSurfaceContext.cpp index a77addd..75059d4 100644 --- a/src/gpu/GrSurfaceContext.cpp +++ b/src/gpu/GrSurfaceContext.cpp
@@ -52,7 +52,7 @@ if (GrColorType::kUnknown == colorType) { return false; } - return fContext->contextPriv().readSurfacePixels(this, x, y, dstInfo.width(), dstInfo.height(), + return fContext->priv().readSurfacePixels(this, x, y, dstInfo.width(), dstInfo.height(), colorType, dstInfo.colorSpace(), dstBuffer, dstRowBytes, flags); } @@ -71,7 +71,7 @@ if (GrColorType::kUnknown == colorType) { return false; } - return fContext->contextPriv().writeSurfacePixels(this, x, y, srcInfo.width(), srcInfo.height(), + return fContext->priv().writeSurfacePixels(this, x, y, srcInfo.width(), srcInfo.height(), colorType, srcInfo.colorSpace(), srcBuffer, srcRowBytes, flags); } @@ -82,7 +82,7 @@ SkDEBUGCODE(this->validate();) GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrSurfaceContext::copy"); - if (!fContext->contextPriv().caps()->canCopySurface(this->asSurfaceProxy(), src, srcRect, + if (!fContext->priv().caps()->canCopySurface(this->asSurfaceProxy(), src, srcRect, dstPoint)) { return false; }
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp index 8b1bce4..6051f51 100644 --- a/src/gpu/GrSurfaceProxy.cpp +++ b/src/gpu/GrSurfaceProxy.cpp
@@ -353,7 +353,7 @@ return nullptr; } - sk_sp<GrSurfaceContext> dstContext(context->contextPriv().makeDeferredSurfaceContext( + sk_sp<GrSurfaceContext> dstContext(context->priv().makeDeferredSurfaceContext( format, dstDesc, src->origin(), mipMapped, fit, budgeted)); if (!dstContext) { return nullptr; @@ -383,7 +383,7 @@ return nullptr; } - sk_sp<GrSurfaceContext> dstContext(context->contextPriv().makeDeferredSurfaceContext( + sk_sp<GrSurfaceContext> dstContext(context->priv().makeDeferredSurfaceContext( format, dstDesc, origin, GrMipMapped::kNo, SkBackingFit::kExact, SkBudgeted::kYes)); if (!dstContext) { return nullptr;
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp index e734233..74f295b 100644 --- a/src/gpu/GrTexture.cpp +++ b/src/gpu/GrTexture.cpp
@@ -57,7 +57,7 @@ return false; } #ifdef SK_DEBUG - GrResourceCache* cache = texture->getContext()->contextPriv().getResourceCache(); + GrResourceCache* cache = texture->getContext()->priv().getResourceCache(); int preCount = cache->getResourceCount(); #endif // Ensure that the texture will be released by the cache when we drop the last ref.
diff --git a/src/gpu/GrTextureAdjuster.cpp b/src/gpu/GrTextureAdjuster.cpp index 2b8f44c..1544398 100644 --- a/src/gpu/GrTextureAdjuster.cpp +++ b/src/gpu/GrTextureAdjuster.cpp
@@ -37,7 +37,7 @@ sk_sp<GrTextureProxy> GrTextureAdjuster::refTextureProxyCopy(const CopyParams& copyParams, bool willBeMipped) { - GrProxyProvider* proxyProvider = fContext->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = fContext->priv().proxyProvider(); GrUniqueKey key; this->makeCopyKey(copyParams, &key); @@ -84,15 +84,15 @@ return nullptr; } - SkASSERT(this->width() <= fContext->contextPriv().caps()->maxTextureSize() && - this->height() <= fContext->contextPriv().caps()->maxTextureSize()); + SkASSERT(this->width() <= fContext->priv().caps()->maxTextureSize() && + this->height() <= fContext->priv().caps()->maxTextureSize()); bool needsCopyForMipsOnly = false; if (!params.isRepeated() || - !GrGpu::IsACopyNeededForRepeatWrapMode(fContext->contextPriv().caps(), proxy.get(), + !GrGpu::IsACopyNeededForRepeatWrapMode(fContext->priv().caps(), proxy.get(), proxy->width(), proxy->height(), params.filter(), ©Params, scaleAdjust)) { - needsCopyForMipsOnly = GrGpu::IsACopyNeededForMips(fContext->contextPriv().caps(), + needsCopyForMipsOnly = GrGpu::IsACopyNeededForMips(fContext->priv().caps(), proxy.get(), params.filter(), ©Params); if (!needsCopyForMipsOnly) {
diff --git a/src/gpu/GrTextureMaker.cpp b/src/gpu/GrTextureMaker.cpp index fa4d986..afbfbf0 100644 --- a/src/gpu/GrTextureMaker.cpp +++ b/src/gpu/GrTextureMaker.cpp
@@ -16,8 +16,8 @@ sk_sp<GrTextureProxy> GrTextureMaker::onRefTextureProxyForParams(const GrSamplerState& params, bool willBeMipped, SkScalar scaleAdjust[2]) { - if (this->width() > fContext->contextPriv().caps()->maxTextureSize() || - this->height() > fContext->contextPriv().caps()->maxTextureSize()) { + if (this->width() > fContext->priv().caps()->maxTextureSize() || + this->height() > fContext->priv().caps()->maxTextureSize()) { return nullptr; } @@ -28,10 +28,10 @@ bool needsCopyForMipsOnly = false; if (original) { if (!params.isRepeated() || - !GrGpu::IsACopyNeededForRepeatWrapMode(fContext->contextPriv().caps(), original.get(), + !GrGpu::IsACopyNeededForRepeatWrapMode(fContext->priv().caps(), original.get(), original->width(), original->height(), params.filter(), ©Params, scaleAdjust)) { - needsCopyForMipsOnly = GrGpu::IsACopyNeededForMips(fContext->contextPriv().caps(), + needsCopyForMipsOnly = GrGpu::IsACopyNeededForMips(fContext->priv().caps(), original.get(), params.filter(), ©Params); if (!needsCopyForMipsOnly) { @@ -40,14 +40,14 @@ } } else { if (!params.isRepeated() || - !GrGpu::IsACopyNeededForRepeatWrapMode(fContext->contextPriv().caps(), nullptr, + !GrGpu::IsACopyNeededForRepeatWrapMode(fContext->priv().caps(), nullptr, this->width(), this->height(), params.filter(), ©Params, scaleAdjust)) { return this->refOriginalTextureProxy(willBeMipped, AllowedTexGenType::kAny); } } - GrProxyProvider* proxyProvider = fContext->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = fContext->priv().proxyProvider(); GrSurfaceOrigin origOrigin = original ? original->origin() : kTopLeft_GrSurfaceOrigin; GrUniqueKey copyKey;
diff --git a/src/gpu/GrTextureOpList.cpp b/src/gpu/GrTextureOpList.cpp index ae51807..f63c5a7 100644 --- a/src/gpu/GrTextureOpList.cpp +++ b/src/gpu/GrTextureOpList.cpp
@@ -148,7 +148,7 @@ return false; } - const GrCaps* caps = context->contextPriv().caps(); + const GrCaps* caps = context->priv().caps(); auto addDependency = [ caps, this ] (GrSurfaceProxy* p) { this->addDependency(p, *caps); };
diff --git a/src/gpu/GrTextureProducer.cpp b/src/gpu/GrTextureProducer.cpp index 9ae2eb4..f11d2a3 100644 --- a/src/gpu/GrTextureProducer.cpp +++ b/src/gpu/GrTextureProducer.cpp
@@ -52,7 +52,7 @@ } sk_sp<GrRenderTargetContext> copyRTC = - context->contextPriv().makeDeferredRenderTargetContextWithFallback( + context->priv().makeDeferredRenderTargetContextWithFallback( format, SkBackingFit::kExact, dstRect.width(), dstRect.height(), config, nullptr, 1, mipMapped, inputProxy->origin()); if (!copyRTC) { @@ -235,14 +235,14 @@ int mipCount = SkMipMap::ComputeLevelCount(this->width(), this->height()); bool willBeMipped = GrSamplerState::Filter::kMipMap == sampler.filter() && mipCount && - fContext->contextPriv().caps()->mipMapSupport(); + fContext->priv().caps()->mipMapSupport(); auto result = this->onRefTextureProxyForParams(sampler, willBeMipped, scaleAdjust); // Check to make sure that if we say the texture willBeMipped that the returned texture has mip // maps, unless the config is not copyable. SkASSERT(!result || !willBeMipped || result->mipMapped() == GrMipMapped::kYes || - !fContext->contextPriv().caps()->isConfigCopyable(result->config())); + !fContext->priv().caps()->isConfigCopyable(result->config())); // Check that the "no scaling expected" case always returns a proxy of the same size as the // producer. @@ -259,14 +259,14 @@ int mipCount = SkMipMap::ComputeLevelCount(this->width(), this->height()); bool willBeMipped = GrSamplerState::Filter::kMipMap == sampler.filter() && mipCount && - fContext->contextPriv().caps()->mipMapSupport(); + fContext->priv().caps()->mipMapSupport(); auto result = this->onRefTextureProxyForParams(sampler, willBeMipped, nullptr); // Check to make sure that if we say the texture willBeMipped that the returned texture has mip // maps, unless the config is not copyable. SkASSERT(!result || !willBeMipped || result->mipMapped() == GrMipMapped::kYes || - !fContext->contextPriv().caps()->isConfigCopyable(result->config())); + !fContext->priv().caps()->isConfigCopyable(result->config())); // Check that no scaling occured and we returned a proxy of the same size as the producer. SkASSERT(!result || (result->width() == this->width() && result->height() == this->height()));
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp index b15b0b2..71af55b 100644 --- a/src/gpu/GrTextureProxy.cpp +++ b/src/gpu/GrTextureProxy.cpp
@@ -55,7 +55,7 @@ , fProxyProvider(nullptr) , fDeferredUploader(nullptr) { if (fTarget->getUniqueKey().isValid()) { - fProxyProvider = fTarget->asTexture()->getContext()->contextPriv().proxyProvider(); + fProxyProvider = fTarget->asTexture()->getContext()->priv().proxyProvider(); fProxyProvider->adoptUniqueKeyFromSurface(this, fTarget); } }
diff --git a/src/gpu/GrTracing.h b/src/gpu/GrTracing.h index 41cb6fa..82c6f8d 100644 --- a/src/gpu/GrTracing.h +++ b/src/gpu/GrTracing.h
@@ -16,7 +16,7 @@ * Context level GrTracing macros, classname and op are const char*, context is GrContext */ #define GR_CREATE_TRACE_MARKER_CONTEXT(classname, op, context) \ - GR_AUDIT_TRAIL_AUTO_FRAME(context->contextPriv().getAuditTrail(), classname "::" op); \ + GR_AUDIT_TRAIL_AUTO_FRAME(context->priv().getAuditTrail(), classname "::" op); \ TRACE_EVENT0("skia.gpu", classname "::" op) #endif
diff --git a/src/gpu/GrYUVProvider.cpp b/src/gpu/GrYUVProvider.cpp index 6b3eb88..a4cab0a 100644 --- a/src/gpu/GrYUVProvider.cpp +++ b/src/gpu/GrYUVProvider.cpp
@@ -147,7 +147,7 @@ sk_sp<SkImage> yuvImage = SkImage::MakeFromRaster(pixmap, YUVGen_DataReleaseProc, dataStoragePtr); - auto proxyProvider = ctx->contextPriv().proxyProvider(); + auto proxyProvider = ctx->priv().proxyProvider(); yuvTextureProxies[i] = proxyProvider->createTextureProxy(yuvImage, kNone_GrSurfaceFlags, 1, SkBudgeted::kYes, fit); @@ -157,7 +157,7 @@ // TODO: investigate preallocating mip maps here sk_sp<GrRenderTargetContext> renderTargetContext( - ctx->contextPriv().makeDeferredRenderTargetContext( + ctx->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, desc.fWidth, desc.fHeight, desc.fConfig, nullptr, desc.fSampleCnt, GrMipMapped::kNo, kTopLeft_GrSurfaceOrigin)); if (!renderTargetContext) {
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index cb9718e..dc7aeea 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp
@@ -56,7 +56,7 @@ #include "text/GrTextTarget.h" #define ASSERT_SINGLE_OWNER \ -SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fContext->contextPriv().debugSingleOwner());) +SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fContext->priv().debugSingleOwner());) /////////////////////////////////////////////////////////////////////////////// @@ -164,10 +164,10 @@ return nullptr; } GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(origInfo.colorType()); + context->priv().caps()->getBackendFormatFromColorType(origInfo.colorType()); // This method is used to create SkGpuDevice's for SkSurface_Gpus. In this case // they need to be exact. - return context->contextPriv().makeDeferredRenderTargetContext( + return context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, origInfo.width(), origInfo.height(), config, origInfo.refColorSpace(), sampleCount, @@ -409,7 +409,7 @@ SkPMColor4f dstColor = SkColor4fPrepForDst(SkColor4f::FromColor(color), fRenderTargetContext->colorSpaceInfo(), - *fContext->contextPriv().caps()) + *fContext->priv().caps()) .premul(); GrPaint grPaint; @@ -770,7 +770,7 @@ bool doBicubic; GrSamplerState::Filter textureFilterMode = GrSkFilterQualityToGrFilterMode( quality, viewMatrix, srcToDstRect, - fContext->contextPriv().options().fSharpenMipmappedTextures, &doBicubic); + fContext->priv().options().fSharpenMipmappedTextures, &doBicubic); int tileFilterPad; if (doBicubic) { @@ -821,7 +821,7 @@ bool doBicubic; GrSamplerState::Filter textureFilterMode = GrSkFilterQualityToGrFilterMode( paint.getFilterQuality(), viewMatrix, SkMatrix::I(), - fContext->contextPriv().options().fSharpenMipmappedTextures, &doBicubic); + fContext->priv().options().fSharpenMipmappedTextures, &doBicubic); int tileFilterPad; @@ -1180,7 +1180,7 @@ bool doBicubic; GrSamplerState::Filter textureFilterMode = GrSkFilterQualityToGrFilterMode( paint.getFilterQuality(), this->ctm(), srcToDstMatrix, - fContext->contextPriv().options().fSharpenMipmappedTextures, &doBicubic); + fContext->priv().options().fSharpenMipmappedTextures, &doBicubic); int tileFilterPad; @@ -1209,7 +1209,7 @@ sk_sp<SkSpecialImage> SkGpuDevice::makeSpecial(const SkBitmap& bitmap) { // TODO: this makes a tight copy of 'bitmap' but it doesn't have to be (given SkSpecialImage's // semantics). Since this is cached we would have to bake the fit into the cache key though. - sk_sp<GrTextureProxy> proxy = GrMakeCachedBitmapProxy(fContext->contextPriv().proxyProvider(), + sk_sp<GrTextureProxy> proxy = GrMakeCachedBitmapProxy(fContext->priv().proxyProvider(), bitmap); if (!proxy) { return nullptr; @@ -1815,10 +1815,10 @@ // channel in the layer. config = kRGBA_8888_GrPixelConfig; format = - fContext->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + fContext->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); } - sk_sp<GrRenderTargetContext> rtc(fContext->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc(fContext->priv().makeDeferredRenderTargetContext( format, fit, cinfo.fInfo.width(), cinfo.fInfo.height(), config, fRenderTargetContext->colorSpaceInfo().refColorSpace(), fRenderTargetContext->numStencilSamples(), GrMipMapped::kNo,
diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h index fdd8cbc..3710707 100644 --- a/src/gpu/SkGpuDevice.h +++ b/src/gpu/SkGpuDevice.h
@@ -157,7 +157,7 @@ GrClipStackClip clip() const { return GrClipStackClip(&this->cs()); } - const GrCaps* caps() const { return fContext->contextPriv().caps(); } + const GrCaps* caps() const { return fContext->priv().caps(); } /** * Helper functions called by drawBitmapCommon. By the time these are called the SkDraw's
diff --git a/src/gpu/SkGpuDevice_drawTexture.cpp b/src/gpu/SkGpuDevice_drawTexture.cpp index 2ce46ec..63ab4f9 100644 --- a/src/gpu/SkGpuDevice_drawTexture.cpp +++ b/src/gpu/SkGpuDevice_drawTexture.cpp
@@ -251,7 +251,7 @@ bool doBicubic; GrSamplerState::Filter fm = GrSkFilterQualityToGrFilterMode( paint.getFilterQuality(), viewMatrix, srcToDstMatrix, - fContext->contextPriv().options().fSharpenMipmappedTextures, &doBicubic); + fContext->priv().options().fSharpenMipmappedTextures, &doBicubic); const GrSamplerState::Filter* filterMode = doBicubic ? nullptr : &fm; GrTextureProducer::FilterConstraint constraintMode;
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index 27b4248..972dff3 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp
@@ -148,11 +148,11 @@ sk_sp<GrTextureProxy> GrCopyBaseMipMapToTextureProxy(GrContext* ctx, GrTextureProxy* baseProxy) { SkASSERT(baseProxy); - if (!ctx->contextPriv().caps()->isConfigCopyable(baseProxy->config())) { + if (!ctx->priv().caps()->isConfigCopyable(baseProxy->config())) { return nullptr; } - GrProxyProvider* proxyProvider = ctx->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = ctx->priv().proxyProvider(); GrSurfaceDesc desc; desc.fFlags = kNone_GrSurfaceFlags; desc.fWidth = baseProxy->width(); @@ -172,8 +172,7 @@ } // Copy the base layer to our proxy - sk_sp<GrSurfaceContext> sContext = - ctx->contextPriv().makeWrappedSurfaceContext(proxy); + sk_sp<GrSurfaceContext> sContext = ctx->priv().makeWrappedSurfaceContext(proxy); SkASSERT(sContext); SkAssertResult(sContext->copy(baseProxy)); @@ -378,7 +377,7 @@ GrPaint* grPaint) { // Convert SkPaint color to 4f format in the destination color space SkColor4f origColor = SkColor4fPrepForDst(skPaint.getColor4f(), colorSpaceInfo, - *context->contextPriv().caps()); + *context->priv().caps()); const GrFPArgs fpArgs(context, &viewM, skPaint.getFilterQuality(), &colorSpaceInfo);
diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.cpp b/src/gpu/ccpr/GrCCDrawPathsOp.cpp index 0b4feb6..643118a 100644 --- a/src/gpu/ccpr/GrCCDrawPathsOp.cpp +++ b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
@@ -91,7 +91,7 @@ return nullptr; } - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<GrCCDrawPathsOp>(m, shape, strokeDevWidth, shapeConservativeIBounds, maskDevIBounds, conservativeDevBounds, std::move(paint)); }
diff --git a/src/gpu/ccpr/GrCCPerFlushResources.cpp b/src/gpu/ccpr/GrCCPerFlushResources.cpp index 7b7a3d1..54e395c 100644 --- a/src/gpu/ccpr/GrCCPerFlushResources.cpp +++ b/src/gpu/ccpr/GrCCPerFlushResources.cpp
@@ -60,7 +60,7 @@ sk_sp<const GrCCPerFlushResources> resources, sk_sp<GrTextureProxy> copyProxy, int baseInstance, int endInstance, const SkISize& drawBounds) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<CopyAtlasOp>(std::move(resources), std::move(copyProxy), baseInstance, endInstance, drawBounds); @@ -105,7 +105,7 @@ sk_sp<const GrCCPerFlushResources> resources, FillBatchID fillBatchID, StrokeBatchID strokeBatchID, const SkISize& drawBounds) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<RenderAtlasOp>(std::move(resources), fillBatchID, strokeBatchID, drawBounds);
diff --git a/src/gpu/effects/GrConfigConversionEffect.fp b/src/gpu/effects/GrConfigConversionEffect.fp index 6cee538..071da19 100644 --- a/src/gpu/effects/GrConfigConversionEffect.fp +++ b/src/gpu/effects/GrConfigConversionEffect.fp
@@ -19,7 +19,7 @@ static constexpr GrPixelConfig kConfig = kRGBA_8888_GrPixelConfig; static constexpr SkColorType kColorType = kRGBA_8888_SkColorType; const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kColorType); + context->priv().caps()->getBackendFormatFromColorType(kColorType); SkAutoTMalloc<uint32_t> data(kSize * kSize * 3); uint32_t* srcData = data.get(); uint32_t* firstRead = data.get() + kSize * kSize; @@ -44,13 +44,13 @@ kRGBA_8888_SkColorType, kPremul_SkAlphaType); sk_sp<GrRenderTargetContext> readRTC( - context->contextPriv().makeDeferredRenderTargetContext(format, SkBackingFit::kExact, - kSize, kSize, - kConfig, nullptr)); + context->priv().makeDeferredRenderTargetContext(format, SkBackingFit::kExact, + kSize, kSize, + kConfig, nullptr)); sk_sp<GrRenderTargetContext> tempRTC( - context->contextPriv().makeDeferredRenderTargetContext(format, SkBackingFit::kExact, - kSize, kSize, - kConfig, nullptr)); + context->priv().makeDeferredRenderTargetContext(format, SkBackingFit::kExact, + kSize, kSize, + kConfig, nullptr)); if (!readRTC || !readRTC->asTextureProxy() || !tempRTC) { return false; } @@ -58,7 +58,7 @@ // draw readRTC->discard(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); SkPixmap pixmap(ii, srcData, 4 * kSize);
diff --git a/src/gpu/effects/GrConfigConversionEffect.h b/src/gpu/effects/GrConfigConversionEffect.h index 301a6f9..b182765 100644 --- a/src/gpu/effects/GrConfigConversionEffect.h +++ b/src/gpu/effects/GrConfigConversionEffect.h
@@ -26,7 +26,7 @@ static constexpr GrPixelConfig kConfig = kRGBA_8888_GrPixelConfig; static constexpr SkColorType kColorType = kRGBA_8888_SkColorType; const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kColorType); + context->priv().caps()->getBackendFormatFromColorType(kColorType); SkAutoTMalloc<uint32_t> data(kSize * kSize * 3); uint32_t* srcData = data.get(); uint32_t* firstRead = data.get() + kSize * kSize; @@ -50,9 +50,9 @@ const SkImageInfo ii = SkImageInfo::Make(kSize, kSize, kRGBA_8888_SkColorType, kPremul_SkAlphaType); - sk_sp<GrRenderTargetContext> readRTC(context->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> readRTC(context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, kSize, kSize, kConfig, nullptr)); - sk_sp<GrRenderTargetContext> tempRTC(context->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> tempRTC(context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, kSize, kSize, kConfig, nullptr)); if (!readRTC || !readRTC->asTextureProxy() || !tempRTC) { return false; @@ -61,7 +61,7 @@ // draw readRTC->discard(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); SkPixmap pixmap(ii, srcData, 4 * kSize);
diff --git a/src/gpu/effects/GrRRectBlurEffect.fp b/src/gpu/effects/GrRRectBlurEffect.fp index ccaad63..7bbd0a5 100644 --- a/src/gpu/effects/GrRRectBlurEffect.fp +++ b/src/gpu/effects/GrRRectBlurEffect.fp
@@ -46,16 +46,16 @@ } builder.finish(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); sk_sp<GrTextureProxy> mask(proxyProvider->findOrCreateProxyByUniqueKey( key, kBottomLeft_GrSurfaceOrigin)); if (!mask) { GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); // TODO: this could be approx but the texture coords will need to be updated sk_sp<GrRenderTargetContext> rtc( - context->contextPriv().makeDeferredRenderTargetContextWithFallback( + context->priv().makeDeferredRenderTargetContextWithFallback( format, SkBackingFit::kExact, size.fWidth, size.fHeight, kAlpha_8_GrPixelConfig, nullptr)); if (!rtc) {
diff --git a/src/gpu/effects/GrRRectBlurEffect.h b/src/gpu/effects/GrRRectBlurEffect.h index a774e2c..4f616e5 100644 --- a/src/gpu/effects/GrRRectBlurEffect.h +++ b/src/gpu/effects/GrRRectBlurEffect.h
@@ -46,16 +46,16 @@ } builder.finish(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); sk_sp<GrTextureProxy> mask( proxyProvider->findOrCreateProxyByUniqueKey(key, kBottomLeft_GrSurfaceOrigin)); if (!mask) { - GrBackendFormat format = context->contextPriv().caps()->getBackendFormatFromColorType( + GrBackendFormat format = context->priv().caps()->getBackendFormatFromColorType( kAlpha_8_SkColorType); // TODO: this could be approx but the texture coords will need to be updated sk_sp<GrRenderTargetContext> rtc( - context->contextPriv().makeDeferredRenderTargetContextWithFallback( + context->priv().makeDeferredRenderTargetContextWithFallback( format, SkBackingFit::kExact, size.fWidth, size.fHeight, kAlpha_8_GrPixelConfig, nullptr)); if (!rtc) {
diff --git a/src/gpu/effects/GrSkSLFP.cpp b/src/gpu/effects/GrSkSLFP.cpp index aa81ea5..7463c28 100644 --- a/src/gpu/effects/GrSkSLFP.cpp +++ b/src/gpu/effects/GrSkSLFP.cpp
@@ -234,8 +234,8 @@ std::unique_ptr<GrSkSLFP> GrSkSLFP::Make(GrContext* context, int index, const char* name, const char* sksl, const void* inputs, size_t inputSize) { - return std::unique_ptr<GrSkSLFP>(new GrSkSLFP(context->contextPriv().getFPFactoryCache(), - context->contextPriv().caps()->shaderCaps(), + return std::unique_ptr<GrSkSLFP>(new GrSkSLFP(context->priv().getFPFactoryCache(), + context->priv().caps()->shaderCaps(), index, name, sksl, inputs, inputSize)); }
diff --git a/src/gpu/gl/GrGLGpuCommandBuffer.cpp b/src/gpu/gl/GrGLGpuCommandBuffer.cpp index 912ffe7..502c845 100644 --- a/src/gpu/gl/GrGLGpuCommandBuffer.cpp +++ b/src/gpu/gl/GrGLGpuCommandBuffer.cpp
@@ -28,7 +28,7 @@ const GrGpuRTCommandBuffer::StencilLoadAndStoreInfo& stencilInfo) { SkASSERT(fGpu); SkASSERT(!fRenderTarget); - SkASSERT(fGpu == rt->getContext()->contextPriv().getGpu()); + SkASSERT(fGpu == rt->getContext()->priv().getGpu()); this->INHERITED::set(rt, origin); fColorLoadAndStoreInfo = colorInfo;
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp index f2913f3..e90ca90 100644 --- a/src/gpu/gl/GrGLRenderTarget.cpp +++ b/src/gpu/gl/GrGLRenderTarget.cpp
@@ -195,7 +195,7 @@ } bool GrGLRenderTarget::canAttemptStencilAttachment() const { - if (this->getGpu()->getContext()->contextPriv().caps()->avoidStencilBuffers()) { + if (this->getGpu()->getContext()->priv().caps()->avoidStencilBuffers()) { return false; }
diff --git a/src/gpu/gl/GrGLTextureRenderTarget.cpp b/src/gpu/gl/GrGLTextureRenderTarget.cpp index 17dc562..4069b67 100644 --- a/src/gpu/gl/GrGLTextureRenderTarget.cpp +++ b/src/gpu/gl/GrGLTextureRenderTarget.cpp
@@ -53,7 +53,7 @@ bool GrGLTextureRenderTarget::canAttemptStencilAttachment() const { // The RT FBO of GrGLTextureRenderTarget is never created from a // wrapped FBO, so we only care about the flag. - return !this->getGpu()->getContext()->contextPriv().caps()->avoidStencilBuffers(); + return !this->getGpu()->getContext()->priv().caps()->avoidStencilBuffers(); } sk_sp<GrGLTextureRenderTarget> GrGLTextureRenderTarget::MakeWrapped(
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp index acf7d99..8640da3 100644 --- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp +++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -45,7 +45,7 @@ GrGLProgramBuilder builder(gpu, renderTarget, origin, pipeline, primProc, primProcProxies, desc); - auto persistentCache = gpu->getContext()->contextPriv().getPersistentCache(); + auto persistentCache = gpu->getContext()->priv().getPersistentCache(); if (persistentCache) { sk_sp<SkData> key = SkData::MakeWithoutCopy(desc->asKey(), desc->keyLength()); builder.fCached = persistentCache->load(*key); @@ -173,7 +173,7 @@ void GrGLProgramBuilder::storeShaderInCache(const SkSL::Program::Inputs& inputs, GrGLuint programID, const SkSL::String& glsl) { - if (!this->gpu()->getContext()->contextPriv().getPersistentCache()) { + if (!this->gpu()->getContext()->priv().getPersistentCache()) { return; } sk_sp<SkData> key = SkData::MakeWithoutCopy(desc()->asKey(), desc()->keyLength()); @@ -193,7 +193,7 @@ memcpy(data.get() + offset, &binaryFormat, sizeof(binaryFormat)); offset += sizeof(binaryFormat); memcpy(data.get() + offset, binary.get(), length); - this->gpu()->getContext()->contextPriv().getPersistentCache()->store( + this->gpu()->getContext()->priv().getPersistentCache()->store( *key, *SkData::MakeWithoutCopy(data.get(), dataLength)); } } else { @@ -204,7 +204,7 @@ memcpy(data.get() + offset, &inputs, sizeof(inputs)); offset += sizeof(inputs); memcpy(data.get() + offset, glsl.data(), glsl.length()); - this->gpu()->getContext()->contextPriv().getPersistentCache()->store( + this->gpu()->getContext()->priv().getPersistentCache()->store( *key, *SkData::MakeWithoutCopy(data.get(), dataLength)); } } @@ -220,7 +220,7 @@ } if (this->gpu()->glCaps().programBinarySupport() && - this->gpu()->getContext()->contextPriv().getPersistentCache()) { + this->gpu()->getContext()->priv().getPersistentCache()) { GL_CALL(ProgramParameteri(programID, GR_GL_PROGRAM_BINARY_RETRIEVABLE_HINT, GR_GL_TRUE)); } @@ -232,7 +232,7 @@ settings.fCaps = this->gpu()->glCaps().shaderCaps(); settings.fFlipY = this->origin() != kTopLeft_GrSurfaceOrigin; settings.fSharpenTextures = - this->gpu()->getContext()->contextPriv().options().fSharpenMipmappedTextures; + this->gpu()->getContext()->priv().options().fSharpenMipmappedTextures; settings.fFragColorIsInOut = this->fragColorIsInOut(); SkSL::Program::Inputs inputs;
diff --git a/src/gpu/gradients/GrGradientShader.cpp b/src/gpu/gradients/GrGradientShader.cpp index 7ba231e..7bf1866 100644 --- a/src/gpu/gradients/GrGradientShader.cpp +++ b/src/gpu/gradients/GrGradientShader.cpp
@@ -44,7 +44,7 @@ // TODO: Use 1010102 for opaque gradients, at least if destination is 1010102? SkColorType colorType = kRGBA_8888_SkColorType; if (kLow_GrSLPrecision != GrSLSamplerPrecision(args.fDstColorSpaceInfo->config()) && - args.fContext->contextPriv().caps()->isConfigTexturable(kRGBA_half_GrPixelConfig)) { + args.fContext->priv().caps()->isConfigTexturable(kRGBA_half_GrPixelConfig)) { colorType = kRGBA_F16_SkColorType; } SkAlphaType alphaType = premul ? kPremul_SkAlphaType : kUnpremul_SkAlphaType; @@ -55,7 +55,7 @@ SkASSERT(bitmap.isImmutable()); sk_sp<GrTextureProxy> proxy = GrMakeCachedBitmapProxy( - args.fContext->contextPriv().proxyProvider(), bitmap); + args.fContext->priv().proxyProvider(), bitmap); if (proxy == nullptr) { SkDebugf("Gradient won't draw. Could not create texture."); return nullptr; @@ -103,7 +103,7 @@ // 32-bit, output can be incorrect if the thresholds are too close together. However, the // analytic shaders are higher quality, so they can be used with lower precision hardware when // the thresholds are not ill-conditioned. - const GrShaderCaps* caps = args.fContext->contextPriv().caps()->shaderCaps(); + const GrShaderCaps* caps = args.fContext->priv().caps()->shaderCaps(); if (!caps->floatIs32Bits() && tryAnalyticColorizer) { // Could run into problems, check if thresholds are close together (with a limit of .01, so // that scales will be less than 100, which leaves 4 decimals of precision on 16-bit).
diff --git a/src/gpu/mtl/GrMtlPipelineStateBuilder.mm b/src/gpu/mtl/GrMtlPipelineStateBuilder.mm index d95684c..6582840 100644 --- a/src/gpu/mtl/GrMtlPipelineStateBuilder.mm +++ b/src/gpu/mtl/GrMtlPipelineStateBuilder.mm
@@ -319,8 +319,7 @@ SkSL::Program::Settings settings; settings.fCaps = this->caps()->shaderCaps(); settings.fFlipY = this->origin() != kTopLeft_GrSurfaceOrigin; - settings.fSharpenTextures = - fGpu->getContext()->contextPriv().options().fSharpenMipmappedTextures; + settings.fSharpenTextures = fGpu->getContext()->priv().options().fSharpenMipmappedTextures; SkASSERT(!this->fragColorIsInOut()); id<MTLLibrary> vertexLibrary = nil;
diff --git a/src/gpu/ops/GrAAFillRRectOp.cpp b/src/gpu/ops/GrAAFillRRectOp.cpp index 2811fda..d472fae 100644 --- a/src/gpu/ops/GrAAFillRRectOp.cpp +++ b/src/gpu/ops/GrAAFillRRectOp.cpp
@@ -35,7 +35,7 @@ return nullptr; } - GrOpMemoryPool* pool = ctx->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = ctx->priv().opMemoryPool(); return pool->allocate<GrAAFillRRectOp>(*caps.shaderCaps(), viewMatrix, rrect, std::move(paint)); }
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp index 667e230..d4ffc7c 100644 --- a/src/gpu/ops/GrAtlasTextOp.cpp +++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -29,7 +29,7 @@ GrMaskFormat maskFormat, int glyphCount, bool needsTransform) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); std::unique_ptr<GrAtlasTextOp> op = pool->allocate<GrAtlasTextOp>(std::move(paint)); @@ -61,7 +61,7 @@ const SkSurfaceProps& props, bool isAntiAliased, bool useLCD) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); std::unique_ptr<GrAtlasTextOp> op = pool->allocate<GrAtlasTextOp>(std::move(paint));
diff --git a/src/gpu/ops/GrClearOp.cpp b/src/gpu/ops/GrClearOp.cpp index 369a9d5..d0ee441 100644 --- a/src/gpu/ops/GrClearOp.cpp +++ b/src/gpu/ops/GrClearOp.cpp
@@ -21,7 +21,7 @@ return nullptr; } - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<GrClearOp>(clip, color, dstProxy); } @@ -32,7 +32,7 @@ bool fullScreen) { SkASSERT(fullScreen || !rect.isEmpty()); - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<GrClearOp>(rect, color, fullScreen); }
diff --git a/src/gpu/ops/GrClearStencilClipOp.cpp b/src/gpu/ops/GrClearStencilClipOp.cpp index 17db9f2..99cfd5f 100644 --- a/src/gpu/ops/GrClearStencilClipOp.cpp +++ b/src/gpu/ops/GrClearStencilClipOp.cpp
@@ -14,7 +14,7 @@ const GrFixedClip& clip, bool insideStencilMask, GrRenderTargetProxy* proxy) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<GrClearStencilClipOp>(clip, insideStencilMask, proxy); }
diff --git a/src/gpu/ops/GrCopySurfaceOp.cpp b/src/gpu/ops/GrCopySurfaceOp.cpp index 9e3a521..8d8e9f1 100644 --- a/src/gpu/ops/GrCopySurfaceOp.cpp +++ b/src/gpu/ops/GrCopySurfaceOp.cpp
@@ -81,7 +81,7 @@ return nullptr; } - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<GrCopySurfaceOp>(dstProxy, srcProxy, clippedSrcRect, clippedDstPoint); }
diff --git a/src/gpu/ops/GrDashOp.cpp b/src/gpu/ops/GrDashOp.cpp index beed368..1cc378c 100644 --- a/src/gpu/ops/GrDashOp.cpp +++ b/src/gpu/ops/GrDashOp.cpp
@@ -215,7 +215,7 @@ SkPaint::Cap cap, AAMode aaMode, bool fullDash, const GrUserStencilSettings* stencilSettings) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<DashOp>(std::move(paint), geometry, cap, aaMode, fullDash, stencilSettings);
diff --git a/src/gpu/ops/GrDebugMarkerOp.cpp b/src/gpu/ops/GrDebugMarkerOp.cpp index ebeba8c..a6d06dce1 100644 --- a/src/gpu/ops/GrDebugMarkerOp.cpp +++ b/src/gpu/ops/GrDebugMarkerOp.cpp
@@ -17,7 +17,7 @@ std::unique_ptr<GrOp> GrDebugMarkerOp::Make(GrContext* context, GrRenderTargetProxy* proxy, const SkString& str) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<GrDebugMarkerOp>(proxy, str); }
diff --git a/src/gpu/ops/GrDrawPathOp.cpp b/src/gpu/ops/GrDrawPathOp.cpp index 8d02106..e162b05 100644 --- a/src/gpu/ops/GrDrawPathOp.cpp +++ b/src/gpu/ops/GrDrawPathOp.cpp
@@ -68,7 +68,7 @@ GrPaint&& paint, GrAAType aaType, GrPath* path) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<GrDrawPathOp>(viewMatrix, std::move(paint), aaType, path); }
diff --git a/src/gpu/ops/GrDrawVerticesOp.cpp b/src/gpu/ops/GrDrawVerticesOp.cpp index 6a84c3f..bdcc20c 100644 --- a/src/gpu/ops/GrDrawVerticesOp.cpp +++ b/src/gpu/ops/GrDrawVerticesOp.cpp
@@ -609,7 +609,7 @@ do { type = GrPrimitiveType(random->nextULessThan(kNumGrPrimitiveTypes)); } while (GrPrimTypeRequiresGeometryShaderSupport(type) && - !context->contextPriv().caps()->shaderCaps()->geometryShaderSupport()); + !context->priv().caps()->shaderCaps()->geometryShaderSupport()); uint32_t primitiveCount = random->nextRangeU(1, 100);
diff --git a/src/gpu/ops/GrDrawableOp.cpp b/src/gpu/ops/GrDrawableOp.cpp index 1b0bbd2..834fedd 100644 --- a/src/gpu/ops/GrDrawableOp.cpp +++ b/src/gpu/ops/GrDrawableOp.cpp
@@ -17,7 +17,7 @@ std::unique_ptr<GrDrawableOp> GrDrawableOp::Make( GrContext* context, std::unique_ptr<SkDrawable::GpuDrawHandler> drawable, const SkRect& bounds) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<GrDrawableOp>(std::move(drawable), bounds); }
diff --git a/src/gpu/ops/GrLatticeOp.cpp b/src/gpu/ops/GrLatticeOp.cpp index 6b9a448..948b7db 100644 --- a/src/gpu/ops/GrLatticeOp.cpp +++ b/src/gpu/ops/GrLatticeOp.cpp
@@ -398,8 +398,8 @@ GrSurfaceOrigin origin = random->nextBool() ? kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin; const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); - auto proxy = context->contextPriv().proxyProvider()->createProxy( + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + auto proxy = context->priv().proxyProvider()->createProxy( format, desc, origin, SkBackingFit::kExact, SkBudgeted::kYes); do {
diff --git a/src/gpu/ops/GrSemaphoreOp.cpp b/src/gpu/ops/GrSemaphoreOp.cpp index b0a96eb..7160f20 100644 --- a/src/gpu/ops/GrSemaphoreOp.cpp +++ b/src/gpu/ops/GrSemaphoreOp.cpp
@@ -20,7 +20,7 @@ static std::unique_ptr<GrOp> Make(GrContext* context, sk_sp<GrSemaphore> semaphore, GrRenderTargetProxy* proxy) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<GrWaitSemaphoreOp>(std::move(semaphore), proxy); }
diff --git a/src/gpu/ops/GrShadowRRectOp.cpp b/src/gpu/ops/GrShadowRRectOp.cpp index fdbb82d..dd091a3 100644 --- a/src/gpu/ops/GrShadowRRectOp.cpp +++ b/src/gpu/ops/GrShadowRRectOp.cpp
@@ -640,7 +640,7 @@ SkScalar scaledRadius = SkScalarAbs(radius*matrixFactor); SkScalar scaledInsetWidth = SkScalarAbs(insetWidth*matrixFactor); - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<ShadowCircularRRectOp>(color, bounds, scaledRadius,
diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelper.h b/src/gpu/ops/GrSimpleMeshDrawOpHelper.h index f9c6f41..8ed33af 100644 --- a/src/gpu/ops/GrSimpleMeshDrawOpHelper.h +++ b/src/gpu/ops/GrSimpleMeshDrawOpHelper.h
@@ -196,7 +196,7 @@ std::unique_ptr<GrDrawOp> GrSimpleMeshDrawOpHelper::FactoryHelper(GrContext* context, GrPaint&& paint, OpArgs... opArgs) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); MakeArgs makeArgs;
diff --git a/src/gpu/ops/GrSmallPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp index 3eb884b..5132319 100644 --- a/src/gpu/ops/GrSmallPathRenderer.cpp +++ b/src/gpu/ops/GrSmallPathRenderer.cpp
@@ -873,9 +873,9 @@ SkASSERT(args.fShape->hasUnstyledKey()); if (!fAtlas) { const GrBackendFormat format = - args.fContext->contextPriv().caps()->getBackendFormatFromColorType( + args.fContext->priv().caps()->getBackendFormatFromColorType( kAlpha_8_SkColorType); - fAtlas = GrDrawOpAtlas::Make(args.fContext->contextPriv().proxyProvider(), + fAtlas = GrDrawOpAtlas::Make(args.fContext->priv().proxyProvider(), format, kAlpha_8_GrPixelConfig, ATLAS_TEXTURE_WIDTH, ATLAS_TEXTURE_HEIGHT, @@ -960,12 +960,12 @@ using PathTestStruct = GrSmallPathRenderer::PathTestStruct; static PathTestStruct gTestStruct; - if (context->contextPriv().contextID() != gTestStruct.fContextID) { - gTestStruct.fContextID = context->contextPriv().contextID(); + if (context->priv().contextID() != gTestStruct.fContextID) { + gTestStruct.fContextID = context->priv().contextID(); gTestStruct.reset(); const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); - gTestStruct.fAtlas = GrDrawOpAtlas::Make(context->contextPriv().proxyProvider(), + context->priv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); + gTestStruct.fAtlas = GrDrawOpAtlas::Make(context->priv().proxyProvider(), format, kAlpha_8_GrPixelConfig, ATLAS_TEXTURE_WIDTH, ATLAS_TEXTURE_HEIGHT, PLOT_WIDTH, PLOT_HEIGHT,
diff --git a/src/gpu/ops/GrStencilPathOp.cpp b/src/gpu/ops/GrStencilPathOp.cpp index 0366d8c..7d913ea 100644 --- a/src/gpu/ops/GrStencilPathOp.cpp +++ b/src/gpu/ops/GrStencilPathOp.cpp
@@ -21,7 +21,7 @@ bool hasStencilClip, const GrScissorState& scissor, const GrPath* path) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<GrStencilPathOp>(viewMatrix, useHWAA, fillType, hasStencilClip, scissor, path);
diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp index a31e695..4ebe9f6 100644 --- a/src/gpu/ops/GrTextureOp.cpp +++ b/src/gpu/ops/GrTextureOp.cpp
@@ -107,7 +107,7 @@ SkCanvas::SrcRectConstraint constraint, const SkMatrix& viewMatrix, sk_sp<GrColorSpaceXform> textureColorSpaceXform) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<TextureOp>( std::move(proxy), filter, color, srcRect, dstRect, aaType, aaFlags, constraint, @@ -119,7 +119,7 @@ const SkMatrix& viewMatrix, sk_sp<GrColorSpaceXform> textureColorSpaceXform) { size_t size = sizeof(TextureOp) + sizeof(Proxy) * (cnt - 1); - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); void* mem = pool->allocate(size); return std::unique_ptr<GrDrawOp>(new (mem) TextureOp(set, cnt, filter, aaType, viewMatrix, std::move(textureColorSpaceXform))); @@ -604,9 +604,9 @@ } const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(format, desc, origin, mipMapped, fit, SkBudgeted::kNo, GrInternalSurfaceFlags::kNone);
diff --git a/src/gpu/text/GrAtlasManager.cpp b/src/gpu/text/GrAtlasManager.cpp index c1fbe3d..3b597a3 100644 --- a/src/gpu/text/GrAtlasManager.cpp +++ b/src/gpu/text/GrAtlasManager.cpp
@@ -109,8 +109,7 @@ return false; } - sk_sp<GrSurfaceContext> sContext(context->contextPriv().makeWrappedSurfaceContext( - sk_ref_sp(sProxy))); + sk_sp<GrSurfaceContext> sContext(context->priv().makeWrappedSurfaceContext(sk_ref_sp(sProxy))); if (!sContext || !sContext->asTextureProxy()) { return false; }
diff --git a/src/gpu/text/GrTextContext.cpp b/src/gpu/text/GrTextContext.cpp index 5169496..bf6b23980 100644 --- a/src/gpu/text/GrTextContext.cpp +++ b/src/gpu/text/GrTextContext.cpp
@@ -216,10 +216,10 @@ } const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); // Setup dummy SkPaint / GrPaint / GrRenderTargetContext - sk_sp<GrRenderTargetContext> rtc(context->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc(context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, 1024, 1024, kRGBA_8888_GrPixelConfig, nullptr)); SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp index 2f66805..28c7b2a 100644 --- a/src/gpu/vk/GrVkGpu.cpp +++ b/src/gpu/vk/GrVkGpu.cpp
@@ -2391,7 +2391,7 @@ } void GrVkGpu::storeVkPipelineCacheData() { - if (this->getContext()->contextPriv().getPersistentCache()) { + if (this->getContext()->priv().getPersistentCache()) { this->resourceProvider().storePipelineCacheData(); } }
diff --git a/src/gpu/vk/GrVkGpuCommandBuffer.cpp b/src/gpu/vk/GrVkGpuCommandBuffer.cpp index dff99f2..33c4cd9 100644 --- a/src/gpu/vk/GrVkGpuCommandBuffer.cpp +++ b/src/gpu/vk/GrVkGpuCommandBuffer.cpp
@@ -271,7 +271,7 @@ SkASSERT(!fRenderTarget); SkASSERT(fCommandBufferInfos.empty()); SkASSERT(-1 == fCurrentCmdInfo); - SkASSERT(fGpu == rt->getContext()->contextPriv().getGpu()); + SkASSERT(fGpu == rt->getContext()->priv().getGpu()); SkASSERT(!fLastPipelineState); this->INHERITED::set(rt, origin);
diff --git a/src/gpu/vk/GrVkPipelineStateBuilder.cpp b/src/gpu/vk/GrVkPipelineStateBuilder.cpp index b6097df..400c1e9 100644 --- a/src/gpu/vk/GrVkPipelineStateBuilder.cpp +++ b/src/gpu/vk/GrVkPipelineStateBuilder.cpp
@@ -222,7 +222,7 @@ SkASSERT(offset == dataLength); - this->gpu()->getContext()->contextPriv().getPersistentCache()->store( + this->gpu()->getContext()->priv().getPersistentCache()->store( *key, *SkData::MakeWithoutCopy(data.get(), dataLength)); } @@ -277,11 +277,11 @@ settings.fCaps = this->caps()->shaderCaps(); settings.fFlipY = this->origin() != kTopLeft_GrSurfaceOrigin; settings.fSharpenTextures = - this->gpu()->getContext()->contextPriv().options().fSharpenMipmappedTextures; + this->gpu()->getContext()->priv().options().fSharpenMipmappedTextures; SkASSERT(!this->fragColorIsInOut()); sk_sp<SkData> cached; - auto persistentCache = fGpu->getContext()->contextPriv().getPersistentCache(); + auto persistentCache = fGpu->getContext()->priv().getPersistentCache(); if (persistentCache) { sk_sp<SkData> key = SkData::MakeWithoutCopy(desc->asKey(), desc->shaderKeyLength()); cached = persistentCache->load(*key);
diff --git a/src/gpu/vk/GrVkResourceProvider.cpp b/src/gpu/vk/GrVkResourceProvider.cpp index 042cbc9..e232e4e 100644 --- a/src/gpu/vk/GrVkResourceProvider.cpp +++ b/src/gpu/vk/GrVkResourceProvider.cpp
@@ -44,7 +44,7 @@ createInfo.pNext = nullptr; createInfo.flags = 0; - auto persistentCache = fGpu->getContext()->contextPriv().getPersistentCache(); + auto persistentCache = fGpu->getContext()->priv().getPersistentCache(); sk_sp<SkData> cached; if (persistentCache) { uint32_t key = GrVkGpu::kPipelineCache_PersistentCacheKeyType; @@ -386,7 +386,7 @@ } void GrVkResourceProvider::destroyResources(bool deviceLost) { - SkTaskGroup* taskGroup = fGpu->getContext()->contextPriv().getTaskGroup(); + SkTaskGroup* taskGroup = fGpu->getContext()->priv().getTaskGroup(); if (taskGroup) { taskGroup->wait(); } @@ -447,7 +447,7 @@ } void GrVkResourceProvider::abandonResources() { - SkTaskGroup* taskGroup = fGpu->getContext()->contextPriv().getTaskGroup(); + SkTaskGroup* taskGroup = fGpu->getContext()->priv().getTaskGroup(); if (taskGroup) { taskGroup->wait(); } @@ -509,7 +509,7 @@ void GrVkResourceProvider::backgroundReset(GrVkCommandPool* pool) { SkASSERT(pool->unique()); pool->releaseResources(fGpu); - SkTaskGroup* taskGroup = fGpu->getContext()->contextPriv().getTaskGroup(); + SkTaskGroup* taskGroup = fGpu->getContext()->priv().getTaskGroup(); if (taskGroup) { taskGroup->add([this, pool]() { this->reset(pool); @@ -544,7 +544,7 @@ uint32_t key = GrVkGpu::kPipelineCache_PersistentCacheKeyType; sk_sp<SkData> keyData = SkData::MakeWithoutCopy(&key, sizeof(uint32_t)); - fGpu->getContext()->contextPriv().getPersistentCache()->store( + fGpu->getContext()->priv().getPersistentCache()->store( *keyData, *SkData::MakeWithoutCopy(data.get(), dataSize)); }
diff --git a/src/gpu/vk/GrVkSecondaryCBDrawContext.cpp b/src/gpu/vk/GrVkSecondaryCBDrawContext.cpp index 35d6353..7618141 100644 --- a/src/gpu/vk/GrVkSecondaryCBDrawContext.cpp +++ b/src/gpu/vk/GrVkSecondaryCBDrawContext.cpp
@@ -28,7 +28,7 @@ } sk_sp<GrRenderTargetContext> rtc( - ctx->contextPriv().makeVulkanSecondaryCBRenderTargetContext(imageInfo, vkInfo, props)); + ctx->priv().makeVulkanSecondaryCBRenderTargetContext(imageInfo, vkInfo, props)); int width = rtc->width(); int height = rtc->height();
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp index ba8a132..9b91bc8 100644 --- a/src/image/SkImage_Gpu.cpp +++ b/src/image/SkImage_Gpu.cpp
@@ -74,7 +74,7 @@ } sk_sp<GrRenderTargetContext> renderTargetContext( - fContext->contextPriv().makeDeferredRenderTargetContextWithFallback( + fContext->priv().makeDeferredRenderTargetContextWithFallback( format, SkBackingFit::kExact, this->width(), this->height(), SkColorType2GrPixelConfig(targetCT), nullptr)); if (!renderTargetContext) { @@ -112,7 +112,7 @@ return nullptr; } - GrProxyProvider* proxyProvider = ctx->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = ctx->priv().proxyProvider(); sk_sp<GrTextureProxy> proxy = proxyProvider->wrapBackendTexture(backendTex, origin, ownership, GrWrapCacheable::kNo, kRead_GrIOType, releaseProc, releaseCtx); @@ -142,7 +142,7 @@ const GrBackendTexture& tex, GrSurfaceOrigin origin, SkColorType ct, SkAlphaType at, sk_sp<SkColorSpace> cs) { - if (!ctx || !ctx->contextPriv().resourceProvider()) { + if (!ctx || !ctx->priv().resourceProvider()) { // We have a DDL context and we don't support adopted textures for them. return nullptr; } @@ -171,7 +171,7 @@ } desc.fSampleCnt = 1; - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(std::move(data), desc); if (!proxy) { @@ -224,11 +224,11 @@ const int height = imageSize.height(); const GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); // Needs to create a render target in order to draw to it for the yuv->rgb conversion. sk_sp<GrRenderTargetContext> renderTargetContext( - ctx->contextPriv().makeDeferredRenderTargetContext( + ctx->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, width, height, kRGBA_8888_GrPixelConfig, std::move(imageColorSpace), 1, GrMipMapped::kNo, imageOrigin)); if (!renderTargetContext) { @@ -259,9 +259,9 @@ // Needs to create a render target with external texture // in order to draw to it for the yuv->rgb conversion. sk_sp<GrRenderTargetContext> renderTargetContext( - ctx->contextPriv().makeBackendTextureRenderTargetContext(backendTextureCopy, - imageOrigin, 1, - std::move(imageColorSpace))); + ctx->priv().makeBackendTextureRenderTargetContext(backendTextureCopy, + imageOrigin, 1, + std::move(imageColorSpace))); if (!renderTargetContext) { return nullptr; @@ -351,7 +351,7 @@ return nullptr; } if (uint32_t incumbentID = as_IB(this)->contextID()) { - if (incumbentID != context->contextPriv().contextID()) { + if (incumbentID != context->priv().contextID()) { return nullptr; } sk_sp<GrTextureProxy> proxy = as_IB(this)->asTextureProxyRef(); @@ -417,7 +417,7 @@ } GrPixelConfig config = - context->contextPriv().caps()->getConfigFromBackendFormat(backendFormat, colorType); + context->priv().caps()->getConfigFromBackendFormat(backendFormat, colorType); if (config == kUnknown_GrPixelConfig) { return nullptr; } @@ -444,11 +444,11 @@ } // Some backends or drivers don't support (safely) moving resources between contexts - if (!context || !context->contextPriv().caps()->crossContextTextureSupport()) { + if (!context || !context->priv().caps()->crossContextTextureSupport()) { return codecImage; } - auto maxTextureSize = context->contextPriv().caps()->maxTextureSize(); + auto maxTextureSize = context->priv().caps()->maxTextureSize(); if (limitToMaxTextureSize && (codecImage->width() > maxTextureSize || codecImage->height() > maxTextureSize)) { SkAutoPixmapStorage pmap; @@ -472,15 +472,15 @@ return codecImage; } - if (!proxy->instantiate(context->contextPriv().resourceProvider())) { + if (!proxy->instantiate(context->priv().resourceProvider())) { return codecImage; } sk_sp<GrTexture> texture = sk_ref_sp(proxy->peekTexture()); // Flush any writes or uploads - context->contextPriv().prepareSurfaceForExternalIO(proxy.get()); + context->priv().prepareSurfaceForExternalIO(proxy.get()); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); sk_sp<GrSemaphore> sema = gpu->prepareTextureForCrossContextUsage(texture.get()); auto gen = GrBackendTextureImageGenerator::Make(std::move(texture), proxy->origin(), @@ -496,20 +496,20 @@ SkColorSpace* dstColorSpace, bool limitToMaxTextureSize) { // Some backends or drivers don't support (safely) moving resources between contexts - if (!context || !context->contextPriv().caps()->crossContextTextureSupport()) { + if (!context || !context->priv().caps()->crossContextTextureSupport()) { return SkImage::MakeRasterCopy(originalPixmap); } // If we don't have access to the resource provider and gpu (i.e. in a DDL context) we will not // be able to make everything needed for a GPU CrossContext image. Thus return a raster copy // instead. - if (!context->contextPriv().resourceProvider()) { + if (!context->priv().resourceProvider()) { return SkImage::MakeRasterCopy(originalPixmap); } const SkPixmap* pixmap = &originalPixmap; SkAutoPixmapStorage resized; - int maxTextureSize = context->contextPriv().caps()->maxTextureSize(); + int maxTextureSize = context->priv().caps()->maxTextureSize(); int maxDim = SkTMax(originalPixmap.width(), originalPixmap.height()); if (limitToMaxTextureSize && maxDim > maxTextureSize) { float scale = static_cast<float>(maxTextureSize) / maxDim; @@ -521,7 +521,7 @@ } pixmap = &resized; } - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); // Turn the pixmap into a GrTextureProxy sk_sp<GrTextureProxy> proxy; if (buildMips) { @@ -547,8 +547,8 @@ sk_sp<GrTexture> texture = sk_ref_sp(proxy->peekTexture()); // Flush any writes or uploads - context->contextPriv().prepareSurfaceForExternalIO(proxy.get()); - GrGpu* gpu = context->contextPriv().getGpu(); + context->priv().prepareSurfaceForExternalIO(proxy.get()); + GrGpu* gpu = context->priv().getGpu(); sk_sp<GrSemaphore> sema = gpu->prepareTextureForCrossContextUsage(texture.get()); @@ -597,7 +597,7 @@ } // Flush any pending IO on the texture. - ctx->contextPriv().prepareSurfaceForExternalIO(as_IB(image)->peekProxy()); + ctx->priv().prepareSurfaceForExternalIO(as_IB(image)->peekProxy()); SkASSERT(!texture->surfacePriv().hasPendingIO()); // We must make a copy of the image if the image is not unique, if the GrTexture owned by the @@ -616,7 +616,7 @@ } // Flush to ensure that the copy is completed before we return the texture. - ctx->contextPriv().prepareSurfaceForExternalIO(as_IB(image)->peekProxy()); + ctx->priv().prepareSurfaceForExternalIO(as_IB(image)->peekProxy()); SkASSERT(!texture->surfacePriv().hasPendingIO()); }
diff --git a/src/image/SkImage_GpuBase.cpp b/src/image/SkImage_GpuBase.cpp index 54ef66a..9c86d29 100644 --- a/src/image/SkImage_GpuBase.cpp +++ b/src/image/SkImage_GpuBase.cpp
@@ -33,7 +33,7 @@ #if GR_TEST_UTILS void SkImage_GpuBase::resetContext(sk_sp<GrContext> newContext) { - SkASSERT(fContext->contextPriv().contextID() == newContext->contextPriv().contextID()); + SkASSERT(fContext->priv().contextID() == newContext->priv().contextID()); fContext = newContext; } #endif @@ -54,18 +54,18 @@ if (!backendFormat.isValid()) { return false; } - *config = ctx->contextPriv().caps()->getConfigFromBackendFormat(backendFormat, ct); + *config = ctx->priv().caps()->getConfigFromBackendFormat(backendFormat, ct); return *config != kUnknown_GrPixelConfig; } ////////////////////////////////////////////////////////////////////////////////////////////////// uint32_t SkImage_GpuBase::contextID() const { - return fContext->contextPriv().contextID(); + return fContext->priv().contextID(); } bool SkImage_GpuBase::getROPixels(SkBitmap* dst, CachingHint chint) const { - if (!fContext->contextPriv().resourceProvider()) { + if (!fContext->priv().resourceProvider()) { // DDL TODO: buffer up the readback so it occurs when the DDL is drawn? return false; } @@ -90,7 +90,7 @@ } } - sk_sp<GrSurfaceContext> sContext = fContext->contextPriv().makeWrappedSurfaceContext( + sk_sp<GrSurfaceContext> sContext = fContext->priv().makeWrappedSurfaceContext( this->asTextureProxyRef(), fColorSpace); if (!sContext) { @@ -122,7 +122,7 @@ } // TODO: Should this inherit our proxy's budgeted status? - sk_sp<GrSurfaceContext> sContext(fContext->contextPriv().makeDeferredSurfaceContext( + sk_sp<GrSurfaceContext> sContext(fContext->priv().makeDeferredSurfaceContext( format, desc, proxy->origin(), GrMipMapped::kNo, SkBackingFit::kExact, proxy->isBudgeted())); if (!sContext) { @@ -162,7 +162,7 @@ bool SkImage_GpuBase::onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB, int srcX, int srcY, CachingHint) const { - if (!fContext->contextPriv().resourceProvider()) { + if (!fContext->priv().resourceProvider()) { // DDL TODO: buffer up the readback so it occurs when the DDL is drawn? return false; } @@ -184,7 +184,7 @@ flags = GrContextPriv::kUnpremul_PixelOpsFlag; } - sk_sp<GrSurfaceContext> sContext = fContext->contextPriv().makeWrappedSurfaceContext( + sk_sp<GrSurfaceContext> sContext = fContext->priv().makeWrappedSurfaceContext( this->asTextureProxyRef(), fColorSpace); if (!sContext) { return false; @@ -211,7 +211,7 @@ sk_sp<GrTextureProxy> SkImage_GpuBase::asTextureProxyRef(GrContext* context, const GrSamplerState& params, SkScalar scaleAdjust[2]) const { - if (context->contextPriv().contextID() != fContext->contextPriv().contextID()) { + if (context->priv().contextID() != fContext->priv().contextID()) { SkASSERT(0); return nullptr; } @@ -226,12 +226,12 @@ sk_sp<GrTextureProxy> proxy = this->asTextureProxyRef(); SkASSERT(proxy); - if (!fContext->contextPriv().resourceProvider() && !proxy->isInstantiated()) { + if (!fContext->priv().resourceProvider() && !proxy->isInstantiated()) { // This image was created with a DDL context and cannot be instantiated. return GrBackendTexture(); } - if (!proxy->instantiate(fContext->contextPriv().resourceProvider())) { + if (!proxy->instantiate(fContext->priv().resourceProvider())) { return GrBackendTexture(); // invalid } @@ -239,7 +239,7 @@ if (texture) { if (flushPendingGrContextIO) { - fContext->contextPriv().prepareSurfaceForExternalIO(proxy.get()); + fContext->priv().prepareSurfaceForExternalIO(proxy.get()); } if (origin) { *origin = proxy->origin(); @@ -256,12 +256,12 @@ } sk_sp<GrTextureProxy> proxyRef = this->asTextureProxyRef(); - if (!fContext->contextPriv().resourceProvider() && !proxyRef->isInstantiated()) { + if (!fContext->priv().resourceProvider() && !proxyRef->isInstantiated()) { // This image was created with a DDL context and cannot be instantiated. return nullptr; } - if (!proxy->instantiate(fContext->contextPriv().resourceProvider())) { + if (!proxy->instantiate(fContext->priv().resourceProvider())) { return nullptr; } @@ -285,7 +285,7 @@ int numTextures, const SkYUVAIndex yuvaIndices[4], GrSurfaceOrigin imageOrigin, sk_sp<GrTextureProxy> tempTextureProxies[4]) { - GrProxyProvider* proxyProvider = ctx->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = ctx->priv().proxyProvider(); // We need to make a copy of the input backend textures because we need to preserve the result // of validate_backend_texture. @@ -297,7 +297,7 @@ return false; } yuvaTexturesCopy[textureIndex].fConfig = - ctx->contextPriv().caps()->getYUVAConfigFromBackendFormat(backendFormat); + ctx->priv().caps()->getYUVAConfigFromBackendFormat(backendFormat); if (yuvaTexturesCopy[textureIndex].fConfig == kUnknown_GrPixelConfig) { return false; } @@ -360,7 +360,7 @@ renderTargetContext->drawRect(GrNoClip(), std::move(paint), GrAA::kNo, SkMatrix::I(), rect); // DDL TODO: in the promise image version we must not flush here - ctx->contextPriv().flushSurfaceWrites(renderTargetContext->asSurfaceProxy()); + ctx->priv().flushSurfaceWrites(renderTargetContext->asSurfaceProxy()); return true; } @@ -509,8 +509,8 @@ } tex->resourcePriv().setUniqueKey(fLastFulfilledKey); SkASSERT(fContextID == SK_InvalidUniqueID || - fContextID == tex->getContext()->contextPriv().contextID()); - fContextID = tex->getContext()->contextPriv().contextID(); + fContextID == tex->getContext()->priv().contextID()); + fContextID = tex->getContext()->priv().contextID(); promiseTexture->addKeyToInvalidate(fContextID, fLastFulfilledKey); return std::move(tex); } @@ -602,7 +602,7 @@ GrUniqueKey fLastFulfilledKey; } callback(fulfillProc, releaseProc, doneProc, textureContext, delayReleaseCallback, config); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); GrSurfaceDesc desc; desc.fWidth = width;
diff --git a/src/image/SkImage_GpuYUVA.cpp b/src/image/SkImage_GpuYUVA.cpp index 9b44a3e..3c4fda4 100644 --- a/src/image/SkImage_GpuYUVA.cpp +++ b/src/image/SkImage_GpuYUVA.cpp
@@ -82,7 +82,7 @@ for (int i = 0; i < fNumProxies; ++i) { GrTextureProducer::CopyParams copyParams; int mipCount = SkMipMap::ComputeLevelCount(fProxies[i]->width(), fProxies[i]->height()); - if (mipCount && GrGpu::IsACopyNeededForMips(fContext->contextPriv().caps(), + if (mipCount && GrGpu::IsACopyNeededForMips(fContext->priv().caps(), fProxies[i].get(), GrSamplerState::Filter::kMipMap, ©Params)) { @@ -101,11 +101,11 @@ sk_sp<GrTextureProxy> SkImage_GpuYUVA::asTextureProxyRef() const { if (!fRGBProxy) { const GrBackendFormat format = - fContext->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + fContext->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); // Needs to create a render target in order to draw to it for the yuv->rgb conversion. sk_sp<GrRenderTargetContext> renderTargetContext( - fContext->contextPriv().makeDeferredRenderTargetContext( + fContext->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, this->width(), this->height(), kRGBA_8888_GrPixelConfig, fColorSpace, 1, GrMipMapped::kNo, fOrigin)); if (!renderTargetContext) { @@ -195,12 +195,12 @@ } // Make proxies - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); sk_sp<GrTextureProxy> tempTextureProxies[4]; for (int i = 0; i < numPixmaps; ++i) { const SkPixmap* pixmap = &yuvaPixmaps[i]; SkAutoPixmapStorage resized; - int maxTextureSize = context->contextPriv().caps()->maxTextureSize(); + int maxTextureSize = context->priv().caps()->maxTextureSize(); int maxDim = SkTMax(yuvaPixmaps[i].width(), yuvaPixmaps[i].height()); if (limitToMaxTextureSize && maxDim > maxTextureSize) { float scale = static_cast<float>(maxTextureSize) / maxDim; @@ -314,7 +314,7 @@ sk_sp<GrTextureProxy> proxies[4]; for (int texIdx = 0; texIdx < numTextures; ++texIdx) { GrPixelConfig config = - context->contextPriv().caps()->getYUVAConfigFromBackendFormat(yuvaFormats[texIdx]); + context->priv().caps()->getYUVAConfigFromBackendFormat(yuvaFormats[texIdx]); if (config == kUnknown_GrPixelConfig) { return nullptr; }
diff --git a/src/image/SkImage_Lazy.cpp b/src/image/SkImage_Lazy.cpp index 682db3a..47bf690 100644 --- a/src/image/SkImage_Lazy.cpp +++ b/src/image/SkImage_Lazy.cpp
@@ -389,7 +389,7 @@ GrUniqueKey key; this->makeCacheKeyFromOrigKey(origKey, &key); - GrProxyProvider* proxyProvider = ctx->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = ctx->priv().proxyProvider(); sk_sp<GrTextureProxy> proxy; // 1. Check the cache for a pre-existing one @@ -417,7 +417,7 @@ set_key_on_proxy(proxyProvider, proxy.get(), nullptr, key); if (!willBeMipped || GrMipMapped::kYes == proxy->mipMapped()) { *fUniqueKeyInvalidatedMessages.append() = - new GrUniqueKeyInvalidatedMessage(key, ctx->contextPriv().contextID()); + new GrUniqueKeyInvalidatedMessage(key, ctx->priv().contextID()); return proxy; } } @@ -425,12 +425,12 @@ // 3. Ask the generator to return YUV planes, which the GPU can convert. If we will be mipping // the texture we fall through here and have the CPU generate the mip maps for us. - if (!proxy && !willBeMipped && !ctx->contextPriv().options().fDisableGpuYUVConversion) { + if (!proxy && !willBeMipped && !ctx->priv().options().fDisableGpuYUVConversion) { const GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(fInfo); SkColorType colorType = fInfo.colorType(); GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(colorType); + ctx->priv().caps()->getBackendFormatFromColorType(colorType); ScopedGenerator generator(fSharedGenerator); Generator_GrYUVProvider provider(generator); @@ -450,7 +450,7 @@ kLockTexturePathCount); set_key_on_proxy(proxyProvider, proxy.get(), nullptr, key); *fUniqueKeyInvalidatedMessages.append() = - new GrUniqueKeyInvalidatedMessage(key, ctx->contextPriv().contextID()); + new GrUniqueKeyInvalidatedMessage(key, ctx->priv().contextID()); return proxy; } } @@ -469,7 +469,7 @@ kLockTexturePathCount); set_key_on_proxy(proxyProvider, proxy.get(), nullptr, key); *fUniqueKeyInvalidatedMessages.append() = - new GrUniqueKeyInvalidatedMessage(key, ctx->contextPriv().contextID()); + new GrUniqueKeyInvalidatedMessage(key, ctx->priv().contextID()); return proxy; } } @@ -482,7 +482,7 @@ SkASSERT(willBeMipped); SkASSERT(GrMipMapped::kNo == proxy->mipMapped()); *fUniqueKeyInvalidatedMessages.append() = - new GrUniqueKeyInvalidatedMessage(key, ctx->contextPriv().contextID()); + new GrUniqueKeyInvalidatedMessage(key, ctx->priv().contextID()); if (auto mippedProxy = GrCopyBaseMipMapToTextureProxy(ctx, proxy.get())) { set_key_on_proxy(proxyProvider, mippedProxy.get(), proxy.get(), key); return mippedProxy;
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp index 8890382..89959f1 100644 --- a/src/image/SkSurface_Gpu.cpp +++ b/src/image/SkSurface_Gpu.cpp
@@ -261,7 +261,7 @@ GrRenderTargetContext* rtc = fDevice->accessRenderTargetContext(); GrContext* ctx = fDevice->context(); - ctx->contextPriv().copyOpListsFromDDL(ddl, rtc->asRenderTargetProxy()); + ctx->priv().copyOpListsFromDDL(ddl, rtc->asRenderTargetProxy()); return true; } @@ -294,7 +294,7 @@ return nullptr; } - if (!SkSurface_Gpu::Valid(context->contextPriv().caps(), c.config(), c.colorSpace())) { + if (!SkSurface_Gpu::Valid(context->priv().caps(), c.config(), c.colorSpace())) { return nullptr; } @@ -308,14 +308,14 @@ desc.fSampleCnt = c.stencilCount(); const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(c.colorType()); + context->priv().caps()->getBackendFormatFromColorType(c.colorType()); sk_sp<GrSurfaceContext> sc( - context->contextPriv().makeDeferredSurfaceContext(format, desc, c.origin(), - GrMipMapped(c.isMipMapped()), - SkBackingFit::kExact, budgeted, - c.refColorSpace(), - &c.surfaceProps())); + context->priv().makeDeferredSurfaceContext(format, desc, c.origin(), + GrMipMapped(c.isMipMapped()), + SkBackingFit::kExact, budgeted, + c.refColorSpace(), + &c.surfaceProps())); if (!sc || !sc->asRenderTargetContext()) { return nullptr; } @@ -352,7 +352,7 @@ sampleCount = SkTMax(1, sampleCount); GrMipMapped mipMapped = shouldCreateWithMips ? GrMipMapped::kYes : GrMipMapped::kNo; - if (!ctx->contextPriv().caps()->mipMapSupport()) { + if (!ctx->priv().caps()->mipMapSupport()) { mipMapped = GrMipMapped::kNo; } @@ -400,18 +400,18 @@ if (!backendFormat.isValid()) { return false; } - *config = ctx->contextPriv().caps()->getConfigFromBackendFormat(backendFormat, ct); + *config = ctx->priv().caps()->getConfigFromBackendFormat(backendFormat, ct); if (*config == kUnknown_GrPixelConfig) { return false; } // We don't require that the client gave us an exact valid sample cnt. However, it must be // less than the max supported sample count and 1 if MSAA is unsupported for the color type. - if (!ctx->contextPriv().caps()->getRenderTargetSampleCount(sampleCnt, *config)) { + if (!ctx->priv().caps()->getRenderTargetSampleCount(sampleCnt, *config)) { return false; } - if (texturable && !ctx->contextPriv().caps()->isConfigTexturable(*config)) { + if (texturable && !ctx->priv().caps()->isConfigTexturable(*config)) { return false; } return true; @@ -435,12 +435,12 @@ if (!context) { return nullptr; } - if (!SkSurface_Gpu::Valid(context->contextPriv().caps(), texCopy.config(), colorSpace.get())) { + if (!SkSurface_Gpu::Valid(context->priv().caps(), texCopy.config(), colorSpace.get())) { return nullptr; } sampleCnt = SkTMax(1, sampleCnt); - sk_sp<GrRenderTargetContext> rtc(context->contextPriv().makeBackendTextureRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc(context->priv().makeBackendTextureRenderTargetContext( texCopy, origin, sampleCnt, @@ -469,16 +469,16 @@ return false; } - *config = ctx->contextPriv().caps()->validateBackendRenderTarget(rt, ct); + *config = ctx->priv().caps()->validateBackendRenderTarget(rt, ct); if (*config == kUnknown_GrPixelConfig) { return false; } if (rt.sampleCnt() > 1) { - if (ctx->contextPriv().caps()->maxRenderTargetSampleCount(*config) <= 1) { + if (ctx->priv().caps()->maxRenderTargetSampleCount(*config) <= 1) { return false; } - } else if (!ctx->contextPriv().caps()->isConfigRenderable(*config)) { + } else if (!ctx->priv().caps()->isConfigRenderable(*config)) { return false; } @@ -499,7 +499,7 @@ if (!validate_backend_render_target(context, rtCopy, &rtCopy.fConfig, colorType, colorSpace)) { return nullptr; } - if (!SkSurface_Gpu::Valid(context->contextPriv().caps(), rtCopy.config(), colorSpace.get())) { + if (!SkSurface_Gpu::Valid(context->priv().caps(), rtCopy.config(), colorSpace.get())) { return nullptr; } @@ -508,7 +508,7 @@ } sk_sp<GrRenderTargetContext> rtc( - context->contextPriv().makeBackendRenderTargetRenderTargetContext( + context->priv().makeBackendRenderTargetRenderTargetContext( rtCopy, origin, std::move(colorSpace), props)); if (!rtc) { return nullptr; @@ -542,12 +542,12 @@ return nullptr; } - if (!SkSurface_Gpu::Valid(context->contextPriv().caps(), texCopy.config(), colorSpace.get())) { + if (!SkSurface_Gpu::Valid(context->priv().caps(), texCopy.config(), colorSpace.get())) { return nullptr; } sk_sp<GrRenderTargetContext> rtc( - context->contextPriv().makeBackendTextureAsRenderTargetRenderTargetContext( + context->priv().makeBackendTextureAsRenderTargetRenderTargetContext( texCopy, origin, sampleCnt,
diff --git a/src/shaders/SkImageShader.cpp b/src/shaders/SkImageShader.cpp index bb56061..c1d14d8 100644 --- a/src/shaders/SkImageShader.cpp +++ b/src/shaders/SkImageShader.cpp
@@ -196,7 +196,7 @@ // clamp-to-border is reset to clamp since the hw cannot implement it directly. GrTextureDomain::Mode domainX = GrTextureDomain::kIgnore_Mode; GrTextureDomain::Mode domainY = GrTextureDomain::kIgnore_Mode; - if (!args.fContext->contextPriv().caps()->clampToBorderSupport()) { + if (!args.fContext->priv().caps()->clampToBorderSupport()) { if (wrapModes[0] == GrSamplerState::WrapMode::kClampToBorder) { domainX = GrTextureDomain::kDecal_Mode; wrapModes[0] = GrSamplerState::WrapMode::kClamp; @@ -214,7 +214,7 @@ bool doBicubic; GrSamplerState::Filter textureFilterMode = GrSkFilterQualityToGrFilterMode( args.fFilterQuality, *args.fViewMatrix, *lm, - args.fContext->contextPriv().options().fSharpenMipmappedTextures, &doBicubic); + args.fContext->priv().options().fSharpenMipmappedTextures, &doBicubic); GrSamplerState samplerState(wrapModes, textureFilterMode); SkScalar scaleAdjust[2] = { 1.0f, 1.0f }; sk_sp<GrTextureProxy> proxy(as_IB(fImage)->asTextureProxyRef(args.fContext, samplerState,
diff --git a/src/shaders/SkPerlinNoiseShader.cpp b/src/shaders/SkPerlinNoiseShader.cpp index 5f4f452..011ced8 100644 --- a/src/shaders/SkPerlinNoiseShader.cpp +++ b/src/shaders/SkPerlinNoiseShader.cpp
@@ -1423,7 +1423,7 @@ m.setTranslateX(-localMatrix->getTranslateX() + SK_Scalar1); m.setTranslateY(-localMatrix->getTranslateY() + SK_Scalar1); - auto proxyProvider = args.fContext->contextPriv().proxyProvider(); + auto proxyProvider = args.fContext->priv().proxyProvider(); if (fType == kImprovedNoise_Type) { // Need to assert that the textures we'll create are power of 2 so a copy isn't needed. // We also know that we will not be using mipmaps. If things things weren't true we should
diff --git a/src/shaders/SkPictureShader.cpp b/src/shaders/SkPictureShader.cpp index 1601ab9..d14d5a4 100644 --- a/src/shaders/SkPictureShader.cpp +++ b/src/shaders/SkPictureShader.cpp
@@ -332,7 +332,7 @@ const GrFPArgs& args) const { int maxTextureSize = 0; if (args.fContext) { - maxTextureSize = args.fContext->contextPriv().caps()->maxTextureSize(); + maxTextureSize = args.fContext->priv().caps()->maxTextureSize(); } auto lm = this->totalLocalMatrix(args.fPreLocalMatrix, args.fPostLocalMatrix);
diff --git a/tests/AdvancedBlendTest.cpp b/tests/AdvancedBlendTest.cpp index 672a49d..cda9dc2 100644 --- a/tests/AdvancedBlendTest.cpp +++ b/tests/AdvancedBlendTest.cpp
@@ -15,7 +15,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(AdvancedBlendTest, reporter, ctxInfo) { static constexpr auto opaque = GrProcessorAnalysisColor::Opaque::kYes; static constexpr auto coverage = GrProcessorAnalysisCoverage::kSingleChannel; - const GrCaps& caps = *ctxInfo.grContext()->contextPriv().caps(); + const GrCaps& caps = *ctxInfo.grContext()->priv().caps(); for (int mode = (int)SkBlendMode::kLastMode; mode > (int)SkBlendMode::kLastCoeffMode; --mode) { const SkBlendMode blendMode = (SkBlendMode)mode;
diff --git a/tests/ApplyGammaTest.cpp b/tests/ApplyGammaTest.cpp index 4662de5..2b64722 100644 --- a/tests/ApplyGammaTest.cpp +++ b/tests/ApplyGammaTest.cpp
@@ -119,7 +119,7 @@ SkAutoTMalloc<uint32_t> read(kW * kH); // We allow more error on GPUs with lower precision shader variables. - float error = context->contextPriv().caps()->shaderCaps()->halfIs32Bits() ? 0.5f : 1.2f; + float error = context->priv().caps()->shaderCaps()->halfIs32Bits() ? 0.5f : 1.2f; for (auto toSRGB : { false, true }) { sk_sp<SkSurface> dst(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, ii));
diff --git a/tests/BlendTest.cpp b/tests/BlendTest.cpp index 74e6a8f..0dd5506 100644 --- a/tests/BlendTest.cpp +++ b/tests/BlendTest.cpp
@@ -97,7 +97,7 @@ backingDesc.fConfig = config; backingDesc.fSampleCnt = sampleCnt; - auto resourceProvider = context->contextPriv().resourceProvider(); + auto resourceProvider = context->priv().resourceProvider(); *backingSurface = resourceProvider->createTexture(backingDesc, SkBudgeted::kNo); if (!(*backingSurface)) {
diff --git a/tests/ClearTest.cpp b/tests/ClearTest.cpp index c9e8e54..03bfc58 100644 --- a/tests/ClearTest.cpp +++ b/tests/ClearTest.cpp
@@ -57,10 +57,9 @@ sk_sp<GrRenderTargetContext> newRTC(GrContext* context, int w, int h) { const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); - return context->contextPriv().makeDeferredRenderTargetContext( - format, SkBackingFit::kExact, w, h, - kRGBA_8888_GrPixelConfig, nullptr); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + return context->priv().makeDeferredRenderTargetContext(format, SkBackingFit::kExact, w, h, + kRGBA_8888_GrPixelConfig, nullptr); } static void clear_op_test(skiatest::Reporter* reporter, GrContext* context) {
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp index 67868de..0c3f3b2 100644 --- a/tests/ClipStackTest.cpp +++ b/tests/ClipStackTest.cpp
@@ -1040,7 +1040,7 @@ } auto context = GrContext::MakeMock(nullptr); - const GrCaps* caps = context->contextPriv().caps(); + const GrCaps* caps = context->priv().caps(); // Zero the memory we will new the GrReducedClip into. This ensures the elements gen ID // will be kInvalidGenID if left uninitialized. @@ -1111,7 +1111,7 @@ SkRect bounds = SkRect::MakeXYWH(0, 0, 100, 100); auto context = GrContext::MakeMock(nullptr); - const GrCaps* caps = context->contextPriv().caps(); + const GrCaps* caps = context->priv().caps(); SkAlignedSTStorage<1, GrReducedClip> storage; memset(storage.get(), 0, sizeof(GrReducedClip)); @@ -1200,7 +1200,7 @@ #undef XYWH #undef IXYWH auto context = GrContext::MakeMock(nullptr); - const GrCaps* caps = context->contextPriv().caps(); + const GrCaps* caps = context->priv().caps(); for (size_t i = 0; i < SK_ARRAY_COUNT(testCases); ++i) { const GrReducedClip reduced(stack, testCases[i].testBounds, caps); @@ -1228,7 +1228,7 @@ SkRect bounds = SkRect::MakeXYWH(0, 0, 100, 100); auto context = GrContext::MakeMock(nullptr); - const GrCaps* caps = context->contextPriv().caps(); + const GrCaps* caps = context->priv().caps(); // At the time, this would crash. const GrReducedClip reduced(stack, bounds, caps); @@ -1247,7 +1247,7 @@ const SkRect& preXformQuery, ClipMethod expectedMethod, int numExpectedElems = 0) { auto context = GrContext::MakeMock(nullptr); - const GrCaps* caps = context->contextPriv().caps(); + const GrCaps* caps = context->priv().caps(); SkRect queryBounds; queryXform.mapRect(&queryBounds, preXformQuery); @@ -1409,7 +1409,7 @@ pathStack.clipPath(clipPath, SkMatrix::I(), kIntersect_SkClipOp, true); auto context = GrContext::MakeMock(nullptr); - const GrCaps* caps = context->contextPriv().caps(); + const GrCaps* caps = context->priv().caps(); for (const SkClipStack& stack : {rectStack, pathStack}) { for (SkRect queryBounds : {SkRect::MakeXYWH(53, 60, GrClip::kBoundsTolerance, 1000), @@ -1499,7 +1499,7 @@ path.setFillType(SkPath::kEvenOdd_FillType); static const char* kTag = GrClipStackClip::kMaskTestTag; - GrResourceCache* cache = context->contextPriv().getResourceCache(); + GrResourceCache* cache = context->priv().getResourceCache(); static constexpr int kN = 5; @@ -1509,7 +1509,7 @@ stack.save(); stack.clipPath(path, m, SkClipOp::kIntersect, true); sk_sp<GrTextureProxy> mask = GrClipStackClip(&stack).testingOnly_createClipMask(context); - mask->instantiate(context->contextPriv().resourceProvider()); + mask->instantiate(context->priv().resourceProvider()); GrTexture* tex = mask->peekTexture(); REPORTER_ASSERT(reporter, 0 == strcmp(tex->getUniqueKey().tag(), kTag)); // Make sure mask isn't pinned in cache.
diff --git a/tests/CopySurfaceTest.cpp b/tests/CopySurfaceTest.cpp index 0080474..2e66351 100644 --- a/tests/CopySurfaceTest.cpp +++ b/tests/CopySurfaceTest.cpp
@@ -91,8 +91,7 @@ } else { GrPixelConfig config = SkColorType2GrPixelConfig(kBGRA_8888_SkColorType); - if (!context->contextPriv().caps()->isConfigTexturable( - config)) { + if (!context->priv().caps()->isConfigTexturable(config)) { continue; } if (!src || !dst) { @@ -103,8 +102,7 @@ } sk_sp<GrSurfaceContext> dstContext = - context->contextPriv().makeWrappedSurfaceContext( - std::move(dst)); + context->priv().makeWrappedSurfaceContext(std::move(dst)); bool result = dstContext->copy(src.get(), srcRect, dstPoint);
diff --git a/tests/DefaultPathRendererTest.cpp b/tests/DefaultPathRendererTest.cpp index 688ecee..9b61663 100644 --- a/tests/DefaultPathRendererTest.cpp +++ b/tests/DefaultPathRendererTest.cpp
@@ -80,9 +80,9 @@ GrStyle style(SkStrokeRec::kFill_InitStyle); GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); { - auto rtc = ctx->contextPriv().makeDeferredRenderTargetContext( + auto rtc = ctx->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, kBigSize/2+1, kBigSize/2+1, @@ -103,7 +103,7 @@ } { - auto rtc = ctx->contextPriv().makeDeferredRenderTargetContext( + auto rtc = ctx->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, kBigSize, kBigSize, kRGBA_8888_GrPixelConfig, nullptr);
diff --git a/tests/DeferredDisplayListTest.cpp b/tests/DeferredDisplayListTest.cpp index 1a84a6e..9347748 100644 --- a/tests/DeferredDisplayListTest.cpp +++ b/tests/DeferredDisplayListTest.cpp
@@ -51,7 +51,7 @@ static GrBackendFormat create_backend_format(GrContext* context, SkColorType ct, GrPixelConfig config) { - const GrCaps* caps = context->contextPriv().caps(); + const GrCaps* caps = context->priv().caps(); switch (context->backend()) { case GrBackendApi::kOpenGL: { @@ -363,7 +363,7 @@ // Create the surface with the current set of parameters sk_sp<SkSurface> make(GrContext* context, GrBackendTexture* backend) const { - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); GrMipMapped mipmapped = !fIsTextureable ? GrMipMapped::kNo @@ -420,7 +420,7 @@ return; } - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); gpu->deleteTestingOnlyBackendTexture(backend); } @@ -490,7 +490,7 @@ // This tests SkSurfaceCharacterization/SkSurface compatibility DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DDLSurfaceCharacterizationTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); // Create a bitmap that we can readback into SkImageInfo imageInfo = SkImageInfo::Make(64, 64, kRGBA_8888_SkColorType, @@ -536,7 +536,7 @@ if (SurfaceParameters::kSampleCount == i) { SkSurface_Gpu* gpuSurf = static_cast<SkSurface_Gpu*>(s.get()); - int supportedSampleCount = context->contextPriv().caps()->getRenderTargetSampleCount( + int supportedSampleCount = context->priv().caps()->getRenderTargetSampleCount( params.sampleCount(), gpuSurf->getDevice() ->accessRenderTargetContext() @@ -552,7 +552,7 @@ } if (SurfaceParameters::kMipMipCount == i && - !context->contextPriv().caps()->mipMapSupport()) { + !context->priv().caps()->mipMapSupport()) { // If changing the mipmap setting won't result in a different surface characterization, // skip this step s = nullptr; @@ -677,7 +677,7 @@ // into a textureable destination. DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DDLNonTextureabilityTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); // Create a bitmap that we can readback into SkImageInfo imageInfo = SkImageInfo::Make(64, 64, kRGBA_8888_SkColorType, @@ -785,7 +785,7 @@ // This tests the ability to create and use wrapped textures in a DDL world DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DDLWrapBackendTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( nullptr, kSize, kSize, GrColorType::kRGBA_8888, false, GrMipMapped::kNo); if (!backendTex.isValid()) {
diff --git a/tests/DetermineDomainModeTest.cpp b/tests/DetermineDomainModeTest.cpp index 907e535..74e2b8a 100644 --- a/tests/DetermineDomainModeTest.cpp +++ b/tests/DetermineDomainModeTest.cpp
@@ -122,7 +122,7 @@ bool isPowerOfTwo, bool isExact, RectInfo* rect) { - GrProxyProvider* proxyProvider = ctx->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = ctx->priv().proxyProvider(); int size = isPowerOfTwo ? 128 : 100; SkBackingFit fit = isExact ? SkBackingFit::kExact : SkBackingFit::kApprox; @@ -132,7 +132,7 @@ desc.fConfig = kRGBA_8888_GrPixelConfig; GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); static const char* name = "proxy";
diff --git a/tests/DrawOpAtlasTest.cpp b/tests/DrawOpAtlasTest.cpp index cbae1a3..d85e324 100644 --- a/tests/DrawOpAtlasTest.cpp +++ b/tests/DrawOpAtlasTest.cpp
@@ -128,15 +128,15 @@ // add and remove pages. Note that this is simulating flush-time behavior. DEF_GPUTEST_FOR_RENDERING_CONTEXTS(BasicDrawOpAtlas, reporter, ctxInfo) { auto context = ctxInfo.grContext(); - auto proxyProvider = context->contextPriv().proxyProvider(); - auto resourceProvider = context->contextPriv().resourceProvider(); - auto drawingManager = context->contextPriv().drawingManager(); + auto proxyProvider = context->priv().proxyProvider(); + auto resourceProvider = context->priv().resourceProvider(); + auto drawingManager = context->priv().drawingManager(); GrOnFlushResourceProvider onFlushResourceProvider(drawingManager); TestingUploadTarget uploadTarget; GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); std::unique_ptr<GrDrawOpAtlas> atlas = GrDrawOpAtlas::Make( proxyProvider, @@ -182,20 +182,20 @@ auto context = ctxInfo.grContext(); - auto gpu = context->contextPriv().getGpu(); - auto resourceProvider = context->contextPriv().resourceProvider(); - auto drawingManager = context->contextPriv().drawingManager(); + auto gpu = context->priv().getGpu(); + auto resourceProvider = context->priv().resourceProvider(); + auto drawingManager = context->priv().drawingManager(); auto textContext = drawingManager->getTextContext(); - auto opMemoryPool = context->contextPriv().opMemoryPool(); + auto opMemoryPool = context->priv().opMemoryPool(); GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); - auto rtc = context->contextPriv().makeDeferredRenderTargetContext(format, - SkBackingFit::kApprox, - 32, 32, - kRGBA_8888_GrPixelConfig, - nullptr); + auto rtc = context->priv().makeDeferredRenderTargetContext(format, + SkBackingFit::kApprox, + 32, 32, + kRGBA_8888_GrPixelConfig, + nullptr); SkPaint paint; paint.setColor(SK_ColorRED); @@ -207,7 +207,7 @@ std::unique_ptr<GrDrawOp> op = textContext->createOp_TestingOnly( context, textContext, rtc.get(), paint, font, SkMatrix::I(), text, 16, 16); - op->finalize(*context->contextPriv().caps(), nullptr); + op->finalize(*context->priv().caps(), nullptr); TestingUploadTarget uploadTarget; @@ -222,7 +222,7 @@ // Cripple the atlas manager so it can't allocate any pages. This will force a failure // in the preparation of the text op - auto atlasManager = context->contextPriv().getAtlasManager(); + auto atlasManager = context->priv().getAtlasManager(); unsigned int numProxies; atlasManager->getProxies(kA8_GrMaskFormat, &numProxies); atlasManager->setMaxPages_TestingOnly(0);
diff --git a/tests/EGLImageTest.cpp b/tests/EGLImageTest.cpp index 0881cc4..09c6bae 100644 --- a/tests/EGLImageTest.cpp +++ b/tests/EGLImageTest.cpp
@@ -30,7 +30,7 @@ glctx1->makeCurrent(); if (grctx1) { if (backendTex1 && backendTex1->isValid()) { - GrGLGpu* gpu1 = static_cast<GrGLGpu*>(grctx1->contextPriv().getGpu()); + GrGLGpu* gpu1 = static_cast<GrGLGpu*>(grctx1->priv().getGpu()); gpu1->deleteTestingOnlyBackendTexture(*backendTex1); } } @@ -55,7 +55,7 @@ if (kGLES_GrGLStandard != glCtx0->gl()->fStandard) { return; } - GrGLGpu* gpu0 = static_cast<GrGLGpu*>(context0->contextPriv().getGpu()); + GrGLGpu* gpu0 = static_cast<GrGLGpu*>(context0->priv().getGpu()); if (!gpu0->glCaps().shaderCaps()->externalTextureSupport()) { return; } @@ -85,7 +85,7 @@ // Use GL Context 1 to create a texture unknown to GrContext. context1->flush(); - GrGpu* gpu1 = context1->contextPriv().getGpu(); + GrGpu* gpu1 = context1->priv().getGpu(); static const int kSize = 100; backendTexture1 = gpu1->createTestingOnlyBackendTexture(nullptr, kSize, kSize, GrColorType::kRGBA_8888, @@ -157,7 +157,7 @@ // TODO: If I make this TopLeft origin to match resolve_origin calls for kDefault, this test // fails on the Nexus5. Why? - sk_sp<GrTextureContext> surfaceContext = context0->contextPriv().makeBackendTextureContext( + sk_sp<GrTextureContext> surfaceContext = context0->priv().makeBackendTextureContext( backendTex, kBottomLeft_GrSurfaceOrigin, nullptr); if (!surfaceContext) { @@ -179,7 +179,7 @@ // Should not be able to wrap as a RT { sk_sp<GrRenderTargetContext> temp = - context0->contextPriv().makeBackendTextureRenderTargetContext( + context0->priv().makeBackendTextureRenderTargetContext( backendTex, kBottomLeft_GrSurfaceOrigin, 1, nullptr); if (temp) { ERRORF(reporter, "Should not be able to wrap an EXTERNAL texture as a RT.");
diff --git a/tests/FloatingPointTextureTest.cpp b/tests/FloatingPointTextureTest.cpp index a2bc1e9..afb2a66 100644 --- a/tests/FloatingPointTextureTest.cpp +++ b/tests/FloatingPointTextureTest.cpp
@@ -53,11 +53,11 @@ continue; } - sk_sp<GrSurfaceContext> sContext = context->contextPriv().makeWrappedSurfaceContext( + sk_sp<GrSurfaceContext> sContext = context->priv().makeWrappedSurfaceContext( std::move(fpProxy)); REPORTER_ASSERT(reporter, sContext); - bool result = context->contextPriv().readSurfacePixels( + bool result = context->priv().readSurfacePixels( sContext.get(), 0, 0, DEV_W, DEV_H, colorType, nullptr, readBuffer.begin(), 0); REPORTER_ASSERT(reporter, result); REPORTER_ASSERT(reporter,
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index c2dd572..60b878b 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp
@@ -157,15 +157,15 @@ const GrBackendFormat format = caps->getBackendFormatFromColorType(kRGBA_8888_SkColorType); sk_sp<GrRenderTargetContext> renderTargetContext( - context->contextPriv().makeDeferredRenderTargetContext(format, - SkBackingFit::kExact, - kRenderTargetWidth, - kRenderTargetHeight, - kRGBA_8888_GrPixelConfig, - nullptr, - sampleCnt, - GrMipMapped::kNo, - origin)); + context->priv().makeDeferredRenderTargetContext(format, + SkBackingFit::kExact, + kRenderTargetWidth, + kRenderTargetHeight, + kRGBA_8888_GrPixelConfig, + nullptr, + sampleCnt, + GrMipMapped::kNo, + origin)); return renderTargetContext; } @@ -256,8 +256,8 @@ bool GrDrawingManager::ProgramUnitTest(GrContext*, int) { return true; } #else bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages, int maxLevels) { - GrDrawingManager* drawingManager = context->contextPriv().drawingManager(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrDrawingManager* drawingManager = context->priv().drawingManager(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); sk_sp<GrTextureProxy> proxies[2]; @@ -269,7 +269,7 @@ dummyDesc.fHeight = 18; dummyDesc.fConfig = kRGBA_8888_GrPixelConfig; const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); proxies[0] = proxyProvider->createProxy(format, dummyDesc, kBottomLeft_GrSurfaceOrigin, GrMipMapped::kYes, SkBackingFit::kExact, SkBudgeted::kNo, GrInternalSurfaceFlags::kNone); @@ -281,7 +281,7 @@ dummyDesc.fHeight = 22; dummyDesc.fConfig = kAlpha_8_GrPixelConfig; const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kAlpha_8_SkColorType); proxies[1] = proxyProvider->createProxy(format, dummyDesc, kTopLeft_GrSurfaceOrigin, GrMipMapped::kYes, SkBackingFit::kExact, SkBudgeted::kNo, GrInternalSurfaceFlags::kNone); @@ -300,7 +300,7 @@ for (int t = 0; t < NUM_TESTS; t++) { // setup random render target(can fail) sk_sp<GrRenderTargetContext> renderTargetContext( - random_render_target_context(context, &random, context->contextPriv().caps())); + random_render_target_context(context, &random, context->priv().caps())); if (!renderTargetContext) { SkDebugf("Could not allocate renderTargetContext"); return false; @@ -316,15 +316,15 @@ drawingManager->flush(nullptr); const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); // Validate that GrFPs work correctly without an input. sk_sp<GrRenderTargetContext> renderTargetContext( - context->contextPriv().makeDeferredRenderTargetContext(format, - SkBackingFit::kExact, - kRenderTargetWidth, - kRenderTargetHeight, - kRGBA_8888_GrPixelConfig, - nullptr)); + context->priv().makeDeferredRenderTargetContext(format, + SkBackingFit::kExact, + kRenderTargetWidth, + kRenderTargetHeight, + kRGBA_8888_GrPixelConfig, + nullptr)); if (!renderTargetContext) { SkDebugf("Could not allocate a renderTargetContext"); return false; @@ -352,7 +352,7 @@ static int get_glprograms_max_stages(const sk_gpu_test::ContextInfo& ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrGLGpu* gpu = static_cast<GrGLGpu*>(context->contextPriv().getGpu()); + GrGLGpu* gpu = static_cast<GrGLGpu*>(context->priv().getGpu()); int maxStages = 6; if (kGLES_GrGLStandard == gpu->glStandard()) { // We've had issues with driver crashes and HW limits being exceeded with many effects on
diff --git a/tests/GrAHardwareBufferTest.cpp b/tests/GrAHardwareBufferTest.cpp index 5e5d4ed..c15fb1a 100644 --- a/tests/GrAHardwareBufferTest.cpp +++ b/tests/GrAHardwareBufferTest.cpp
@@ -102,7 +102,7 @@ GrSurfaceOrigin surfaceOrigin) { GrContext* context = info.grContext(); - if (!context->contextPriv().caps()->supportsAHardwareBufferImages()) { + if (!context->priv().caps()->supportsAHardwareBufferImages()) { return; }
diff --git a/tests/GrCCPRTest.cpp b/tests/GrCCPRTest.cpp index 9c84717..31ffa53 100644 --- a/tests/GrCCPRTest.cpp +++ b/tests/GrCCPRTest.cpp
@@ -41,7 +41,7 @@ out->addCoverageFP(fCCPR->makeClipProcessor(rtc->priv().testingOnly_getOpListID(), fPath, SkIRect::MakeWH(rtc->width(), rtc->height()), rtc->width(), rtc->height(), - *context->contextPriv().caps())); + *context->priv().caps())); return true; } bool quickContains(const SkRect&) const final { return false; } @@ -60,9 +60,9 @@ public: CCPRPathDrawer(sk_sp<GrContext> ctx, skiatest::Reporter* reporter, bool doStroke) : fCtx(ctx) - , fCCPR(fCtx->contextPriv().drawingManager()->getCoverageCountingPathRenderer()) - , fRTC(fCtx->contextPriv().makeDeferredRenderTargetContext( - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType), + , fCCPR(fCtx->priv().drawingManager()->getCoverageCountingPathRenderer()) + , fRTC(fCtx->priv().makeDeferredRenderTargetContext( + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType), SkBackingFit::kExact, kCanvasSize, kCanvasSize, kRGBA_8888_GrPixelConfig, nullptr)) , fDoStroke(doStroke) { @@ -388,11 +388,11 @@ void onRun(skiatest::Reporter* reporter, CCPRPathDrawer& ccpr) final { RecordLastMockAtlasIDs atlasIDRecorder(sk_ref_sp(ccpr.ccpr())); - ccpr.ctx()->contextPriv().addOnFlushCallbackObject(&atlasIDRecorder); + ccpr.ctx()->priv().addOnFlushCallbackObject(&atlasIDRecorder); this->onRun(reporter, ccpr, atlasIDRecorder); - ccpr.ctx()->contextPriv().testingOnly_flushAndRemoveOnFlushCallbackObject(&atlasIDRecorder); + ccpr.ctx()->priv().testingOnly_flushAndRemoveOnFlushCallbackObject(&atlasIDRecorder); } virtual void onRun(skiatest::Reporter* reporter, CCPRPathDrawer& ccpr, @@ -858,7 +858,7 @@ class CCPRRenderingTest { public: void run(skiatest::Reporter* reporter, GrContext* ctx, bool doStroke) const { - if (!ctx->contextPriv().drawingManager()->getCoverageCountingPathRenderer()) { + if (!ctx->priv().drawingManager()->getCoverageCountingPathRenderer()) { return; // CCPR is not enabled on this GPU. } CCPRPathDrawer ccpr(sk_ref_sp(ctx), reporter, doStroke);
diff --git a/tests/GrContextFactoryTest.cpp b/tests/GrContextFactoryTest.cpp index 49df52a..f061009 100644 --- a/tests/GrContextFactoryTest.cpp +++ b/tests/GrContextFactoryTest.cpp
@@ -28,7 +28,7 @@ continue; } REPORTER_ASSERT(reporter, - context->contextPriv().caps()->shaderCaps()->pathRenderingSupport()); + context->priv().caps()->shaderCaps()->pathRenderingSupport()); } } @@ -42,7 +42,7 @@ testFactory.get(ctxType, GrContextFactory::ContextOverrides::kDisableNVPR); if (context) { REPORTER_ASSERT(reporter, - !context->contextPriv().caps()->shaderCaps()->pathRenderingSupport()); + !context->priv().caps()->shaderCaps()->pathRenderingSupport()); } } } @@ -128,12 +128,12 @@ GrContextFactory::ContextType ctxType = static_cast<GrContextFactory::ContextType>(i); ContextInfo serialInfo = serialFactory.getContextInfo(ctxType); if (GrContext* serialContext = serialInfo.grContext()) { - REPORTER_ASSERT(reporter, nullptr == serialContext->contextPriv().getTaskGroup()); + REPORTER_ASSERT(reporter, nullptr == serialContext->priv().getTaskGroup()); } ContextInfo threadedInfo = threadedFactory.getContextInfo(ctxType); if (GrContext* threadedContext = threadedInfo.grContext()) { - REPORTER_ASSERT(reporter, nullptr != threadedContext->contextPriv().getTaskGroup()); + REPORTER_ASSERT(reporter, nullptr != threadedContext->priv().getTaskGroup()); } } } @@ -141,7 +141,7 @@ #ifdef SK_ENABLE_DUMP_GPU 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()->contextPriv().dump(); + SkString result = ctxInfo.grContext()->priv().dump(); REPORTER_ASSERT(reporter, !result.isEmpty()); } #endif
diff --git a/tests/GrMeshTest.cpp b/tests/GrMeshTest.cpp index 15709a8..82f1206 100644 --- a/tests/GrMeshTest.cpp +++ b/tests/GrMeshTest.cpp
@@ -84,9 +84,9 @@ GrContext* context = ctxInfo.grContext(); const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); - sk_sp<GrRenderTargetContext> rtc(context->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc(context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, kImageWidth, kImageHeight, kRGBA_8888_GrPixelConfig, nullptr)); if (!rtc) { @@ -204,7 +204,7 @@ }); for (bool indexed : {false, true}) { - if (!context->contextPriv().caps()->instanceAttribSupport()) { + if (!context->priv().caps()->instanceAttribSupport()) { break; } @@ -233,7 +233,7 @@ } switch (y % 3) { case 0: - if (context->contextPriv().caps()->shaderCaps()->vertexIDSupport()) { + if (context->priv().caps()->shaderCaps()->vertexIDSupport()) { if (y % 2) { // We don't need this call because it's the initial state of GrMesh. mesh.setVertexData(nullptr); @@ -262,7 +262,7 @@ static std::unique_ptr<GrDrawOp> Make(GrContext* context, std::function<void(DrawMeshHelper*)> testFn) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<GrMeshTestOp>(testFn); }
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp index db000d5..fc29d82 100644 --- a/tests/GrMipMappedTest.cpp +++ b/tests/GrMipMappedTest.cpp
@@ -31,10 +31,10 @@ // SkImages and SkSurfaces DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrWrappedMipMappedTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - if (!context->contextPriv().caps()->mipMapSupport()) { + if (!context->priv().caps()->mipMapSupport()) { return; } - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); for (auto mipMapped : {GrMipMapped::kNo, GrMipMapped::kYes}) { for (auto isRT : {false, true}) { @@ -100,10 +100,10 @@ // based on if we will use mips in the draw and the mip status of the GrBackendTexture. DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrBackendTextureImageMipMappedTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - if (!context->contextPriv().caps()->mipMapSupport()) { + if (!context->priv().caps()->mipMapSupport()) { return; } - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); for (auto mipMapped : {GrMipMapped::kNo, GrMipMapped::kYes}) { for (auto willUseMips : {false, true}) { @@ -154,9 +154,9 @@ } if (GrSurfaceProxy::LazyState::kNot != genProxy->lazyInstantiationState()) { - genProxy->priv().doLazyInstantiation(context->contextPriv().resourceProvider()); + genProxy->priv().doLazyInstantiation(context->priv().resourceProvider()); } else if (!genProxy->isInstantiated()) { - genProxy->instantiate(context->contextPriv().resourceProvider()); + genProxy->instantiate(context->priv().resourceProvider()); } REPORTER_ASSERT(reporter, genProxy->isInstantiated()); @@ -222,12 +222,12 @@ // resource we took the snapshot of. DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrImageSnapshotMipMappedTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - if (!context->contextPriv().caps()->mipMapSupport()) { + if (!context->priv().caps()->mipMapSupport()) { return; } - auto resourceProvider = context->contextPriv().resourceProvider(); - GrGpu* gpu = context->contextPriv().getGpu(); + auto resourceProvider = context->priv().resourceProvider(); + GrGpu* gpu = context->priv().getGpu(); for (auto willUseMips : {false, true}) { for (auto isWrapped : {false, true}) { @@ -287,7 +287,7 @@ // to use mips. This test passes by not crashing or hitting asserts in code. DEF_GPUTEST_FOR_RENDERING_CONTEXTS(Gr1x1TextureMipMappedTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - if (!context->contextPriv().caps()->mipMapSupport()) { + if (!context->priv().caps()->mipMapSupport()) { return; }
diff --git a/tests/GrOpListFlushTest.cpp b/tests/GrOpListFlushTest.cpp index 7e1f7ad..f53a7e6 100644 --- a/tests/GrOpListFlushTest.cpp +++ b/tests/GrOpListFlushTest.cpp
@@ -27,7 +27,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrOpListFlushCount, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); SkImageInfo imageInfo = SkImageInfo::Make(1000, 1, kRGBA_8888_SkColorType, kPremul_SkAlphaType);
diff --git a/tests/GrPipelineDynamicStateTest.cpp b/tests/GrPipelineDynamicStateTest.cpp index 7fb2c3d..45300fd 100644 --- a/tests/GrPipelineDynamicStateTest.cpp +++ b/tests/GrPipelineDynamicStateTest.cpp
@@ -113,7 +113,7 @@ static std::unique_ptr<GrDrawOp> Make(GrContext* context, GrScissorTest scissorTest, sk_sp<const GrBuffer> vbuff) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<GrPipelineDynamicStateTestOp>(scissorTest, std::move(vbuff)); } @@ -158,12 +158,12 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrPipelineDynamicStateTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrResourceProvider* rp = context->contextPriv().resourceProvider(); + GrResourceProvider* rp = context->priv().resourceProvider(); const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); - sk_sp<GrRenderTargetContext> rtc(context->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc(context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, kScreenSize, kScreenSize, kRGBA_8888_GrPixelConfig, nullptr)); if (!rtc) {
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp index 6873fe8..611d675 100644 --- a/tests/GrPorterDuffTest.cpp +++ b/tests/GrPorterDuffTest.cpp
@@ -28,7 +28,7 @@ static void test_lcd_coverage_fallback_case(skiatest::Reporter* reporter, const GrCaps& caps); DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrPorterDuff, reporter, ctxInfo) { - const GrCaps& caps = *ctxInfo.grContext()->contextPriv().getGpu()->caps(); + const GrCaps& caps = *ctxInfo.grContext()->priv().getGpu()->caps(); if (!caps.shaderCaps()->dualSourceBlendingSupport()) { SK_ABORT("Null context does not support dual source blending."); return; @@ -982,9 +982,9 @@ return; } - GrGpu* gpu = ctx->contextPriv().getGpu(); - GrProxyProvider* proxyProvider = ctx->contextPriv().proxyProvider(); - const GrCaps& caps = *ctx->contextPriv().caps(); + GrGpu* gpu = ctx->priv().getGpu(); + GrProxyProvider* proxyProvider = ctx->priv().proxyProvider(); + const GrCaps& caps = *ctx->priv().caps(); if (caps.shaderCaps()->dualSourceBlendingSupport()) { SK_ABORT("Null context failed to honor request for no ARB_blend_func_extended."); return;
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp index 6334c40..08a4c6b 100644 --- a/tests/GrSurfaceTest.cpp +++ b/tests/GrSurfaceTest.cpp
@@ -24,8 +24,8 @@ // and render targets to GrSurface all work as expected. DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrSurface, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - auto resourceProvider = context->contextPriv().resourceProvider(); - GrGpu* gpu = context->contextPriv().getGpu(); + auto resourceProvider = context->priv().resourceProvider(); + GrGpu* gpu = context->priv().getGpu(); GrSurfaceDesc desc; desc.fFlags = kRenderTarget_GrSurfaceFlag; @@ -72,9 +72,9 @@ // consistent with createTexture's result. DEF_GPUTEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); - GrResourceProvider* resourceProvider = context->contextPriv().resourceProvider(); - const GrCaps* caps = context->contextPriv().caps(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); + GrResourceProvider* resourceProvider = context->priv().resourceProvider(); + const GrCaps* caps = context->priv().caps(); GrPixelConfig configs[] = { kUnknown_GrPixelConfig, @@ -156,8 +156,8 @@ std::unique_ptr<uint32_t[]> data(new uint32_t[kSize * kSize]); GrContext* context = context_info.grContext(); - const GrCaps* caps = context->contextPriv().caps(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + const GrCaps* caps = context->priv().caps(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); for (int c = 0; c <= kLast_GrPixelConfig; ++c) { desc.fConfig = static_cast<GrPixelConfig>(c); @@ -181,8 +181,7 @@ if (!proxy) { continue; } - auto texCtx = context->contextPriv().makeWrappedSurfaceContext( - std::move(proxy)); + auto texCtx = context->priv().makeWrappedSurfaceContext(std::move(proxy)); SkImageInfo info = SkImageInfo::Make( kSize, kSize, kRGBA_8888_SkColorType, kPremul_SkAlphaType); memset(data.get(), 0xAB, kSize * kSize * sizeof(uint32_t)); @@ -202,7 +201,7 @@ texCtx->writePixels(info, data.get(), 0, 0, 0); } } - context->contextPriv().purgeAllUnlockedResources_ForTesting(); + context->priv().purgeAllUnlockedResources_ForTesting(); GrSRGBEncoded srgbEncoded = GrSRGBEncoded::kNo; GrColorType colorType = GrPixelConfigToColorTypeAndEncoding(desc.fConfig, @@ -212,7 +211,7 @@ // Try creating the texture as a deferred proxy. for (int i = 0; i < 2; ++i) { - auto surfCtx = context->contextPriv().makeDeferredSurfaceContext( + auto surfCtx = context->priv().makeDeferredSurfaceContext( format, desc, origin, GrMipMapped::kNo, fit, SkBudgeted::kYes); if (!surfCtx) { continue; @@ -235,7 +234,7 @@ surfCtx->writePixels(info, data.get(), 0, 0, 0); } } - context->contextPriv().purgeAllUnlockedResources_ForTesting(); + context->priv().purgeAllUnlockedResources_ForTesting(); } } } @@ -271,18 +270,18 @@ }); GrContext* context = context_info.grContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); // We test both kRW in addition to kRead mostly to ensure that the calls are structured such // that they'd succeed if the texture wasn't kRead. We want to be sure we're failing with // kRead for the right reason. for (auto ioType : {kRead_GrIOType, kRW_GrIOType}) { - auto backendTex = context->contextPriv().getGpu()->createTestingOnlyBackendTexture( + auto backendTex = context->priv().getGpu()->createTestingOnlyBackendTexture( pixels.addr(), kSize, kSize, kRGBA_8888_SkColorType, true, GrMipMapped::kNo); auto proxy = proxyProvider->wrapBackendTexture(backendTex, kTopLeft_GrSurfaceOrigin, kBorrow_GrWrapOwnership, GrWrapCacheable::kNo, ioType); - auto surfContext = context->contextPriv().makeWrappedSurfaceContext(proxy); + auto surfContext = context->priv().makeWrappedSurfaceContext(proxy); // Read pixels should work with a read-only texture. SkAutoPixmapStorage read; @@ -301,7 +300,7 @@ REPORTER_ASSERT(reporter, writeResult == (ioType == kRW_GrIOType)); // Try the low level write. context->flush(); - auto gpuWriteResult = context->contextPriv().getGpu()->writePixels( + auto gpuWriteResult = context->priv().getGpu()->writePixels( proxy->peekTexture(), 0, 0, kSize, kSize, GrColorType::kRGBA_8888, write.addr32(), 0); REPORTER_ASSERT(reporter, gpuWriteResult == (ioType == kRW_GrIOType)); @@ -315,14 +314,14 @@ REPORTER_ASSERT(reporter, copyResult == (ioType == kRW_GrIOType)); // Try the low level copy. context->flush(); - auto gpuCopyResult = context->contextPriv().getGpu()->copySurface( + auto gpuCopyResult = context->priv().getGpu()->copySurface( proxy->peekTexture(), kTopLeft_GrSurfaceOrigin, copySrc->peekTexture(), kTopLeft_GrSurfaceOrigin, SkIRect::MakeWH(kSize, kSize), {0, 0}); REPORTER_ASSERT(reporter, gpuCopyResult == (ioType == kRW_GrIOType)); // Mip regen should not work with a read only texture. - if (context->contextPriv().caps()->mipMapSupport()) { - backendTex = context->contextPriv().getGpu()->createTestingOnlyBackendTexture( + if (context->priv().caps()->mipMapSupport()) { + backendTex = context->priv().getGpu()->createTestingOnlyBackendTexture( nullptr, kSize, kSize, kRGBA_8888_SkColorType, true, GrMipMapped::kYes); proxy = proxyProvider->wrapBackendTexture(backendTex, kTopLeft_GrSurfaceOrigin, kBorrow_GrWrapOwnership, GrWrapCacheable::kNo, @@ -330,7 +329,7 @@ context->flush(); proxy->peekTexture()->texturePriv().markMipMapsDirty(); // avoids assert in GrGpu. auto regenResult = - context->contextPriv().getGpu()->regenerateMipMapLevels(proxy->peekTexture()); + context->priv().getGpu()->regenerateMipMapLevels(proxy->peekTexture()); REPORTER_ASSERT(reporter, regenResult == (ioType == kRW_GrIOType)); } } @@ -350,7 +349,7 @@ auto release = [](void* rc) { auto releaseContext = static_cast<ReleaseContext*>(rc); if (!releaseContext->fContext->abandoned()) { - if (auto gpu = releaseContext->fContext->contextPriv().getGpu()) { + if (auto gpu = releaseContext->fContext->priv().getGpu()) { gpu->deleteTestingOnlyBackendTexture(releaseContext->fBackendTexture); } } @@ -362,18 +361,18 @@ // Various ways of making textures. auto makeWrapped = [](GrContext* context) { - auto backendTexture = context->contextPriv().getGpu()->createTestingOnlyBackendTexture( + auto backendTexture = context->priv().getGpu()->createTestingOnlyBackendTexture( nullptr, kS, kS, GrColorType::kRGBA_8888, false, GrMipMapped::kNo); - auto texture = context->contextPriv().resourceProvider()->wrapBackendTexture( + auto texture = context->priv().resourceProvider()->wrapBackendTexture( backendTexture, kBorrow_GrWrapOwnership, GrWrapCacheable::kNo, kRW_GrIOType); installBackendTextureReleaseProc(texture.get()); return texture; }; auto makeWrappedRenderable = [](GrContext* context) { - auto backendTexture = context->contextPriv().getGpu()->createTestingOnlyBackendTexture( + auto backendTexture = context->priv().getGpu()->createTestingOnlyBackendTexture( nullptr, kS, kS, GrColorType::kRGBA_8888, true, GrMipMapped::kNo); - auto texture = context->contextPriv().resourceProvider()->wrapRenderableBackendTexture( + auto texture = context->priv().resourceProvider()->wrapRenderableBackendTexture( backendTexture, 1, kBorrow_GrWrapOwnership, GrWrapCacheable::kNo); installBackendTextureReleaseProc(texture.get()); return texture; @@ -383,7 +382,7 @@ GrSurfaceDesc desc; desc.fConfig = kRGBA_8888_GrPixelConfig; desc.fWidth = desc.fHeight = kS; - return context->contextPriv().resourceProvider()->createTexture(desc, SkBudgeted::kNo); + return context->priv().resourceProvider()->createTexture(desc, SkBudgeted::kNo); }; auto makeRenderable = [](GrContext* context) { @@ -391,7 +390,7 @@ desc.fFlags = kRenderTarget_GrSurfaceFlag; desc.fConfig = kRGBA_8888_GrPixelConfig; desc.fWidth = desc.fHeight = kS; - return context->contextPriv().resourceProvider()->createTexture(desc, SkBudgeted::kNo); + return context->priv().resourceProvider()->createTexture(desc, SkBudgeted::kNo); }; std::function<sk_sp<GrTexture>(GrContext*)> makers[] = {makeWrapped, makeWrappedRenderable, @@ -467,7 +466,7 @@ } else { budgeted = SkBudgeted::kNo; } - auto proxy = context->contextPriv().proxyProvider()->createLazyProxy( + auto proxy = context->priv().proxyProvider()->createLazyProxy( singleUseLazyCB, backendFormat, desc, GrSurfaceOrigin::kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo, GrInternalSurfaceFlags ::kNone, SkBackingFit::kExact, budgeted, @@ -481,7 +480,7 @@ REPORTER_ASSERT(reporter, idleIDs.find(2) == idleIDs.end()); context->flush(); REPORTER_ASSERT(reporter, idleIDs.find(2) == idleIDs.end()); - context->contextPriv().getGpu()->testingOnly_flushGpuAndSync(); + context->priv().getGpu()->testingOnly_flushGpuAndSync(); REPORTER_ASSERT(reporter, idleIDs.find(2) == idleIDs.end()); // This time we move the proxy into the draw. @@ -491,7 +490,7 @@ SkMatrix::I(), nullptr); REPORTER_ASSERT(reporter, idleIDs.find(2) == idleIDs.end()); context->flush(); - context->contextPriv().getGpu()->testingOnly_flushGpuAndSync(); + context->priv().getGpu()->testingOnly_flushGpuAndSync(); // Now that the draw is fully consumed by the GPU, the texture should be idle. REPORTER_ASSERT(reporter, idleIDs.find(2) != idleIDs.end()); @@ -499,7 +498,7 @@ auto deinstantiateLazyCB = [&make, &context](GrResourceProvider* rp) { return rp ? make(context, 3) : nullptr; }; - proxy = context->contextPriv().proxyProvider()->createLazyProxy( + proxy = context->priv().proxyProvider()->createLazyProxy( deinstantiateLazyCB, backendFormat, desc, GrSurfaceOrigin::kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo, GrInternalSurfaceFlags ::kNone, SkBackingFit::kExact, budgeted, @@ -512,7 +511,7 @@ // id 3. REPORTER_ASSERT(reporter, idleIDs.find(3) == idleIDs.end()); context->flush(); - context->contextPriv().getGpu()->testingOnly_flushGpuAndSync(); + context->priv().getGpu()->testingOnly_flushGpuAndSync(); // Now that the draw is fully consumed, we should have deinstantiated the proxy and // the texture it made should be idle. REPORTER_ASSERT(reporter, idleIDs.find(3) != idleIDs.end()); @@ -547,12 +546,9 @@ kPremul_SkAlphaType); auto rt = SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info, 0, nullptr); - auto rtc = - rt->getCanvas() + auto rtc = rt->getCanvas() ->internal_private_accessTopLayerRenderTargetContext(); - auto proxy = context->contextPriv() - .proxyProvider() - ->testingOnly_createWrapped( + auto proxy = context->priv().proxyProvider()->testingOnly_createWrapped( texture, kTopLeft_GrSurfaceOrigin); rtc->drawTexture(GrNoClip(), proxy, GrSamplerState::Filter::kNearest, SkPMColor4f(), SkRect::MakeWH(kS, kS),
diff --git a/tests/GrTestingBackendTextureUploadTest.cpp b/tests/GrTestingBackendTextureUploadTest.cpp index 5b272c9..e42c1c62 100644 --- a/tests/GrTestingBackendTextureUploadTest.cpp +++ b/tests/GrTestingBackendTextureUploadTest.cpp
@@ -25,7 +25,7 @@ } SkAutoTMalloc<GrColor> dstBuffer(kWidth * kHeight); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); GrPixelConfig config = GrColorTypeToPixelConfig(ct, GrSRGBEncoded::kNo); if (!gpu->caps()->isConfigTexturable(config)) {
diff --git a/tests/GrTextureMipMapInvalidationTest.cpp b/tests/GrTextureMipMapInvalidationTest.cpp index ea2d0de..b8ccc5a 100644 --- a/tests/GrTextureMipMapInvalidationTest.cpp +++ b/tests/GrTextureMipMapInvalidationTest.cpp
@@ -59,7 +59,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReimportImageTextureWithMipLevels, reporter, ctxInfo) { auto* ctx = ctxInfo.grContext(); - if (!ctx->contextPriv().caps()->mipMapSupport()) { + if (!ctx->priv().caps()->mipMapSupport()) { return; } static constexpr auto kCreateWithMipMaps = true;
diff --git a/tests/GrUploadPixelsTests.cpp b/tests/GrUploadPixelsTests.cpp index 2188c30..cd0bac0 100644 --- a/tests/GrUploadPixelsTests.cpp +++ b/tests/GrUploadPixelsTests.cpp
@@ -32,7 +32,7 @@ kTopLeft_GrSurfaceOrigin, srcBuffer, 0); REPORTER_ASSERT(reporter, proxy); if (proxy) { - sk_sp<GrSurfaceContext> sContext = context->contextPriv().makeWrappedSurfaceContext(proxy); + sk_sp<GrSurfaceContext> sContext = context->priv().makeWrappedSurfaceContext(proxy); SkImageInfo dstInfo = SkImageInfo::Make(kWidth, kHeight, ct, kPremul_SkAlphaType); @@ -62,7 +62,7 @@ kBottomLeft_GrSurfaceOrigin, srcBuffer, 0); REPORTER_ASSERT(reporter, proxy); if (proxy) { - sk_sp<GrSurfaceContext> sContext = context->contextPriv().makeWrappedSurfaceContext(proxy); + sk_sp<GrSurfaceContext> sContext = context->priv().makeWrappedSurfaceContext(proxy); SkImageInfo dstInfo = SkImageInfo::Make(kWidth, kHeight, ct, kPremul_SkAlphaType);
diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp index 37a8728..4d1f0f6 100644 --- a/tests/ImageFilterCacheTest.cpp +++ b/tests/ImageFilterCacheTest.cpp
@@ -209,12 +209,12 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_ImageBackedGPU, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - sk_sp<GrTextureProxy> srcProxy(create_proxy(context->contextPriv().proxyProvider())); + sk_sp<GrTextureProxy> srcProxy(create_proxy(context->priv().proxyProvider())); if (!srcProxy) { return; } - if (!srcProxy->instantiate(context->contextPriv().resourceProvider())) { + if (!srcProxy->instantiate(context->priv().resourceProvider())) { return; } GrTexture* tex = srcProxy->peekTexture(); @@ -250,7 +250,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_GPUBacked, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - sk_sp<GrTextureProxy> srcProxy(create_proxy(context->contextPriv().proxyProvider())); + sk_sp<GrTextureProxy> srcProxy(create_proxy(context->priv().proxyProvider())); if (!srcProxy) { return; }
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp index ecf8847..65c1f23 100644 --- a/tests/ImageFilterTest.cpp +++ b/tests/ImageFilterTest.cpp
@@ -378,7 +378,7 @@ static sk_sp<SkSpecialSurface> create_empty_special_surface(GrContext* context, int widthHeight) { if (context) { GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); return SkSpecialSurface::MakeRenderTarget(context, format, widthHeight, widthHeight, kRGBA_8888_GrPixelConfig, nullptr); @@ -1655,7 +1655,7 @@ int largeH = 5000; // If we're GPU-backed make the bitmap too large to be converted into a texture. if (GrContext* ctx = canvas->getGrContext()) { - largeW = ctx->contextPriv().caps()->maxTextureSize() + 1; + largeW = ctx->priv().caps()->maxTextureSize() + 1; } largeBmp.allocN32Pixels(largeW, largeH);
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp index 0197500..b4e072b 100644 --- a/tests/ImageTest.cpp +++ b/tests/ImageTest.cpp
@@ -426,7 +426,7 @@ } if (GrMipMapped::kYes == mipMapped && as_IB(texImage)->peekProxy()->mipMapped() != mipMapped && - context->contextPriv().caps()->mipMapSupport()) { + context->priv().caps()->mipMapSupport()) { ERRORF(reporter, "makeTextureImage returned non-mipmapped texture."); continue; } @@ -487,7 +487,7 @@ static constexpr int kSize = 10; SkColorType colorType = static_cast<SkColorType>(ct); bool can = ctxInfo.grContext()->colorTypeSupportedAsImage(colorType); - auto* gpu = ctxInfo.grContext()->contextPriv().getGpu(); + auto* gpu = ctxInfo.grContext()->priv().getGpu(); GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( nullptr, kSize, kSize, colorType, false, GrMipMapped::kNo); auto img = @@ -829,7 +829,7 @@ std::unique_ptr<uint32_t[]> pixels(new uint32_t[kWidth * kHeight]); GrContext* ctx = ctxInfo.grContext(); - GrGpu* gpu = ctx->contextPriv().getGpu(); + GrGpu* gpu = ctx->priv().getGpu(); GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( pixels.get(), kWidth, kHeight, GrColorType::kRGBA_8888, true, GrMipMapped::kNo); @@ -876,7 +876,7 @@ // If we don't have proper support for this feature, the factory will fallback to returning // codec-backed images. Those will "work", but some of our checks will fail because we // expect the cross-context images not to work on multiple contexts at once. - if (!ctx->contextPriv().caps()->crossContextTextureSupport()) { + if (!ctx->priv().caps()->crossContextTextureSupport()) { continue; } @@ -967,7 +967,7 @@ // This is specifically here for vulkan to guarantee the command buffer will finish // which is when we call the ReleaseProc. - otherCtx->contextPriv().getGpu()->testingOnly_flushGpuAndSync(); + otherCtx->priv().getGpu()->testingOnly_flushGpuAndSync(); } // Case #6: Verify that only one context can be using the image at a time @@ -1056,7 +1056,7 @@ GrContextFactory::ContextType ctxType = static_cast<GrContextFactory::ContextType>(i); ContextInfo ctxInfo = testFactory.getContextInfo(ctxType); GrContext* ctx = ctxInfo.grContext(); - if (!ctx || !ctx->contextPriv().caps()->crossContextTextureSupport()) { + if (!ctx || !ctx->priv().caps()->crossContextTextureSupport()) { continue; } @@ -1084,7 +1084,7 @@ testContext->makeCurrent(); REPORTER_ASSERT(reporter, proxy); auto createLarge = [context] { - return create_image_large(context->contextPriv().caps()->maxTextureSize()); + return create_image_large(context->priv().caps()->maxTextureSize()); }; struct { std::function<sk_sp<SkImage> ()> fImageFactory;
diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp index ecc639c..8c582ad 100644 --- a/tests/LazyProxyTest.cpp +++ b/tests/LazyProxyTest.cpp
@@ -59,7 +59,7 @@ GrProxyProvider* proxyProvider, LazyProxyTest* test, bool nullTexture) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<Op>(context, proxyProvider, test, nullTexture); } @@ -79,7 +79,7 @@ Op(GrContext* ctx, GrProxyProvider* proxyProvider, LazyProxyTest* test, bool nullTexture) : GrDrawOp(ClassID()), fTest(test) { const GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGB_565_SkColorType); + ctx->priv().caps()->getBackendFormatFromColorType(kRGB_565_SkColorType); fProxy = GrProxyProvider::MakeFullyLazyProxy( [this, nullTexture](GrResourceProvider* rp) { if (!rp) { @@ -127,8 +127,8 @@ , fTest(test) , fAtlas(atlas) { const GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromGrColorType(GrColorType::kAlpha_F16, - GrSRGBEncoded::kNo); + ctx->priv().caps()->getBackendFormatFromGrColorType(GrColorType::kAlpha_F16, + GrSRGBEncoded::kNo); fLazyProxy = GrProxyProvider::MakeFullyLazyProxy( [this](GrResourceProvider* rp) { if (!rp) { @@ -176,7 +176,7 @@ private: bool apply(GrContext* context, GrRenderTargetContext*, bool, bool, GrAppliedClip* out, SkRect* bounds) const override { - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); out->addCoverageFP(skstd::make_unique<ClipFP>(context, proxyProvider, fTest, fAtlas)); return true; } @@ -205,26 +205,26 @@ GrMockOptions::ConfigOptions::Renderability::kNonMSAA; mockOptions.fConfigOptions[kAlpha_half_GrPixelConfig].fTexturable = true; sk_sp<GrContext> ctx = GrContext::MakeMock(&mockOptions, GrContextOptions()); - GrProxyProvider* proxyProvider = ctx->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = ctx->priv().proxyProvider(); for (bool nullTexture : {false, true}) { LazyProxyTest test(reporter); - ctx->contextPriv().addOnFlushCallbackObject(&test); + ctx->priv().addOnFlushCallbackObject(&test); GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); - sk_sp<GrRenderTargetContext> rtc = ctx->contextPriv().makeDeferredRenderTargetContext( + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + sk_sp<GrRenderTargetContext> rtc = ctx->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, 100, 100, kRGBA_8888_GrPixelConfig, nullptr); REPORTER_ASSERT(reporter, rtc); format = - ctx->contextPriv().caps()->getBackendFormatFromGrColorType(GrColorType::kAlpha_F16, + ctx->priv().caps()->getBackendFormatFromGrColorType(GrColorType::kAlpha_F16, GrSRGBEncoded::kNo); - sk_sp<GrRenderTargetContext> mockAtlas = ctx->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> mockAtlas = ctx->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, 10, 10, kAlpha_half_GrPixelConfig, nullptr); REPORTER_ASSERT(reporter, mockAtlas); rtc->priv().testingOnly_addDrawOp(LazyProxyTest::Clip(&test, mockAtlas->asTextureProxy()), LazyProxyTest::Op::Make(ctx.get(), proxyProvider, &test, nullTexture)); - ctx->contextPriv().testingOnly_flushAndRemoveOnFlushCallbackObject(&test); + ctx->priv().testingOnly_flushAndRemoveOnFlushCallbackObject(&test); } } @@ -233,7 +233,7 @@ DEF_GPUTEST(LazyProxyReleaseTest, reporter, /* options */) { GrMockOptions mockOptions; sk_sp<GrContext> ctx = GrContext::MakeMock(&mockOptions, GrContextOptions()); - auto proxyProvider = ctx->contextPriv().proxyProvider(); + auto proxyProvider = ctx->priv().proxyProvider(); GrSurfaceDesc desc; desc.fWidth = kSize; @@ -241,7 +241,7 @@ desc.fConfig = kRGBA_8888_GrPixelConfig; GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); using LazyInstantiationType = GrSurfaceProxy::LazyInstantiationType; for (bool doInstantiate : {true, false}) { @@ -266,7 +266,7 @@ REPORTER_ASSERT(reporter, 0 == testCount); if (doInstantiate) { - proxy->priv().doLazyInstantiation(ctx->contextPriv().resourceProvider()); + proxy->priv().doLazyInstantiation(ctx->priv().resourceProvider()); if (LazyInstantiationType::kSingleUse == proxy->priv().lazyInstantiationType()) { // In SingleUse we will call the cleanup and delete the callback in the // doLazyInstantiationCall. @@ -292,7 +292,7 @@ GrProxyProvider* proxyProvider, int* testExecuteValue, bool shouldFailInstantiation) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<LazyFailedInstantiationTestOp>(context, proxyProvider, testExecuteValue, @@ -315,7 +315,7 @@ desc.fHeight = kSize; desc.fConfig = kRGBA_8888_GrPixelConfig; GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); fLazyProxy = proxyProvider->createLazyProxy( [testExecuteValue, shouldFailInstantiation, desc](GrResourceProvider* rp) { @@ -358,12 +358,12 @@ DEF_GPUTEST(LazyProxyFailedInstantiationTest, reporter, /* options */) { GrMockOptions mockOptions; sk_sp<GrContext> ctx = GrContext::MakeMock(&mockOptions, GrContextOptions()); - GrResourceProvider* resourceProvider = ctx->contextPriv().resourceProvider(); - GrProxyProvider* proxyProvider = ctx->contextPriv().proxyProvider(); + GrResourceProvider* resourceProvider = ctx->priv().resourceProvider(); + GrProxyProvider* proxyProvider = ctx->priv().proxyProvider(); GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); for (bool failInstantiation : {false, true}) { - sk_sp<GrRenderTargetContext> rtc = ctx->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc = ctx->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, 100, 100, kRGBA_8888_GrPixelConfig, nullptr); REPORTER_ASSERT(reporter, rtc); @@ -395,7 +395,7 @@ DEFINE_OP_CLASS_ID static std::unique_ptr<GrDrawOp> Make(GrContext* context, sk_sp<GrTextureProxy> proxy) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<LazyDeinstantiateTestOp>(std::move(proxy)); } @@ -432,15 +432,15 @@ DEF_GPUTEST(LazyProxyDeinstantiateTest, reporter, /* options */) { GrMockOptions mockOptions; sk_sp<GrContext> ctx = GrContext::MakeMock(&mockOptions, GrContextOptions()); - GrProxyProvider* proxyProvider = ctx->contextPriv().proxyProvider(); - GrGpu* gpu = ctx->contextPriv().getGpu(); + GrProxyProvider* proxyProvider = ctx->priv().proxyProvider(); + GrGpu* gpu = ctx->priv().getGpu(); GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); using LazyType = GrSurfaceProxy::LazyInstantiationType; for (auto lazyType : {LazyType::kSingleUse, LazyType::kMultipleUse, LazyType::kDeinstantiate}) { - sk_sp<GrRenderTargetContext> rtc = ctx->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc = ctx->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, 100, 100, kRGBA_8888_GrPixelConfig, nullptr); REPORTER_ASSERT(reporter, rtc);
diff --git a/tests/OnFlushCallbackTest.cpp b/tests/OnFlushCallbackTest.cpp index 35ff574..7830c4a 100644 --- a/tests/OnFlushCallbackTest.cpp +++ b/tests/OnFlushCallbackTest.cpp
@@ -430,9 +430,9 @@ static sk_sp<GrTextureProxy> make_upstream_image(GrContext* context, AtlasObject* object, int start, sk_sp<GrTextureProxy> atlasProxy) { const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); - sk_sp<GrRenderTargetContext> rtc(context->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc(context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, 3*kDrawnTileSize, @@ -535,26 +535,26 @@ static const int kNumProxies = 3; GrContext* context = ctxInfo.grContext(); - auto proxyProvider = context->contextPriv().proxyProvider(); + auto proxyProvider = context->priv().proxyProvider(); AtlasObject object; - context->contextPriv().addOnFlushCallbackObject(&object); + context->priv().addOnFlushCallbackObject(&object); sk_sp<GrTextureProxy> proxies[kNumProxies]; for (int i = 0; i < kNumProxies; ++i) { proxies[i] = make_upstream_image(context, &object, i*3, object.getAtlasProxy(proxyProvider, - context->contextPriv().caps())); + context->priv().caps())); } static const int kFinalWidth = 6*kDrawnTileSize; static const int kFinalHeight = kDrawnTileSize; const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); - sk_sp<GrRenderTargetContext> rtc(context->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc(context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, kFinalWidth, @@ -587,7 +587,7 @@ readBack.rowBytes(), 0, 0); SkASSERT(result); - context->contextPriv().testingOnly_flushAndRemoveOnFlushCallbackObject(&object); + context->priv().testingOnly_flushAndRemoveOnFlushCallbackObject(&object); object.markAsDone();
diff --git a/tests/OpChainTest.cpp b/tests/OpChainTest.cpp index dde0c7a..0b35873 100644 --- a/tests/OpChainTest.cpp +++ b/tests/OpChainTest.cpp
@@ -96,7 +96,7 @@ static std::unique_ptr<TestOp> Make(GrContext* context, int value, const Range& range, int result[], const Combinable* combinable) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<TestOp>(value, range, result, combinable); } @@ -169,13 +169,13 @@ desc.fFlags = kRenderTarget_GrSurfaceFlag; const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); - auto proxy = context->contextPriv().proxyProvider()->createProxy( + auto proxy = context->priv().proxyProvider()->createProxy( format, desc, kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo, SkBackingFit::kExact, SkBudgeted::kNo, GrInternalSurfaceFlags::kNone); SkASSERT(proxy); - proxy->instantiate(context->contextPriv().resourceProvider()); + proxy->instantiate(context->priv().resourceProvider()); int result[result_width()]; int validResult[result_width()]; @@ -202,13 +202,13 @@ for (int c = 0; c < kNumCombinabilitiesPerGrouping; ++c) { init_combinable(g, &combinable, &random); GrTokenTracker tracker; - GrOpFlushState flushState(context->contextPriv().getGpu(), - context->contextPriv().resourceProvider(), &tracker, + GrOpFlushState flushState(context->priv().getGpu(), + context->priv().resourceProvider(), &tracker, nullptr, nullptr); - GrRenderTargetOpList opList(context->contextPriv().resourceProvider(), - sk_ref_sp(context->contextPriv().opMemoryPool()), + GrRenderTargetOpList opList(context->priv().resourceProvider(), + sk_ref_sp(context->priv().opMemoryPool()), proxy->asRenderTargetProxy(), - context->contextPriv().getAuditTrail()); + context->priv().getAuditTrail()); // This assumes the particular values of kRanges. std::fill_n(result, result_width(), -1); std::fill_n(validResult, result_width(), -1); @@ -222,9 +222,9 @@ range.fOffset += pos; auto op = TestOp::Make(context.get(), value, range, result, &combinable); op->writeResult(validResult); - opList.addOp(std::move(op), *context->contextPriv().caps()); + opList.addOp(std::move(op), *context->priv().caps()); } - opList.makeClosed(*context->contextPriv().caps()); + opList.makeClosed(*context->priv().caps()); opList.prepare(&flushState); opList.execute(&flushState); opList.endFlush();
diff --git a/tests/PackedConfigsTextureTest.cpp b/tests/PackedConfigsTextureTest.cpp index e1ca67b..8983465 100644 --- a/tests/PackedConfigsTextureTest.cpp +++ b/tests/PackedConfigsTextureTest.cpp
@@ -117,7 +117,7 @@ origin, controlPixelData.begin(), 0); SkASSERT(proxy); - sk_sp<GrSurfaceContext> sContext = context->contextPriv().makeWrappedSurfaceContext( + sk_sp<GrSurfaceContext> sContext = context->priv().makeWrappedSurfaceContext( std::move(proxy)); if (!sContext->readPixels(dstInfo, readBuffer.begin(), 0, 0, 0)) {
diff --git a/tests/PathRendererCacheTests.cpp b/tests/PathRendererCacheTests.cpp index 4b7f969..505e5e3 100644 --- a/tests/PathRendererCacheTests.cpp +++ b/tests/PathRendererCacheTests.cpp
@@ -77,12 +77,12 @@ sk_sp<GrContext> ctx = GrContext::MakeMock(nullptr); // The cache needs to be big enough that nothing gets flushed, or our expectations can be wrong ctx->setResourceCacheLimits(100, 8000000); - GrResourceCache* cache = ctx->contextPriv().getResourceCache(); + GrResourceCache* cache = ctx->priv().getResourceCache(); const GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); - sk_sp<GrRenderTargetContext> rtc(ctx->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc(ctx->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, 800, 800, kRGBA_8888_GrPixelConfig, nullptr, 1, GrMipMapped::kNo, kTopLeft_GrSurfaceOrigin)); if (!rtc) { @@ -135,7 +135,7 @@ // Test that deleting the original path invalidates the textures cached by the SW path renderer DEF_GPUTEST(SoftwarePathRendererCacheTest, reporter, /* options */) { auto createPR = [](GrContext* ctx) { - return new GrSoftwarePathRenderer(ctx->contextPriv().proxyProvider(), true); + return new GrSoftwarePathRenderer(ctx->priv().proxyProvider(), true); }; // Software path renderer creates a mask texture and renders with a non-AA rect, but the flush
diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp index 7f7d8cdb..ba6e148 100644 --- a/tests/PrimitiveProcessorTest.cpp +++ b/tests/PrimitiveProcessorTest.cpp
@@ -33,7 +33,7 @@ const char* name() const override { return "Dummy Op"; } static std::unique_ptr<GrDrawOp> Make(GrContext* context, int numAttribs) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<Op>(numAttribs); } @@ -118,27 +118,27 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); #if GR_GPU_STATS - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); #endif const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); sk_sp<GrRenderTargetContext> renderTargetContext( - context->contextPriv().makeDeferredRenderTargetContext(format, SkBackingFit::kApprox, - 1, 1, kRGBA_8888_GrPixelConfig, - nullptr)); + context->priv().makeDeferredRenderTargetContext(format, SkBackingFit::kApprox, + 1, 1, kRGBA_8888_GrPixelConfig, + nullptr)); if (!renderTargetContext) { ERRORF(reporter, "Could not create render target context."); return; } - int attribCnt = context->contextPriv().caps()->maxVertexAttributes(); + int attribCnt = context->priv().caps()->maxVertexAttributes(); if (!attribCnt) { ERRORF(reporter, "No attributes allowed?!"); return; } context->flush(); - context->contextPriv().resetGpuStats(); + context->priv().resetGpuStats(); #if GR_GPU_STATS REPORTER_ASSERT(reporter, gpu->stats()->numDraws() == 0); REPORTER_ASSERT(reporter, gpu->stats()->numFailedDraws() == 0); @@ -154,7 +154,7 @@ REPORTER_ASSERT(reporter, gpu->stats()->numDraws() == 1); REPORTER_ASSERT(reporter, gpu->stats()->numFailedDraws() == 0); #endif - context->contextPriv().resetGpuStats(); + context->priv().resetGpuStats(); renderTargetContext->priv().testingOnly_addDrawOp(Op::Make(context, attribCnt + 1)); context->flush(); #if GR_GPU_STATS
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp index e854d69..6a5ce8c 100644 --- a/tests/ProcessorTest.cpp +++ b/tests/ProcessorTest.cpp
@@ -32,7 +32,7 @@ DEFINE_OP_CLASS_ID static std::unique_ptr<GrDrawOp> Make(GrContext* context, std::unique_ptr<GrFragmentProcessor> fp) { - GrOpMemoryPool* pool = context->contextPriv().opMemoryPool(); + GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate<TestOp>(std::move(fp)); } @@ -154,7 +154,7 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(ProcessorRefTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); GrSurfaceDesc desc; desc.fWidth = 10; @@ -162,12 +162,12 @@ desc.fConfig = kRGBA_8888_GrPixelConfig; const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); for (bool makeClone : {false, true}) { for (int parentCnt = 0; parentCnt < 2; parentCnt++) { sk_sp<GrRenderTargetContext> renderTargetContext( - context->contextPriv().makeDeferredRenderTargetContext( + context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kApprox, 1, 1, kRGBA_8888_GrPixelConfig, nullptr)); { @@ -352,7 +352,7 @@ } bool log_surface_proxy(GrContext* context, sk_sp<GrSurfaceProxy> src, SkString* dst) { - sk_sp<GrSurfaceContext> sContext(context->contextPriv().makeWrappedSurfaceContext(src)); + sk_sp<GrSurfaceContext> sContext(context->priv().makeWrappedSurfaceContext(src)); return log_surface_context(sContext, dst); } @@ -424,8 +424,8 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); - auto resourceProvider = context->contextPriv().resourceProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); + auto resourceProvider = context->priv().resourceProvider(); using FPFactory = GrFragmentProcessorTestFactory; uint32_t seed = FLAGS_processorSeed; @@ -438,11 +438,11 @@ SkRandom random(seed); const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); // Make the destination context for the test. static constexpr int kRenderSize = 256; - sk_sp<GrRenderTargetContext> rtc = context->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc = context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, kRenderSize, kRenderSize, kRGBA_8888_GrPixelConfig, nullptr); @@ -673,17 +673,17 @@ // progenitors. DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorCloneTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); - auto resourceProvider = context->contextPriv().resourceProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); + auto resourceProvider = context->priv().resourceProvider(); SkRandom random; const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); // Make the destination context for the test. static constexpr int kRenderSize = 1024; - sk_sp<GrRenderTargetContext> rtc = context->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtc = context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, kRenderSize, kRenderSize, kRGBA_8888_GrPixelConfig, nullptr);
diff --git a/tests/PromiseImageTest.cpp b/tests/PromiseImageTest.cpp index f0ba2962..1c5f5ea 100644 --- a/tests/PromiseImageTest.cpp +++ b/tests/PromiseImageTest.cpp
@@ -138,7 +138,7 @@ const int kHeight = 10; GrContext* ctx = ctxInfo.grContext(); - GrGpu* gpu = ctx->contextPriv().getGpu(); + GrGpu* gpu = ctx->priv().getGpu(); for (bool releaseImageEarly : {true, false}) { GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( @@ -295,7 +295,7 @@ const int kHeight = 10; GrContext* ctx = ctxInfo.grContext(); - GrGpu* gpu = ctx->contextPriv().getGpu(); + GrGpu* gpu = ctx->priv().getGpu(); GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( nullptr, kWidth, kHeight, GrColorType::kRGBA_8888, true, GrMipMapped::kNo); @@ -418,7 +418,7 @@ const int kHeight = 10; GrContext* ctx = ctxInfo.grContext(); - GrGpu* gpu = ctx->contextPriv().getGpu(); + GrGpu* gpu = ctx->priv().getGpu(); GrBackendTexture backendTex1 = gpu->createTestingOnlyBackendTexture( nullptr, kWidth, kHeight, GrColorType::kRGBA_8888, false, GrMipMapped::kNo); @@ -493,7 +493,7 @@ texKey1 = keys[0]; } REPORTER_ASSERT(reporter, texKey1.isValid()); - REPORTER_ASSERT(reporter, ctx->contextPriv().resourceProvider()->findByUniqueKey<>(texKey1)); + REPORTER_ASSERT(reporter, ctx->priv().resourceProvider()->findByUniqueKey<>(texKey1)); gpu->testingOnly_flushGpuAndSync(); balanceExpecation = ReleaseBalanceExpecation::kBalanced; @@ -509,10 +509,10 @@ promiseChecker.replaceTexture()->backendTexture(), backendTex1)); gpu->deleteTestingOnlyBackendTexture(backendTex1); - ctx->contextPriv().getResourceCache()->purgeAsNeeded(); + ctx->priv().getResourceCache()->purgeAsNeeded(); // We should have invalidated the key on the previously cached texture (after ensuring // invalidation messages have been processed by calling purgeAsNeeded.) - REPORTER_ASSERT(reporter, !ctx->contextPriv().resourceProvider()->findByUniqueKey<>(texKey1)); + REPORTER_ASSERT(reporter, !ctx->priv().resourceProvider()->findByUniqueKey<>(texKey1)); promiseChecker.replaceTexture(backendTex2); @@ -539,7 +539,7 @@ texKey2 = keys[0]; } REPORTER_ASSERT(reporter, texKey2.isValid() && texKey2 != texKey1); - REPORTER_ASSERT(reporter, ctx->contextPriv().resourceProvider()->findByUniqueKey<>(texKey2)); + REPORTER_ASSERT(reporter, ctx->priv().resourceProvider()->findByUniqueKey<>(texKey2)); REPORTER_ASSERT(reporter, check_fulfill_and_release_cnts(promiseChecker, balanceExpecation, @@ -563,8 +563,8 @@ // Because we have kept the SkPromiseImageTexture alive, we should be able to use it again and // hit the cache. - ctx->contextPriv().getResourceCache()->purgeAsNeeded(); - REPORTER_ASSERT(reporter, ctx->contextPriv().resourceProvider()->findByUniqueKey<>(texKey2)); + ctx->priv().getResourceCache()->purgeAsNeeded(); + REPORTER_ASSERT(reporter, ctx->priv().resourceProvider()->findByUniqueKey<>(texKey2)); canvas->drawImage(refImg, 0, 0); @@ -586,8 +586,8 @@ if (keys.count()) { REPORTER_ASSERT(reporter, texKey2 == keys[0]); } - ctx->contextPriv().getResourceCache()->purgeAsNeeded(); - REPORTER_ASSERT(reporter, ctx->contextPriv().resourceProvider()->findByUniqueKey<>(texKey2)); + ctx->priv().getResourceCache()->purgeAsNeeded(); + REPORTER_ASSERT(reporter, ctx->priv().resourceProvider()->findByUniqueKey<>(texKey2)); // Now we test keeping tex2 alive but fulfilling with a new texture. sk_sp<const SkPromiseImageTexture> promiseImageTexture2 = @@ -615,9 +615,9 @@ if (keys.count()) { texKey3 = keys[0]; } - ctx->contextPriv().getResourceCache()->purgeAsNeeded(); - REPORTER_ASSERT(reporter, !ctx->contextPriv().resourceProvider()->findByUniqueKey<>(texKey2)); - REPORTER_ASSERT(reporter, ctx->contextPriv().resourceProvider()->findByUniqueKey<>(texKey3)); + ctx->priv().getResourceCache()->purgeAsNeeded(); + REPORTER_ASSERT(reporter, !ctx->priv().resourceProvider()->findByUniqueKey<>(texKey2)); + REPORTER_ASSERT(reporter, ctx->priv().resourceProvider()->findByUniqueKey<>(texKey3)); gpu->deleteTestingOnlyBackendTexture(promiseImageTexture2->backendTexture()); // Make a new promise image also backed by texture 3. @@ -654,15 +654,15 @@ if (keys.count() > 0) { REPORTER_ASSERT(reporter, texKey3 == keys[0]); } - ctx->contextPriv().getResourceCache()->purgeAsNeeded(); + ctx->priv().getResourceCache()->purgeAsNeeded(); // If we delete the SkPromiseImageTexture we should trigger both key removals. REPORTER_ASSERT(reporter, GrBackendTexture::TestingOnly_Equals( promiseChecker.replaceTexture()->backendTexture(), backendTex3)); - ctx->contextPriv().getResourceCache()->purgeAsNeeded(); - REPORTER_ASSERT(reporter, !ctx->contextPriv().resourceProvider()->findByUniqueKey<>(texKey3)); + ctx->priv().getResourceCache()->purgeAsNeeded(); + REPORTER_ASSERT(reporter, !ctx->priv().resourceProvider()->findByUniqueKey<>(texKey3)); gpu->deleteTestingOnlyBackendTexture(backendTex3); // After deleting each image we should get a done call. @@ -695,7 +695,7 @@ const int kHeight = 10; GrContext* ctx = ctxInfo.grContext(); - GrGpu* gpu = ctx->contextPriv().getGpu(); + GrGpu* gpu = ctx->priv().getGpu(); GrBackendTexture backendTex1 = gpu->createTestingOnlyBackendTexture( nullptr, kWidth, kHeight, GrColorType::kGray_8, false, GrMipMapped::kNo); @@ -756,12 +756,12 @@ // Because they use different configs, each image should have created a different GrTexture // and they both should still be cached. - ctx->contextPriv().getResourceCache()->purgeAsNeeded(); + ctx->priv().getResourceCache()->purgeAsNeeded(); auto keys = promiseChecker.uniqueKeys(); REPORTER_ASSERT(reporter, keys.count() == 2); for (const auto& key : keys) { - auto surf = ctx->contextPriv().resourceProvider()->findByUniqueKey<GrSurface>(key); + auto surf = ctx->priv().resourceProvider()->findByUniqueKey<GrSurface>(key); REPORTER_ASSERT(reporter, surf && surf->asTexture()); if (surf && surf->asTexture()) { REPORTER_ASSERT(reporter, @@ -772,10 +772,10 @@ // Change the backing texture, this should invalidate the keys. promiseChecker.replaceTexture(); - ctx->contextPriv().getResourceCache()->purgeAsNeeded(); + ctx->priv().getResourceCache()->purgeAsNeeded(); for (const auto& key : keys) { - auto surf = ctx->contextPriv().resourceProvider()->findByUniqueKey<GrSurface>(key); + auto surf = ctx->priv().resourceProvider()->findByUniqueKey<GrSurface>(key); REPORTER_ASSERT(reporter, !surf); } } @@ -814,7 +814,7 @@ if (!ctx) { continue; } - GrGpu* gpu = ctx->contextPriv().getGpu(); + GrGpu* gpu = ctx->priv().getGpu(); GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( nullptr, kWidth, kHeight, GrColorType::kAlpha_8, false, GrMipMapped::kNo); @@ -863,7 +863,7 @@ const int kHeight = 10; GrContext* ctx = ctxInfo.grContext(); - GrGpu* gpu = ctx->contextPriv().getGpu(); + GrGpu* gpu = ctx->priv().getGpu(); GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( nullptr, kWidth, kHeight, GrColorType::kAlpha_8, false, GrMipMapped::kNo); @@ -893,7 +893,7 @@ GrSurfaceDesc desc; desc.fConfig = kRGBA_8888_GrPixelConfig; desc.fWidth = desc.fHeight = 100; - textures[i] = ctx->contextPriv().resourceProvider()->createTexture(desc, SkBudgeted::kYes); + textures[i] = ctx->priv().resourceProvider()->createTexture(desc, SkBudgeted::kYes); REPORTER_ASSERT(reporter, textures[i]); }
diff --git a/tests/ProxyConversionTest.cpp b/tests/ProxyConversionTest.cpp index 8913f9a..638092d 100644 --- a/tests/ProxyConversionTest.cpp +++ b/tests/ProxyConversionTest.cpp
@@ -58,8 +58,8 @@ // Test converting between RenderTargetProxies and TextureProxies for preinstantiated Proxies DEF_GPUTEST_FOR_RENDERING_CONTEXTS(PreinstantiatedProxyConversionTest, reporter, ctxInfo) { - GrProxyProvider* proxyProvider = ctxInfo.grContext()->contextPriv().proxyProvider(); - GrGpu* gpu = ctxInfo.grContext()->contextPriv().getGpu(); + GrProxyProvider* proxyProvider = ctxInfo.grContext()->priv().proxyProvider(); + GrGpu* gpu = ctxInfo.grContext()->priv().getGpu(); GrSurfaceDesc desc; desc.fFlags = kRenderTarget_GrSurfaceFlag; @@ -129,7 +129,7 @@ // Test converting between RenderTargetProxies and TextureProxies for deferred // Proxies DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DefferredProxyConversionTest, reporter, ctxInfo) { - GrProxyProvider* proxyProvider = ctxInfo.grContext()->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = ctxInfo.grContext()->priv().proxyProvider(); GrSurfaceDesc desc; desc.fFlags = kRenderTarget_GrSurfaceFlag; @@ -138,7 +138,7 @@ desc.fConfig = kRGBA_8888_GrPixelConfig; const GrBackendFormat format = - ctxInfo.grContext()->contextPriv().caps()->getBackendFormatFromColorType( + ctxInfo.grContext()->priv().caps()->getBackendFormatFromColorType( kRGBA_8888_SkColorType); { sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp index 5f3ce4f..90aac0c 100644 --- a/tests/ProxyRefTest.cpp +++ b/tests/ProxyRefTest.cpp
@@ -86,9 +86,9 @@ } DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ProxyRefTest, reporter, ctxInfo) { - GrProxyProvider* proxyProvider = ctxInfo.grContext()->contextPriv().proxyProvider(); - GrResourceProvider* resourceProvider = ctxInfo.grContext()->contextPriv().resourceProvider(); - const GrCaps* caps = ctxInfo.grContext()->contextPriv().caps(); + GrProxyProvider* proxyProvider = ctxInfo.grContext()->priv().proxyProvider(); + GrResourceProvider* resourceProvider = ctxInfo.grContext()->priv().resourceProvider(); + const GrCaps* caps = ctxInfo.grContext()->priv().caps(); for (auto make : { make_deferred, make_wrapped }) { // A single write
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp index 8c351b3..b638069 100644 --- a/tests/ProxyTest.cpp +++ b/tests/ProxyTest.cpp
@@ -105,9 +105,9 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DeferredProxyTest, reporter, ctxInfo) { - GrProxyProvider* proxyProvider = ctxInfo.grContext()->contextPriv().proxyProvider(); - GrResourceProvider* resourceProvider = ctxInfo.grContext()->contextPriv().resourceProvider(); - const GrCaps& caps = *ctxInfo.grContext()->contextPriv().caps(); + GrProxyProvider* proxyProvider = ctxInfo.grContext()->priv().proxyProvider(); + GrResourceProvider* resourceProvider = ctxInfo.grContext()->priv().resourceProvider(); + const GrCaps& caps = *ctxInfo.grContext()->priv().caps(); int attempt = 0; // useful for debugging @@ -210,10 +210,10 @@ } DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) { - GrProxyProvider* proxyProvider = ctxInfo.grContext()->contextPriv().proxyProvider(); - GrResourceProvider* resourceProvider = ctxInfo.grContext()->contextPriv().resourceProvider(); - GrGpu* gpu = ctxInfo.grContext()->contextPriv().getGpu(); - const GrCaps& caps = *ctxInfo.grContext()->contextPriv().caps(); + GrProxyProvider* proxyProvider = ctxInfo.grContext()->priv().proxyProvider(); + GrResourceProvider* resourceProvider = ctxInfo.grContext()->priv().resourceProvider(); + GrGpu* gpu = ctxInfo.grContext()->priv().getGpu(); + const GrCaps& caps = *ctxInfo.grContext()->priv().caps(); static const int kWidthHeight = 100; @@ -347,7 +347,7 @@ } DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ZeroSizedProxyTest, reporter, ctxInfo) { - GrProxyProvider* provider = ctxInfo.grContext()->contextPriv().proxyProvider(); + GrProxyProvider* provider = ctxInfo.grContext()->priv().proxyProvider(); for (auto flags : { kRenderTarget_GrSurfaceFlag, kNone_GrSurfaceFlags }) { for (auto fit : { SkBackingFit::kExact, SkBackingFit::kApprox }) { @@ -365,7 +365,7 @@ desc.fSampleCnt = 1; const GrBackendFormat format = - ctxInfo.grContext()->contextPriv().caps()->getBackendFormatFromColorType( + ctxInfo.grContext()->priv().caps()->getBackendFormatFromColorType( kRGBA_8888_SkColorType); sk_sp<GrTextureProxy> proxy = provider->createProxy(
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp index 29e50ff..46c7d14 100644 --- a/tests/ReadPixelsTest.cpp +++ b/tests/ReadPixelsTest.cpp
@@ -543,7 +543,7 @@ sk_sp<GrTextureProxy> proxy = sk_gpu_test::MakeTextureProxyFromData( context, isRT, DEV_W, DEV_H, bmp.colorType(), origin, bmp.getPixels(), bmp.rowBytes()); - sk_sp<GrSurfaceContext> sContext = context->contextPriv().makeWrappedSurfaceContext( + sk_sp<GrSurfaceContext> sContext = context->priv().makeWrappedSurfaceContext( std::move(proxy)); auto info = SkImageInfo::Make(DEV_W, DEV_H, kN32_SkColorType, kPremul_SkAlphaType); test_readpixels_texture(reporter, std::move(sContext), info);
diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp index f893b71..826ea9a 100644 --- a/tests/ReadWriteAlphaTest.cpp +++ b/tests/ReadWriteAlphaTest.cpp
@@ -48,7 +48,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); unsigned char alphaData[X_SIZE * Y_SIZE]; @@ -77,7 +77,7 @@ ERRORF(reporter, "Could not create alpha texture."); return; } - sk_sp<GrSurfaceContext> sContext(context->contextPriv().makeWrappedSurfaceContext( + sk_sp<GrSurfaceContext> sContext(context->priv().makeWrappedSurfaceContext( std::move(proxy))); sk_sp<SkSurface> surf(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, ii)); @@ -195,7 +195,7 @@ continue; } - sk_sp<GrSurfaceContext> sContext = context->contextPriv().makeWrappedSurfaceContext( + sk_sp<GrSurfaceContext> sContext = context->priv().makeWrappedSurfaceContext( std::move(proxy)); for (auto rowBytes : kRowBytes) {
diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp index 7ca72fc..e9f286f 100644 --- a/tests/RectangleTextureTest.cpp +++ b/tests/RectangleTextureTest.cpp
@@ -25,7 +25,7 @@ sk_sp<GrTextureProxy> rectProxy, uint32_t expectedPixelValues[]) { GrBackendFormat format = rectProxy->backendFormat().makeTexture2D(); SkASSERT(format.isValid()); - sk_sp<GrRenderTargetContext> rtContext(context->contextPriv().makeDeferredRenderTargetContext( + sk_sp<GrRenderTargetContext> rtContext(context->priv().makeDeferredRenderTargetContext( format, SkBackingFit::kExact, rectProxy->width(), rectProxy->height(), rectProxy->config(), @@ -93,7 +93,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(RectangleTexture, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); sk_gpu_test::GLTestContext* glContext = ctxInfo.glContext(); static const int kWidth = 13; static const int kHeight = 13; @@ -159,13 +159,13 @@ test_copy_from_surface(reporter, context, rectProxy.get(), refPixels, false, "RectangleTexture-copy-from"); - sk_sp<GrSurfaceContext> rectContext = context->contextPriv().makeWrappedSurfaceContext( + sk_sp<GrSurfaceContext> rectContext = context->priv().makeWrappedSurfaceContext( std::move(rectProxy)); SkASSERT(rectContext); test_read_pixels(reporter, rectContext.get(), refPixels, "RectangleTexture-read"); - test_copy_to_surface(reporter, context->contextPriv().proxyProvider(), + test_copy_to_surface(reporter, context->priv().proxyProvider(), rectContext.get(), "RectangleTexture-copy-to"); test_write_pixels(reporter, rectContext.get(), true, "RectangleTexture-write");
diff --git a/tests/ResourceAllocatorTest.cpp b/tests/ResourceAllocatorTest.cpp index f711691..a71221d 100644 --- a/tests/ResourceAllocatorTest.cpp +++ b/tests/ResourceAllocatorTest.cpp
@@ -59,8 +59,8 @@ static GrSurfaceProxy* make_backend(GrContext* context, const ProxyParams& p, GrBackendTexture* backendTex) { - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); + GrGpu* gpu = context->priv().getGpu(); *backendTex = gpu->createTestingOnlyBackendTexture(nullptr, p.fSize, p.fSize, p.fColorType, false, @@ -83,7 +83,7 @@ } static void cleanup_backend(GrContext* context, const GrBackendTexture& backendTex) { - context->contextPriv().getGpu()->deleteTestingOnlyBackendTexture(backendTex); + context->priv().getGpu()->deleteTestingOnlyBackendTexture(backendTex); } // Basic test that two proxies with overlapping intervals and compatible descriptors are @@ -138,9 +138,9 @@ } DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceAllocatorTest, reporter, ctxInfo) { - const GrCaps* caps = ctxInfo.grContext()->contextPriv().caps(); - GrProxyProvider* proxyProvider = ctxInfo.grContext()->contextPriv().proxyProvider(); - GrResourceProvider* resourceProvider = ctxInfo.grContext()->contextPriv().resourceProvider(); + const GrCaps* caps = ctxInfo.grContext()->priv().caps(); + GrProxyProvider* proxyProvider = ctxInfo.grContext()->priv().proxyProvider(); + GrResourceProvider* resourceProvider = ctxInfo.grContext()->priv().resourceProvider(); bool orig = resourceProvider->testingOnly_setExplicitlyAllocateGPUResources(true); @@ -185,9 +185,9 @@ p2->completedRead(); } - int k2 = ctxInfo.grContext()->contextPriv().caps()->getRenderTargetSampleCount( + int k2 = ctxInfo.grContext()->priv().caps()->getRenderTargetSampleCount( 2, kRGBA_8888_GrPixelConfig); - int k4 = ctxInfo.grContext()->contextPriv().caps()->getRenderTargetSampleCount( + int k4 = ctxInfo.grContext()->priv().caps()->getRenderTargetSampleCount( 4, kRGBA_8888_GrPixelConfig); //-------------------------------------------------------------------------------------------- @@ -268,7 +268,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceAllocatorStressTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrResourceProvider* resourceProvider = ctxInfo.grContext()->contextPriv().resourceProvider(); + GrResourceProvider* resourceProvider = ctxInfo.grContext()->priv().resourceProvider(); int maxNum; size_t maxBytes; @@ -320,7 +320,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(LazyDeinstantiation, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrResourceProvider* resourceProvider = ctxInfo.grContext()->contextPriv().resourceProvider(); + GrResourceProvider* resourceProvider = ctxInfo.grContext()->priv().resourceProvider(); for (auto explicitlyAllocating : {false, true}) { resourceProvider->testingOnly_setExplicitlyAllocateGPUResources(explicitlyAllocating); ProxyParams texParams; @@ -332,8 +332,8 @@ texParams.fSize = 100; ProxyParams rtParams = texParams; rtParams.fIsRT = true; - auto proxyProvider = context->contextPriv().proxyProvider(); - auto caps = context->contextPriv().caps(); + auto proxyProvider = context->priv().proxyProvider(); + auto caps = context->priv().caps(); auto p0 = make_lazy(proxyProvider, caps, texParams, true); auto p1 = make_lazy(proxyProvider, caps, texParams, false); texParams.fFit = rtParams.fFit = SkBackingFit::kApprox;
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp index e15eb81..4fdd674 100644 --- a/tests/ResourceCacheTest.cpp +++ b/tests/ResourceCacheTest.cpp
@@ -120,11 +120,11 @@ DEF_GPUTEST_FOR_CONTEXTS(ResourceCacheStencilBuffers, &is_rendering_and_not_angle_es3, reporter, ctxInfo, nullptr) { GrContext* context = ctxInfo.grContext(); - if (context->contextPriv().caps()->avoidStencilBuffers()) { + if (context->priv().caps()->avoidStencilBuffers()) { return; } - GrResourceProvider* resourceProvider = context->contextPriv().resourceProvider(); + GrResourceProvider* resourceProvider = context->priv().resourceProvider(); sk_sp<GrRenderTarget> smallRT0 = create_RT_with_SB(resourceProvider, 4, 1, SkBudgeted::kYes); REPORTER_ASSERT(reporter, smallRT0); @@ -154,7 +154,7 @@ } int smallSampleCount = - context->contextPriv().caps()->getRenderTargetSampleCount(2, kRGBA_8888_GrPixelConfig); + context->priv().caps()->getRenderTargetSampleCount(2, kRGBA_8888_GrPixelConfig); if (smallSampleCount > 1) { // An RT with a different sample count should not share. sk_sp<GrRenderTarget> smallMSAART0 = create_RT_with_SB(resourceProvider, 4, @@ -182,7 +182,7 @@ // But one with a larger sample count should not. (Also check that the two requests didn't // rounded up to the same actual sample count or else they could share.). - int bigSampleCount = context->contextPriv().caps()->getRenderTargetSampleCount( + int bigSampleCount = context->priv().caps()->getRenderTargetSampleCount( 5, kRGBA_8888_GrPixelConfig); if (bigSampleCount > 0 && bigSampleCount != smallSampleCount) { sk_sp<GrRenderTarget> smallMSAART2 = create_RT_with_SB(resourceProvider, 4, @@ -197,8 +197,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheWrappedResources, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrResourceProvider* resourceProvider = context->contextPriv().resourceProvider(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrResourceProvider* resourceProvider = context->priv().resourceProvider(); + GrGpu* gpu = context->priv().getGpu(); // this test is only valid for GL if (!gpu || !gpu->glContextForTesting()) { return; @@ -352,12 +352,12 @@ fContext = GrContext::MakeMock(nullptr); SkASSERT(fContext); fContext->setResourceCacheLimits(maxCnt, maxBytes); - GrResourceCache* cache = fContext->contextPriv().getResourceCache(); + GrResourceCache* cache = fContext->priv().getResourceCache(); cache->purgeAllUnlocked(); SkASSERT(0 == cache->getResourceCount() && 0 == cache->getResourceBytes()); } - GrResourceCache* cache() { return fContext->contextPriv().getResourceCache(); } + GrResourceCache* cache() { return fContext->priv().getResourceCache(); } GrContext* context() { return fContext.get(); } @@ -373,7 +373,7 @@ Mock mock(10, 30000); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); // Create a bunch of resources with no keys TestResource* a = new TestResource(gpu, SkBudgeted::kYes, 11); @@ -427,7 +427,7 @@ Mock mock(10, 30000); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); // Create two resource w/ a unique key and two w/o but all of which have scratch keys. TestResource* a = TestResource::CreateScratch(gpu, SkBudgeted::kYes, @@ -491,7 +491,7 @@ Mock mock(10, 300); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); GrUniqueKey uniqueKey; make_unique_key<0>(&uniqueKey, 0); @@ -618,7 +618,7 @@ Mock mock(10, 30000); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); GrUniqueKey uniqueKey; make_unique_key<0>(&uniqueKey, 0); @@ -691,7 +691,7 @@ Mock mock(10, 300); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); TestResource* resource = TestResource::CreateScratch(gpu, SkBudgeted::kNo, TestResource::kA_SimulatedProperty); @@ -758,7 +758,7 @@ Mock mock(5, 30000); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); // Create two resources that have the same scratch key. TestResource* a = TestResource::CreateScratch(gpu, @@ -804,7 +804,7 @@ Mock mock(5, 30000); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); // Create two resources that have the same scratch key. TestResource* a = TestResource::CreateScratch(gpu, SkBudgeted::kYes, @@ -864,7 +864,7 @@ Mock mock(5, 30000); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); // Create two resources that have the same scratch key. TestResource* a = TestResource::CreateScratch(gpu, SkBudgeted::kYes, @@ -924,7 +924,7 @@ Mock mock(5, 30000); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); GrUniqueKey key; make_unique_key<0>(&key, 0); @@ -1017,7 +1017,7 @@ Mock mock(5, 30000); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); GrUniqueKey key1, key2, key3; make_unique_key<0>(&key1, 1); @@ -1045,8 +1045,8 @@ typedef SkMessageBus<GrUniqueKeyInvalidatedMessage> Bus; // Invalidate two of the three, they should be purged and no longer accessible via their keys. - Bus::Post(Msg(key1, context->contextPriv().contextID())); - Bus::Post(Msg(key2, context->contextPriv().contextID())); + Bus::Post(Msg(key1, context->priv().contextID())); + Bus::Post(Msg(key2, context->priv().contextID())); cache->purgeAsNeeded(); // a should be deleted now, but we still have a ref on b. REPORTER_ASSERT(reporter, !cache->hasUniqueKey(key1)); @@ -1055,7 +1055,7 @@ REPORTER_ASSERT(reporter, cache->hasUniqueKey(key3)); // Invalidate the third. - Bus::Post(Msg(key3, context->contextPriv().contextID())); + Bus::Post(Msg(key3, context->priv().contextID())); cache->purgeAsNeeded(); // we still have a ref on b, c should be recycled as scratch. REPORTER_ASSERT(reporter, 2 == TestResource::NumAlive()); @@ -1086,7 +1086,7 @@ Mock mock(3, 30000); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); GrUniqueKey key1, key2; make_unique_key<0>(&key1, 1); @@ -1133,7 +1133,7 @@ Mock mock(kBudgetCnt, kBudgetSize); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); // Pick a random number of resources to add before the timestamp will wrap. cache->changeTimestamp(UINT32_MAX - random.nextULessThan(kCount + 1)); @@ -1190,7 +1190,7 @@ Mock mock(1000000, 1000000); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); static constexpr int kCnts[] = {1, 10, 1024}; auto nowish = []() { @@ -1293,7 +1293,7 @@ Mock mock(6, 100); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); enum TestsCase { kOnlyScratch_TestCase = 0, @@ -1386,7 +1386,7 @@ } // ensure all are purged before the next - context->contextPriv().purgeAllUnlockedResources_ForTesting(); + context->priv().purgeAllUnlockedResources_ForTesting(); REPORTER_ASSERT(reporter, 0 == cache->getBudgetedResourceCount()); REPORTER_ASSERT(reporter, 0 == cache->getPurgeableBytes()); @@ -1402,7 +1402,7 @@ Mock mock(2 * kResourceCnt, 2 * kResourceCnt + 1000); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); for (int i = 0; i < kResourceCnt; ++i) { GrUniqueKey key1, key2; @@ -1470,7 +1470,7 @@ static void test_abandoned(skiatest::Reporter* reporter) { Mock mock(10, 300); GrContext* context = mock.context(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); sk_sp<GrGpuResource> resource(new TestResource(gpu)); context->abandonContext(); @@ -1505,7 +1505,7 @@ Mock mock(kNumResources, kNumResources * TestResource::kDefaultSize); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); // tag strings are expected to be long lived std::vector<SkString> tagStrings; @@ -1542,7 +1542,7 @@ Mock mock(10, 30000); GrContext* context = mock.context(); GrResourceCache* cache = mock.cache(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); TestResource* wrapped1 = TestResource::CreateWrapped(gpu, GrWrapCacheable::kYes); cache->insertCrossContextGpuResource(wrapped1); @@ -1571,13 +1571,13 @@ cache->purgeAsNeeded(); // Send message to free the first resource - GrGpuResourceFreedMessage msg1{wrapped1, context->contextPriv().contextID()}; + GrGpuResourceFreedMessage msg1{wrapped1, context->priv().contextID()}; SkMessageBus<GrGpuResourceFreedMessage>::Post(msg1); cache->purgeAsNeeded(); REPORTER_ASSERT(reporter, 2 == TestResource::NumAlive()); - GrGpuResourceFreedMessage msg2{wrapped3, context->contextPriv().contextID()}; + GrGpuResourceFreedMessage msg2{wrapped3, context->priv().contextID()}; SkMessageBus<GrGpuResourceFreedMessage>::Post(msg2); cache->purgeAsNeeded(); @@ -1650,8 +1650,8 @@ // Texture-only, both-RT-and-Texture and MIPmapped DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GPUMemorySize, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); - GrResourceProvider* resourceProvider = context->contextPriv().resourceProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); + GrResourceProvider* resourceProvider = context->priv().resourceProvider(); static const int kSize = 64; @@ -1663,7 +1663,7 @@ size_t size = tex->gpuMemorySize(); REPORTER_ASSERT(reporter, kSize*kSize*4 == size); - size_t sampleCount = (size_t)context->contextPriv().caps()->getRenderTargetSampleCount( + size_t sampleCount = (size_t)context->priv().caps()->getRenderTargetSampleCount( 4, kRGBA_8888_GrPixelConfig); if (sampleCount >= 4) { tex = make_normal_texture(resourceProvider, kRenderTarget_GrSurfaceFlag, kSize, kSize, @@ -1682,7 +1682,7 @@ // Mipmapped versions - const GrCaps* caps = context->contextPriv().caps(); + const GrCaps* caps = context->priv().caps(); if (caps->mipMapSupport()) { sk_sp<GrTextureProxy> proxy; @@ -1691,7 +1691,7 @@ size_t size = proxy->gpuMemorySize(); REPORTER_ASSERT(reporter, kSize*kSize*4+(kSize*kSize*4)/3 == size); - size_t sampleCount = (size_t)context->contextPriv().caps()->getRenderTargetSampleCount( + size_t sampleCount = (size_t)context->priv().caps()->getRenderTargetSampleCount( 4, kRGBA_8888_GrPixelConfig); if (sampleCount >= 4) { proxy = make_mipmap_proxy(proxyProvider, caps, kRenderTarget_GrSurfaceFlag, kSize,
diff --git a/tests/SRGBReadWritePixelsTest.cpp b/tests/SRGBReadWritePixelsTest.cpp index 201a831..461b662 100644 --- a/tests/SRGBReadWritePixelsTest.cpp +++ b/tests/SRGBReadWritePixelsTest.cpp
@@ -205,9 +205,9 @@ GrSRGBEncoded srgbEncoded = GrSRGBEncoded::kNo; GrColorType colorType = GrPixelConfigToColorTypeAndEncoding(desc.fConfig, &srgbEncoded); const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromGrColorType(colorType, srgbEncoded); + context->priv().caps()->getBackendFormatFromGrColorType(colorType, srgbEncoded); - auto surfaceContext = context->contextPriv().makeDeferredSurfaceContext( + auto surfaceContext = context->priv().makeDeferredSurfaceContext( format, desc, kBottomLeft_GrSurfaceOrigin, GrMipMapped::kNo, SkBackingFit::kExact, SkBudgeted::kNo, encoding_as_color_space(contextEncoding)); if (!surfaceContext) { @@ -245,16 +245,16 @@ // are sRGB, linear, or untagged RGBA_8888. DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SRGBReadWritePixels, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - if (!context->contextPriv().caps()->isConfigRenderable(kSRGBA_8888_GrPixelConfig) && - !context->contextPriv().caps()->isConfigTexturable(kSRGBA_8888_GrPixelConfig)) { + if (!context->priv().caps()->isConfigRenderable(kSRGBA_8888_GrPixelConfig) && + !context->priv().caps()->isConfigTexturable(kSRGBA_8888_GrPixelConfig)) { return; } // We allow more error on GPUs with lower precision shader variables. - float error = context->contextPriv().caps()->shaderCaps()->halfIs32Bits() ? 0.5f : 1.2f; + float error = context->priv().caps()->shaderCaps()->halfIs32Bits() ? 0.5f : 1.2f; // For the all-sRGB case, we allow a small error only for devices that have // precision variation because the sRGB data gets converted to linear and back in // the shader. - float smallError = context->contextPriv().caps()->shaderCaps()->halfIs32Bits() ? 0.0f : 1.f; + float smallError = context->priv().caps()->shaderCaps()->halfIs32Bits() ? 0.0f : 1.f; /////////////////////////////////////////////////////////////////////////////////////////////// // Write sRGB data to a sRGB context - no conversion on the write.
diff --git a/tests/SpecialImageTest.cpp b/tests/SpecialImageTest.cpp index f9ba94a..529e906 100644 --- a/tests/SpecialImageTest.cpp +++ b/tests/SpecialImageTest.cpp
@@ -198,7 +198,7 @@ // Test out the SkSpecialImage::makeTextureImage entry point DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_MakeTexture, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); SkBitmap bm = create_bm(); const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize); @@ -255,7 +255,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_Gpu, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); SkBitmap bm = create_bm(); sk_sp<SkImage> rasterImage = SkImage::MakeFromBitmap(bm);
diff --git a/tests/SpecialSurfaceTest.cpp b/tests/SpecialSurfaceTest.cpp index a59c8ee..44df070 100644 --- a/tests/SpecialSurfaceTest.cpp +++ b/tests/SpecialSurfaceTest.cpp
@@ -79,7 +79,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialSurface_Gpu1, reporter, ctxInfo) { for (auto config : { kRGBA_8888_GrPixelConfig, kRGBA_1010102_GrPixelConfig }) { - const GrCaps* caps = ctxInfo.grContext()->contextPriv().caps(); + const GrCaps* caps = ctxInfo.grContext()->priv().caps(); if (!caps->isConfigRenderable(config)) { continue; }
diff --git a/tests/SurfaceSemaphoreTest.cpp b/tests/SurfaceSemaphoreTest.cpp index 66237fd..ccb05ff 100644 --- a/tests/SurfaceSemaphoreTest.cpp +++ b/tests/SurfaceSemaphoreTest.cpp
@@ -110,7 +110,7 @@ const sk_gpu_test::ContextInfo& childInfo2, bool flushContext) { GrContext* mainCtx = mainInfo.grContext(); - if (!mainCtx->contextPriv().caps()->fenceSyncSupport()) { + if (!mainCtx->priv().caps()->fenceSyncSupport()) { return; } @@ -127,7 +127,7 @@ #ifdef SK_VULKAN if (GrBackendApi::kVulkan == mainInfo.backend()) { // Initialize the secondary semaphore instead of having Ganesh create one internally - GrVkGpu* gpu = static_cast<GrVkGpu*>(mainCtx->contextPriv().getGpu()); + GrVkGpu* gpu = static_cast<GrVkGpu*>(mainCtx->priv().getGpu()); const GrVkInterface* interface = gpu->vkInterface(); VkDevice device = gpu->device(); @@ -212,7 +212,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(EmptySurfaceSemaphoreTest, reporter, ctxInfo) { GrContext* ctx = ctxInfo.grContext(); - if (!ctx->contextPriv().caps()->fenceSyncSupport()) { + if (!ctx->priv().caps()->fenceSyncSupport()) { return; } @@ -231,7 +231,7 @@ REPORTER_ASSERT(reporter, GrSemaphoresSubmitted::kYes == submitted); if (GrBackendApi::kOpenGL == ctxInfo.backend()) { - GrGLGpu* gpu = static_cast<GrGLGpu*>(ctx->contextPriv().getGpu()); + GrGLGpu* gpu = static_cast<GrGLGpu*>(ctx->priv().getGpu()); const GrGLInterface* interface = gpu->glInterface(); GrGLsync sync = semaphore.glSync(); REPORTER_ASSERT(reporter, sync); @@ -242,7 +242,7 @@ #ifdef SK_VULKAN if (GrBackendApi::kVulkan == ctxInfo.backend()) { - GrVkGpu* gpu = static_cast<GrVkGpu*>(ctx->contextPriv().getGpu()); + GrVkGpu* gpu = static_cast<GrVkGpu*>(ctx->priv().getGpu()); const GrVkInterface* interface = gpu->vkInterface(); VkDevice device = gpu->device(); VkQueue queue = gpu->queue();
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp index 42fc8a1..166ac6b 100644 --- a/tests/SurfaceTest.cpp +++ b/tests/SurfaceTest.cpp
@@ -100,7 +100,7 @@ REPORTER_ASSERT(reporter, can == SkToBool(surf), "ct: %d, can: %d, surf: %d", colorType, can, SkToBool(surf)); - auto* gpu = ctxInfo.grContext()->contextPriv().getGpu(); + auto* gpu = ctxInfo.grContext()->priv().getGpu(); GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( nullptr, kSize, kSize, colorType, true, GrMipMapped::kNo); surf = SkSurface::MakeFromBackendTexture(ctxInfo.grContext(), backendTex, @@ -141,7 +141,7 @@ if (surf) { auto* rtc = ((SkSurface_Gpu*)(surf.get()))->getDevice()->accessRenderTargetContext(); int storedCnt = rtc->numStencilSamples(); - int allowedCnt = ctxInfo.grContext()->contextPriv().caps()->getSampleCount( + int allowedCnt = ctxInfo.grContext()->priv().caps()->getSampleCount( storedCnt, rtc->asSurfaceProxy()->config()); REPORTER_ASSERT(reporter, storedCnt == allowedCnt, "Should store an allowed sample count (%d vs %d)", allowedCnt, @@ -157,7 +157,7 @@ if (surf) { auto* rtc = ((SkSurface_Gpu*)(surf.get()))->getDevice()->accessRenderTargetContext(); int storedCnt = rtc->numStencilSamples(); - int allowedCnt = ctxInfo.grContext()->contextPriv().caps()->getSampleCount( + int allowedCnt = ctxInfo.grContext()->priv().caps()->getSampleCount( storedCnt, rtc->asSurfaceProxy()->config()); REPORTER_ASSERT(reporter, storedCnt == allowedCnt, "Should store an allowed sample count (%d vs %d)", allowedCnt, @@ -195,7 +195,7 @@ if (!max) { continue; } - auto* gpu = ctxInfo.grContext()->contextPriv().getGpu(); + auto* gpu = ctxInfo.grContext()->priv().getGpu(); GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( nullptr, kSize, kSize, colorType, true, GrMipMapped::kNo); if (!backendTex.isValid()) { @@ -655,7 +655,7 @@ static sk_sp<SkSurface> create_gpu_surface_backend_texture( GrContext* context, int sampleCnt, uint32_t color, GrBackendTexture* outTexture) { - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); // On Pixel and Pixel2XL's with Adreno 530 and 540s, setting width and height to 10s reliably // triggers what appears to be a driver race condition where the 10x10 surface from the @@ -703,7 +703,7 @@ static sk_sp<SkSurface> create_gpu_surface_backend_texture_as_render_target( GrContext* context, int sampleCnt, uint32_t color, GrBackendTexture* outTexture) { - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); const int kWidth = 10; const int kHeight = 10; @@ -770,7 +770,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SurfaceClear_Gpu, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); std::function<sk_sp<GrSurfaceContext>(SkSurface*)> grSurfaceContextGetters[] = { [] (SkSurface* s){ @@ -781,8 +781,8 @@ SkImage_Gpu* gpuImage = (SkImage_Gpu *) as_IB(i); sk_sp<GrTextureProxy> proxy = gpuImage->asTextureProxyRef(); GrContext* context = gpuImage->context(); - return context->contextPriv().makeWrappedSurfaceContext(std::move(proxy), - gpuImage->refColorSpace()); + return context->priv().makeWrappedSurfaceContext(std::move(proxy), + gpuImage->refColorSpace()); } }; @@ -848,7 +848,7 @@ } DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SurfacePartialDraw_Gpu, reporter, ctxInfo) { - GrGpu* gpu = ctxInfo.grContext()->contextPriv().getGpu(); + GrGpu* gpu = ctxInfo.grContext()->priv().getGpu(); if (!gpu) { return; } @@ -871,7 +871,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SurfaceAttachStencil_Gpu, reporter, ctxInfo) { - GrGpu* gpu = ctxInfo.grContext()->contextPriv().getGpu(); + GrGpu* gpu = ctxInfo.grContext()->priv().getGpu(); if (!gpu) { return; } @@ -880,7 +880,7 @@ } static const uint32_t kOrigColor = 0xFFAABBCC; - auto resourceProvider = ctxInfo.grContext()->contextPriv().resourceProvider(); + auto resourceProvider = ctxInfo.grContext()->priv().resourceProvider(); for (auto& surfaceFunc : {&create_gpu_surface_backend_texture, &create_gpu_surface_backend_texture_as_render_target}) {
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp index 58e0d5d..b2499ed 100644 --- a/tests/TessellatingPathRendererTests.cpp +++ b/tests/TessellatingPathRendererTests.cpp
@@ -668,8 +668,8 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) { GrContext* ctx = ctxInfo.grContext(); const GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); - sk_sp<GrRenderTargetContext> rtc(ctx->contextPriv().makeDeferredRenderTargetContext( + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + sk_sp<GrRenderTargetContext> rtc(ctx->priv().makeDeferredRenderTargetContext( format, 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 4a1d49c..3806104 100644 --- a/tests/TextBlobCacheTest.cpp +++ b/tests/TextBlobCacheTest.cpp
@@ -44,7 +44,7 @@ static const int kHeight = 768; static void setup_always_evict_atlas(GrContext* context) { - context->contextPriv().getAtlasManager()->setAtlasSizesToMinimum_ForTesting(); + context->priv().getAtlasManager()->setAtlasSizesToMinimum_ForTesting(); } // This test hammers the GPU textblobcache and font atlas @@ -58,7 +58,7 @@ // configure our context for maximum stressing of cache and atlas if (stressTest) { setup_always_evict_atlas(context); - context->contextPriv().setTextBlobCacheLimit_ForTesting(0); + context->priv().setTextBlobCacheLimit_ForTesting(0); } SkImageInfo info = SkImageInfo::Make(kWidth, kHeight, kN32_SkColorType, kPremul_SkAlphaType);
diff --git a/tests/TextureProxyTest.cpp b/tests/TextureProxyTest.cpp index ed43787..a0ebf73 100644 --- a/tests/TextureProxyTest.cpp +++ b/tests/TextureProxyTest.cpp
@@ -42,7 +42,7 @@ GrProxyProvider* proxyProvider, SkBackingFit fit) { const GrSurfaceDesc desc = make_desc(kNone_GrSurfaceFlags); GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(format, desc, kBottomLeft_GrSurfaceOrigin, fit, @@ -56,7 +56,7 @@ GrProxyProvider* proxyProvider, SkBackingFit fit) { const GrSurfaceDesc desc = make_desc(kRenderTarget_GrSurfaceFlag); GrBackendFormat format = - ctx->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + ctx->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(format, desc, kBottomLeft_GrSurfaceOrigin, fit, SkBudgeted::kYes); @@ -99,8 +99,8 @@ static sk_sp<GrTextureProxy> create_wrapped_backend(GrContext* context, SkBackingFit fit, sk_sp<GrTexture>* backingSurface) { - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); - GrResourceProvider* resourceProvider = context->contextPriv().resourceProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); + GrResourceProvider* resourceProvider = context->priv().resourceProvider(); const GrSurfaceDesc desc = make_desc(kNone_GrSurfaceFlags); @@ -125,9 +125,9 @@ sk_sp<GrTextureProxy> proxy) { static int id = 1; - GrResourceProvider* resourceProvider = context->contextPriv().resourceProvider(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); - GrResourceCache* cache = context->contextPriv().getResourceCache(); + GrResourceProvider* resourceProvider = context->priv().resourceProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); + GrResourceCache* cache = context->priv().getResourceCache(); int startCacheCount = cache->getResourceCount(); @@ -203,7 +203,7 @@ if (expectResourceToOutliveProxy) { proxy.reset(); - GrUniqueKeyInvalidatedMessage msg(texKey, context->contextPriv().contextID()); + GrUniqueKeyInvalidatedMessage msg(texKey, context->priv().contextID()); SkMessageBus<GrUniqueKeyInvalidatedMessage>::Post(msg); cache->purgeAsNeeded(); expectedCacheCount--; @@ -219,8 +219,8 @@ // Test if invalidating unique ids operates as expected for texture proxies. static void invalidation_test(GrContext* context, skiatest::Reporter* reporter) { - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); - GrResourceCache* cache = context->contextPriv().getResourceCache(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); + GrResourceCache* cache = context->priv().getResourceCache(); REPORTER_ASSERT(reporter, 0 == cache->getResourceCount()); sk_sp<SkImage> rasterImg; @@ -252,7 +252,7 @@ REPORTER_ASSERT(reporter, 1 == cache->getResourceCount()); textureImg = nullptr; - context->contextPriv().purgeAllUnlockedResources_ForTesting(); + context->priv().purgeAllUnlockedResources_ForTesting(); REPORTER_ASSERT(reporter, 0 == proxyProvider->numUniqueKeyProxies_TestOnly()); REPORTER_ASSERT(reporter, 0 == cache->getResourceCount()); @@ -260,9 +260,9 @@ // Test if invalidating unique ids prior to instantiating operates as expected static void invalidation_and_instantiation_test(GrContext* context, skiatest::Reporter* reporter) { - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); - GrResourceProvider* resourceProvider = context->contextPriv().resourceProvider(); - GrResourceCache* cache = context->contextPriv().getResourceCache(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); + GrResourceProvider* resourceProvider = context->priv().resourceProvider(); + GrResourceCache* cache = context->priv().getResourceCache(); REPORTER_ASSERT(reporter, 0 == cache->getResourceCount()); static GrUniqueKey::Domain d = GrUniqueKey::GenerateDomain(); @@ -278,7 +278,7 @@ // Send an invalidation message, which will be sitting in the cache's inbox SkMessageBus<GrUniqueKeyInvalidatedMessage>::Post( - GrUniqueKeyInvalidatedMessage(key, context->contextPriv().contextID())); + GrUniqueKeyInvalidatedMessage(key, context->priv().contextID())); REPORTER_ASSERT(reporter, 1 == proxyProvider->numUniqueKeyProxies_TestOnly()); REPORTER_ASSERT(reporter, 0 == cache->getResourceCount()); @@ -293,7 +293,7 @@ REPORTER_ASSERT(reporter, 1 == cache->getResourceCount()); proxy = nullptr; - context->contextPriv().purgeAllUnlockedResources_ForTesting(); + context->priv().purgeAllUnlockedResources_ForTesting(); REPORTER_ASSERT(reporter, 0 == proxyProvider->numUniqueKeyProxies_TestOnly()); REPORTER_ASSERT(reporter, 0 == cache->getResourceCount()); @@ -301,8 +301,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(TextureProxyTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); - GrResourceCache* cache = context->contextPriv().getResourceCache(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); + GrResourceCache* cache = context->priv().getResourceCache(); REPORTER_ASSERT(reporter, !proxyProvider->numUniqueKeyProxies_TestOnly()); REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
diff --git a/tests/TraceMemoryDumpTest.cpp b/tests/TraceMemoryDumpTest.cpp index f3de350..41685db 100644 --- a/tests/TraceMemoryDumpTest.cpp +++ b/tests/TraceMemoryDumpTest.cpp
@@ -73,7 +73,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SkTraceMemoryDump_ownedGLBuffer, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrGLGpu* gpu = static_cast<GrGLGpu*>(context->contextPriv().getGpu()); + GrGLGpu* gpu = static_cast<GrGLGpu*>(context->priv().getGpu()); const size_t kMemorySize = 1024; sk_sp<GrGLBuffer> buffer = GrGLBuffer::Make(gpu, kMemorySize, kVertex_GrBufferType, kDynamic_GrAccessPattern); @@ -83,7 +83,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SkTraceMemoryDump_ownedGLTexture, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrGLGpu* gpu = static_cast<GrGLGpu*>(context->contextPriv().getGpu()); + GrGLGpu* gpu = static_cast<GrGLGpu*>(context->priv().getGpu()); GrSurfaceDesc desc; desc.fFlags = kNone_GrSurfaceFlags; @@ -109,7 +109,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SkTraceMemoryDump_unownedGLTexture, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrGLGpu* gpu = static_cast<GrGLGpu*>(context->contextPriv().getGpu()); + GrGLGpu* gpu = static_cast<GrGLGpu*>(context->priv().getGpu()); GrSurfaceDesc desc; desc.fFlags = kNone_GrSurfaceFlags; @@ -135,7 +135,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SkTraceMemoryDump_ownedGLRenderTarget, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrGLGpu* gpu = static_cast<GrGLGpu*>(context->contextPriv().getGpu()); + GrGLGpu* gpu = static_cast<GrGLGpu*>(context->priv().getGpu()); GrSurfaceDesc sd; sd.fFlags = kRenderTarget_GrSurfaceFlag; @@ -157,7 +157,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SkTraceMemoryDump_unownedGLRenderTarget, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrGLGpu* gpu = static_cast<GrGLGpu*>(context->contextPriv().getGpu()); + GrGLGpu* gpu = static_cast<GrGLGpu*>(context->priv().getGpu()); GrSurfaceDesc sd; sd.fFlags = kRenderTarget_GrSurfaceFlag;
diff --git a/tests/TransferPixelsTest.cpp b/tests/TransferPixelsTest.cpp index 7840480..724f458 100644 --- a/tests/TransferPixelsTest.cpp +++ b/tests/TransferPixelsTest.cpp
@@ -58,12 +58,12 @@ void basic_transfer_test(skiatest::Reporter* reporter, GrContext* context, GrColorType colorType, bool renderTarget) { - if (GrCaps::kNone_MapFlags == context->contextPriv().caps()->mapBufferFlags()) { + if (GrCaps::kNone_MapFlags == context->priv().caps()->mapBufferFlags()) { return; } - auto resourceProvider = context->contextPriv().resourceProvider(); - GrGpu* gpu = context->contextPriv().getGpu(); + auto resourceProvider = context->priv().resourceProvider(); + GrGpu* gpu = context->priv().getGpu(); // set up the data const int kTextureWidth = 16; @@ -110,8 +110,8 @@ continue; } - if (!context->contextPriv().caps()->isConfigTexturable(desc.fConfig) || - (renderTarget && !context->contextPriv().caps()->isConfigRenderable(desc.fConfig))) { + if (!context->priv().caps()->isConfigTexturable(desc.fConfig) || + (renderTarget && !context->priv().caps()->isConfigRenderable(desc.fConfig))) { continue; }
diff --git a/tests/VkBackendSurfaceTest.cpp b/tests/VkBackendSurfaceTest.cpp index 68839aa..1f3cc65f 100644 --- a/tests/VkBackendSurfaceTest.cpp +++ b/tests/VkBackendSurfaceTest.cpp
@@ -28,7 +28,7 @@ DEF_GPUTEST_FOR_VULKAN_CONTEXT(VkImageLayoutTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrVkGpu* gpu = static_cast<GrVkGpu*>(context->contextPriv().getGpu()); + GrVkGpu* gpu = static_cast<GrVkGpu*>(context->priv().getGpu()); GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture(nullptr, 1, 1, GrColorType::kRGBA_8888,
diff --git a/tests/VkDrawableTest.cpp b/tests/VkDrawableTest.cpp index 35651d6..5693640 100644 --- a/tests/VkDrawableTest.cpp +++ b/tests/VkDrawableTest.cpp
@@ -167,7 +167,7 @@ // on before releasing the GrVkSecondaryCBDrawContext resources. To simulate that for this // test (and since we are running single threaded anyways), we will just force a sync of // the gpu and cpu here. - td->fContext->contextPriv().getGpu()->testingOnly_flushGpuAndSync(); + td->fContext->priv().getGpu()->testingOnly_flushGpuAndSync(); td->fDrawContext->releaseResources(); // We release the GrContext here manually to test that we waited long enough before @@ -216,7 +216,7 @@ }; void draw_drawable_test(skiatest::Reporter* reporter, GrContext* context, GrContext* childContext) { - GrVkGpu* gpu = static_cast<GrVkGpu*>(context->contextPriv().getGpu()); + GrVkGpu* gpu = static_cast<GrVkGpu*>(context->priv().getGpu()); const SkImageInfo ii = SkImageInfo::Make(DEV_W, DEV_H, kRGBA_8888_SkColorType, kPremul_SkAlphaType);
diff --git a/tests/VkHardwareBufferTest.cpp b/tests/VkHardwareBufferTest.cpp index 64b8ae1..b19ea38 100644 --- a/tests/VkHardwareBufferTest.cpp +++ b/tests/VkHardwareBufferTest.cpp
@@ -432,7 +432,7 @@ return; } - fGrContext->contextPriv().getGpu()->testingOnly_flushGpuAndSync(); + fGrContext->priv().getGpu()->testingOnly_flushGpuAndSync(); } bool flushSurfaceAndSignalSemaphore(skiatest::Reporter* reporter, sk_sp<SkSurface>) override;
diff --git a/tests/VkMakeCopyPipelineTest.cpp b/tests/VkMakeCopyPipelineTest.cpp index cee90ee..dbd40aa 100644 --- a/tests/VkMakeCopyPipelineTest.cpp +++ b/tests/VkMakeCopyPipelineTest.cpp
@@ -181,7 +181,7 @@ DEF_GPUTEST_FOR_VULKAN_CONTEXT(VkMakeCopyPipelineTest, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrVkGpu* gpu = static_cast<GrVkGpu*>(context->contextPriv().getGpu()); + GrVkGpu* gpu = static_cast<GrVkGpu*>(context->priv().getGpu()); TestVkCopyProgram copyProgram; copyProgram.test(gpu, reporter);
diff --git a/tests/VkWrapTests.cpp b/tests/VkWrapTests.cpp index a10efb2b..1bd64d9 100644 --- a/tests/VkWrapTests.cpp +++ b/tests/VkWrapTests.cpp
@@ -34,7 +34,7 @@ void wrap_tex_test(skiatest::Reporter* reporter, GrContext* context) { - GrVkGpu* gpu = static_cast<GrVkGpu*>(context->contextPriv().getGpu()); + GrVkGpu* gpu = static_cast<GrVkGpu*>(context->priv().getGpu()); GrBackendTexture origBackendTex = gpu->createTestingOnlyBackendTexture(nullptr, kW, kH, kColorType, false, @@ -87,7 +87,7 @@ } void wrap_rt_test(skiatest::Reporter* reporter, GrContext* context) { - GrVkGpu* gpu = static_cast<GrVkGpu*>(context->contextPriv().getGpu()); + GrVkGpu* gpu = static_cast<GrVkGpu*>(context->priv().getGpu()); GrBackendTexture origBackendTex = gpu->createTestingOnlyBackendTexture(nullptr, kW, kH, kColorType, true, @@ -129,7 +129,7 @@ } void wrap_trt_test(skiatest::Reporter* reporter, GrContext* context) { - GrVkGpu* gpu = static_cast<GrVkGpu*>(context->contextPriv().getGpu()); + GrVkGpu* gpu = static_cast<GrVkGpu*>(context->priv().getGpu()); GrBackendTexture origBackendTex = gpu->createTestingOnlyBackendTexture(nullptr, kW, kH, kColorType, true,
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp index 9ba16c9..a0400bf 100644 --- a/tests/WritePixelsTest.cpp +++ b/tests/WritePixelsTest.cpp
@@ -453,7 +453,7 @@ static void test_write_pixels_non_texture(skiatest::Reporter* reporter, GrContext* context, int sampleCnt) { - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); for (auto& origin : { kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin }) { GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( @@ -505,7 +505,7 @@ // in between uses of the shared backing resource). DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WritePixelsPendingIO, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); - GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + GrProxyProvider* proxyProvider = context->priv().proxyProvider(); static const int kFullSize = 62; static const int kHalfSize = 31; @@ -530,11 +530,11 @@ desc.fConfig = kRGBA_8888_GrPixelConfig; const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); + context->priv().caps()->getBackendFormatFromColorType(kRGBA_8888_SkColorType); sk_sp<GrTextureProxy> temp = proxyProvider->createProxy( format, desc, kTopLeft_GrSurfaceOrigin, SkBackingFit::kApprox, SkBudgeted::kYes); - temp->instantiate(context->contextPriv().resourceProvider()); + temp->instantiate(context->priv().resourceProvider()); } // Create the surfaces and flush them to ensure there is no lingering pendingIO
diff --git a/tests/skbug6653.cpp b/tests/skbug6653.cpp index e450a8e..8585c4e 100644 --- a/tests/skbug6653.cpp +++ b/tests/skbug6653.cpp
@@ -105,6 +105,6 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(skbug6653_noExplicitResourceAllocation, reporter, ctxInfo) { GrContext* ctx = ctxInfo.grContext(); ctx->flush(); - ctx->contextPriv().resourceProvider()->testingOnly_setExplicitlyAllocateGPUResources(false); + ctx->priv().resourceProvider()->testingOnly_setExplicitlyAllocateGPUResources(false); test_bug_6653(ctx, reporter, "No ERA"); }
diff --git a/tools/DDLPromiseImageHelper.cpp b/tools/DDLPromiseImageHelper.cpp index f24417a..6d9b318 100644 --- a/tools/DDLPromiseImageHelper.cpp +++ b/tools/DDLPromiseImageHelper.cpp
@@ -23,7 +23,7 @@ SkASSERT(!fTotalFulfills || fDoneCnt); if (fPromiseImageTexture) { - GrGpu* gpu = fContext->contextPriv().getGpu(); + GrGpu* gpu = fContext->priv().getGpu(); gpu->deleteTestingOnlyBackendTexture(fPromiseImageTexture->backendTexture()); } } @@ -32,7 +32,7 @@ const GrBackendTexture& backendTexture) { SkASSERT(!fUnreleasedFulfills); if (fPromiseImageTexture) { - GrGpu* gpu = fContext->contextPriv().getGpu(); + GrGpu* gpu = fContext->priv().getGpu(); gpu->deleteTestingOnlyBackendTexture(fPromiseImageTexture->backendTexture()); } fPromiseImageTexture = SkPromiseImageTexture::Make(backendTexture); @@ -107,7 +107,7 @@ } void DDLPromiseImageHelper::uploadAllToGPU(GrContext* context) { - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); SkASSERT(gpu); for (int i = 0; i < fImageInfo.count(); ++i) { @@ -151,7 +151,7 @@ } void DDLPromiseImageHelper::replaceEveryOtherPromiseTexture(GrContext* context) { - GrGpu* gpu = context->contextPriv().getGpu(); + GrGpu* gpu = context->priv().getGpu(); SkASSERT(gpu); for (int i = 0; i < fImageInfo.count(); i += 2) {
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp index b77c1f3..cbb420c 100644 --- a/tools/debugger/SkDebugCanvas.cpp +++ b/tools/debugger/SkDebugCanvas.cpp
@@ -218,7 +218,7 @@ GrAuditTrail* at = nullptr; GrContext* ctx = canvas->getGrContext(); if (ctx) { - at = ctx->contextPriv().getAuditTrail(); + at = ctx->priv().getAuditTrail(); } return at; }
diff --git a/tools/fiddle/fiddle_main.cpp b/tools/fiddle/fiddle_main.cpp index 9bee668..e8d258d 100644 --- a/tools/fiddle/fiddle_main.cpp +++ b/tools/fiddle/fiddle_main.cpp
@@ -122,7 +122,7 @@ return false; } - auto resourceProvider = context->contextPriv().resourceProvider(); + auto resourceProvider = context->priv().resourceProvider(); GrSurfaceDesc backingDesc; backingDesc.fFlags = kNone_GrSurfaceFlags;
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp index d932602..42b8322 100644 --- a/tools/gpu/GrContextFactory.cpp +++ b/tools/gpu/GrContextFactory.cpp
@@ -269,7 +269,7 @@ return ContextInfo(); } if (ContextOverrides::kRequireNVPRSupport & overrides) { - if (!grCtx->contextPriv().caps()->shaderCaps()->pathRenderingSupport()) { + if (!grCtx->priv().caps()->shaderCaps()->pathRenderingSupport()) { return ContextInfo(); } }
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp index f88c3b2..1e6ccbe 100644 --- a/tools/gpu/GrTest.cpp +++ b/tools/gpu/GrTest.cpp
@@ -244,7 +244,7 @@ const std::function<GrRenderTargetContext::WillAddOpFn>& willAddFn) { ASSERT_SINGLE_OWNER if (fRenderTargetContext->drawingManager()->wasAbandoned()) { - fRenderTargetContext->fContext->contextPriv().opMemoryPool()->release(std::move(op)); + fRenderTargetContext->fContext->priv().opMemoryPool()->release(std::move(op)); return; } SkDEBUGCODE(fRenderTargetContext->validate());
diff --git a/tools/gpu/ProxyUtils.cpp b/tools/gpu/ProxyUtils.cpp index c3fca84..d9f00e6 100644 --- a/tools/gpu/ProxyUtils.cpp +++ b/tools/gpu/ProxyUtils.cpp
@@ -25,34 +25,34 @@ sk_sp<GrTextureProxy> proxy; if (kBottomLeft_GrSurfaceOrigin == origin) { // We (soon will) only support using kBottomLeft with wrapped textures. - auto backendTex = context->contextPriv().getGpu()->createTestingOnlyBackendTexture( + auto backendTex = context->priv().getGpu()->createTestingOnlyBackendTexture( nullptr, width, height, colorType, isRT, GrMipMapped::kNo); if (!backendTex.isValid()) { return nullptr; } // Adopt ownership so our caller doesn't have to worry about deleting the backend texture. if (isRT) { - proxy = context->contextPriv().proxyProvider()->wrapRenderableBackendTexture( + proxy = context->priv().proxyProvider()->wrapRenderableBackendTexture( backendTex, origin, 1, kAdopt_GrWrapOwnership, GrWrapCacheable::kNo); } else { - proxy = context->contextPriv().proxyProvider()->wrapBackendTexture( + proxy = context->priv().proxyProvider()->wrapBackendTexture( backendTex, origin, kAdopt_GrWrapOwnership, GrWrapCacheable::kNo, kRW_GrIOType); } if (!proxy) { - context->contextPriv().getGpu()->deleteTestingOnlyBackendTexture(backendTex); + context->priv().getGpu()->deleteTestingOnlyBackendTexture(backendTex); return nullptr; } } else { GrPixelConfig config = GrColorTypeToPixelConfig(colorType, srgbEncoded); - if (!context->contextPriv().caps()->isConfigTexturable(config)) { + if (!context->priv().caps()->isConfigTexturable(config)) { return nullptr; } const GrBackendFormat format = - context->contextPriv().caps()->getBackendFormatFromGrColorType(colorType, - srgbEncoded); + context->priv().caps()->getBackendFormatFromGrColorType(colorType, + srgbEncoded); if (!format.isValid()) { return nullptr; } @@ -62,18 +62,18 @@ desc.fWidth = width; desc.fHeight = height; desc.fFlags = isRT ? kRenderTarget_GrSurfaceFlag : kNone_GrSurfaceFlags; - proxy = context->contextPriv().proxyProvider()->createProxy( + proxy = context->priv().proxyProvider()->createProxy( format, desc, origin, SkBackingFit::kExact, SkBudgeted::kYes); if (!proxy) { return nullptr; } } - auto sContext = context->contextPriv().makeWrappedSurfaceContext(proxy, nullptr); + auto sContext = context->priv().makeWrappedSurfaceContext(proxy, nullptr); if (!sContext) { return nullptr; } - if (!context->contextPriv().writeSurfacePixels(sContext.get(), 0, 0, width, height, colorType, - nullptr, data, rowBytes)) { + if (!context->priv().writeSurfacePixels(sContext.get(), 0, 0, width, height, colorType, + nullptr, data, rowBytes)) { return nullptr; } return proxy;
diff --git a/tools/skpbench/skpbench.cpp b/tools/skpbench/skpbench.cpp index 20e7bd5..d63ba7e 100644 --- a/tools/skpbench/skpbench.cpp +++ b/tools/skpbench/skpbench.cpp
@@ -407,7 +407,7 @@ exitf(ExitErr::kUnavailable, "failed to get GrPixelConfig from SkColorType: %d", config->getColorType()); } - int supportedSampleCount = ctx->contextPriv().caps()->getRenderTargetSampleCount( + int supportedSampleCount = ctx->priv().caps()->getRenderTargetSampleCount( config->getSamples(), grPixConfig); if (supportedSampleCount != config->getSamples()) { exitf(ExitErr::kUnavailable, "sample count %i not supported by platform",
diff --git a/tools/skqp/src/skqp.cpp b/tools/skqp/src/skqp.cpp index 7c41a99..f7e382d 100644 --- a/tools/skqp/src/skqp.cpp +++ b/tools/skqp/src/skqp.cpp
@@ -192,7 +192,7 @@ if (std::unique_ptr<sk_gpu_test::TestContext> testCtx = make_test_context(backend)) { testCtx->makeCurrent(); if (sk_sp<GrContext> ctx = testCtx->makeGrContext(context_options())) { - SkString info = ctx->contextPriv().dump(); + SkString info = ctx->priv().dump(); // remove null out.write(info.c_str(), info.size()); out.writeText(",\n");
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index 2ea6302..75730ca 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp
@@ -1584,7 +1584,7 @@ ImGui::RadioButton("Software", true); } else if (fWindow->sampleCount() > 1) { prButton(GpuPathRenderers::kAll); - if (ctx->contextPriv().caps()->shaderCaps()->pathRenderingSupport()) { + if (ctx->priv().caps()->shaderCaps()->pathRenderingSupport()) { prButton(GpuPathRenderers::kStencilAndCover); } prButton(GpuPathRenderers::kTessellating); @@ -1592,7 +1592,7 @@ } else { prButton(GpuPathRenderers::kAll); if (GrCoverageCountingPathRenderer::IsSupported( - *ctx->contextPriv().caps())) { + *ctx->priv().caps())) { prButton(GpuPathRenderers::kCoverageCounting); } prButton(GpuPathRenderers::kSmall); @@ -2074,7 +2074,7 @@ if (!ctx) { writer.appendString("Software"); } else { - const auto* caps = ctx->contextPriv().caps(); + const auto* caps = ctx->priv().caps(); writer.appendString(gPathRendererNames[GpuPathRenderers::kAll].c_str()); if (fWindow->sampleCount() > 1) {