diff options
author | 2012-09-07 18:24:43 +0000 | |
---|---|---|
committer | 2012-09-07 18:24:43 +0000 | |
commit | bdb1be599436a894ab88dfc323d14c0afb496a6f (patch) | |
tree | 20ea17e3db9751769b02b815637d164f47e67d62 | |
parent | 6c76d2410a087cedca932f9646977259b2ec056c (diff) |
Added cache stats printout to tests
http://codereview.appspot.com/6495104/
git-svn-id: http://skia.googlecode.com/svn/trunk@5438 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | tests/Test.h | 2 | ||||
-rw-r--r-- | tests/skia_test.cpp | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/tests/Test.h b/tests/Test.h index a3beb0c724..f87a7a07b2 100644 --- a/tests/Test.h +++ b/tests/Test.h @@ -103,10 +103,10 @@ namespace skiatest { GpuTest() : Test() { fContext = GetContext(); } + static GrContext* GetContext(); protected: GrContext* fContext; private: - static GrContext* GetContext(); }; typedef SkTRegistry<Test*, void*> TestRegistry; diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp index 7913874bf4..5c80a01fc3 100644 --- a/tests/skia_test.cpp +++ b/tests/skia_test.cpp @@ -8,6 +8,10 @@ #include "SkGraphics.h" #include "Test.h" +#if SK_SUPPORT_GPU +#include "GrContext.h" +#endif + using namespace skiatest; // need to explicitly declare this, or we get some weird infinite loop llist @@ -170,6 +174,16 @@ int main (int argc, char * const argv[]) { count, failCount, skipCount); } +#if SK_SUPPORT_GPU + +#if GR_CACHE_STATS + GrContext *gr = GpuTest::GetContext(); + + gr->printCacheStats(); +#endif + +#endif + SkGraphics::Term(); return (failCount == 0) ? 0 : 1; |