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 <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index e757230..965298a 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -148,7 +148,7 @@
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 @@
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 @@
#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 @@
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(