aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SurfaceTest.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-05-11 10:14:21 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-11 14:47:27 +0000
commitc7fe0f708ccbf12bf2ad1374ff307940d2c93880 (patch)
treecc4e63c994ac6af6ddab2f0fa063dbf800e2dd8a /tests/SurfaceTest.cpp
parent244f754cdd6ba1c5917a65cd94fe0bf87e3a7339 (diff)
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>
Diffstat (limited to 'tests/SurfaceTest.cpp')
-rw-r--r--tests/SurfaceTest.cpp13
1 files changed, 7 insertions, 6 deletions
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(