diff options
author | bsalomon <bsalomon@google.com> | 2015-05-29 08:02:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-29 08:02:10 -0700 |
commit | 762286309545c8a1e4bbc05dcd1fe3085d2a1f47 (patch) | |
tree | 0b939756bc2106ec4bf46d90362c6292a2ae4435 /tests | |
parent | ff2f423d90147dba710186ec4b63de75da7be8ed (diff) |
Add direct getter for GrCaps to GrContext.
TBR=joshualitt@google.com
Committed: https://skia.googlesource.com/skia/+/9138c46e572085870638b6f7ad7fcdfcdf3cac99
Review URL: https://codereview.chromium.org/1149773005
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GrDrawTargetTest.cpp | 2 | ||||
-rw-r--r-- | tests/GrPorterDuffTest.cpp | 2 | ||||
-rw-r--r-- | tests/ResourceCacheTest.cpp | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/tests/GrDrawTargetTest.cpp b/tests/GrDrawTargetTest.cpp index 341eba5be9..14d4f78314 100644 --- a/tests/GrDrawTargetTest.cpp +++ b/tests/GrDrawTargetTest.cpp @@ -29,7 +29,7 @@ DEF_GPUTEST(GrDrawTarget, reporter, factory) { continue; } - test_print(reporter, grContext->getGpu()->caps()); + test_print(reporter, grContext->caps()); } } diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp index 314671200f..41a8b5aa59 100644 --- a/tests/GrPorterDuffTest.cpp +++ b/tests/GrPorterDuffTest.cpp @@ -949,7 +949,7 @@ static void test_no_dual_source_blending(skiatest::Reporter* reporter) { return; } - const GrCaps& caps = *ctx->getGpu()->caps(); + const GrCaps& caps = *ctx->caps(); if (caps.shaderCaps()->dualSourceBlendingSupport()) { SkFAIL("Null context failed to honor request for no ARB_blend_func_extended."); return; diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp index 71fb4e38b1..b9632ef8ba 100644 --- a/tests/ResourceCacheTest.cpp +++ b/tests/ResourceCacheTest.cpp @@ -122,7 +122,7 @@ static void test_stencil_buffers(skiatest::Reporter* reporter, GrContext* contex smallRT0->asRenderTarget()->renderTargetPriv().getStencilAttachment() != bigRT->asRenderTarget()->renderTargetPriv().getStencilAttachment()); - if (context->getMaxSampleCount() >= 4) { + if (context->caps()->maxSampleCount() >= 4) { // An RT with a different sample count should not share. GrSurfaceDesc smallMSAADesc = smallDesc; smallMSAADesc.fSampleCnt = 4; @@ -154,7 +154,8 @@ static void test_stencil_buffers(skiatest::Reporter* reporter, GrContext* contex smallMSAART1->asRenderTarget()->renderTargetPriv().getStencilAttachment()); // But not one with a larger sample count should not. (Also check that the request for 4 // samples didn't get rounded up to >= 8 or else they could share.). - if (context->getMaxSampleCount() >= 8 && smallMSAART0 && smallMSAART0->asRenderTarget() && + if (context->caps()->maxSampleCount() >= 8 && + smallMSAART0 && smallMSAART0->asRenderTarget() && smallMSAART0->asRenderTarget()->numSamples() < 8) { smallMSAADesc.fSampleCnt = 8; smallMSAART1.reset(cache->createTexture(smallMSAADesc, false)); |