From 175af0d01177fc6e5a81e979cd2ae3009c375940 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Wed, 9 Aug 2017 14:29:36 -0400 Subject: GrContext::dump that produces JSON formatted output Includes caps, GL strings, and extensions Bug: skia: Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef Reviewed-on: https://skia-review.googlesource.com/32340 Commit-Queue: Brian Osman Reviewed-by: Brian Salomon --- tests/GrContextFactoryTest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/GrContextFactoryTest.cpp') diff --git a/tests/GrContextFactoryTest.cpp b/tests/GrContextFactoryTest.cpp index d4d5667152..098b2d61a9 100644 --- a/tests/GrContextFactoryTest.cpp +++ b/tests/GrContextFactoryTest.cpp @@ -139,4 +139,10 @@ DEF_GPUTEST(GrContextFactory_sharedContexts, reporter, /*factory*/) { } } +DEF_GPUTEST_FOR_ALL_CONTEXTS(GrContextDump, reporter, ctxInfo) { + // Ensure that GrContext::dump doesn't assert (which is possible, if the JSON code is wrong) + SkString result = ctxInfo.grContext()->dump(); + REPORTER_ASSERT(reporter, !result.isEmpty()); +} + #endif -- cgit v1.2.3