Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Unified Diff: tests/ResourceCacheTest.cpp

Issue 1149773005: Add direct getter for GrCaps to GrContext. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: init caps in the right place Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/GrPorterDuffTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ResourceCacheTest.cpp
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index 71fb4e38b196f807b5ef1d7d51ce376be0ce2992..b9632ef8ba8d1fbb7827c08efc09c8a764899f7a 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));
« no previous file with comments | « tests/GrPorterDuffTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698