From c7fe0f708ccbf12bf2ad1374ff307940d2c93880 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Fri, 11 May 2018 10:14:21 -0400 Subject: Make GrCaps and GrShaderCaps private. Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps(). Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866 Reviewed-on: https://skia-review.googlesource.com/127389 Commit-Queue: Brian Salomon Reviewed-by: Greg Daniel --- tests/SurfaceTest.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tests/SurfaceTest.cpp') diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp index e757230aa1..965298a816 100644 --- a/tests/SurfaceTest.cpp +++ b/tests/SurfaceTest.cpp @@ -148,7 +148,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrContext_colorTypeSupportedAsSurface, report if (surf) { auto* rtc = ((SkSurface_Gpu*)(surf.get()))->getDevice()->accessRenderTargetContext(); int storedCnt = rtc->numStencilSamples(); - int allowedCnt = ctxInfo.grContext()->caps()->getSampleCount( + int allowedCnt = ctxInfo.grContext()->contextPriv().caps()->getSampleCount( storedCnt, rtc->asSurfaceProxy()->config()); REPORTER_ASSERT(reporter, storedCnt == allowedCnt, "Should store an allowed sample count (%d vs %d)", allowedCnt, @@ -164,7 +164,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrContext_colorTypeSupportedAsSurface, report if (surf) { auto* rtc = ((SkSurface_Gpu*)(surf.get()))->getDevice()->accessRenderTargetContext(); int storedCnt = rtc->numStencilSamples(); - int allowedCnt = ctxInfo.grContext()->caps()->getSampleCount( + int allowedCnt = ctxInfo.grContext()->contextPriv().caps()->getSampleCount( storedCnt, rtc->asSurfaceProxy()->config()); REPORTER_ASSERT(reporter, storedCnt == allowedCnt, "Should store an allowed sample count (%d vs %d)", allowedCnt, @@ -993,10 +993,11 @@ DEF_TEST(SurfaceCreationWithColorSpace, reporter) { #if SK_SUPPORT_GPU DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SurfaceCreationWithColorSpace_Gpu, reporter, ctxInfo) { - GrContext* context = ctxInfo.grContext(); + auto context = ctxInfo.grContext(); - bool f16Support = context->caps()->isConfigRenderable(kRGBA_half_GrPixelConfig); - bool supports1010102 = context->caps()->isConfigRenderable(kRGBA_1010102_GrPixelConfig); + bool f16Support = context->contextPriv().caps()->isConfigRenderable(kRGBA_half_GrPixelConfig); + bool supports1010102 = + context->contextPriv().caps()->isConfigRenderable(kRGBA_1010102_GrPixelConfig); auto surfaceMaker = [context](const SkImageInfo& info) { return SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info); }; @@ -1009,7 +1010,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SurfaceCreationWithColorSpace_Gpu, reporter, GrGpu* gpu = context->contextPriv().getGpu(); static const int kSize = 10; - GrPixelConfig config = SkImageInfo2GrPixelConfig(info, *context->caps()); + GrPixelConfig config = SkImageInfo2GrPixelConfig(info, *context->contextPriv().caps()); SkASSERT(kUnknown_GrPixelConfig != config); GrBackendTexture backendTex = gpu->createTestingOnlyBackendTexture( -- cgit v1.2.3