diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-05 16:24:32 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-05 16:24:32 +0000 |
commit | 25c199343d2683a8eec1e12790b658710389f6fe (patch) | |
tree | 1b6d696c6e94fe0dfa778e65f2631c776f97b1f3 /gm | |
parent | 4384fabab41b26c7cf8f357a22181e7ba23e7822 (diff) |
Reverting r4162
git-svn-id: http://skia.googlecode.com/svn/trunk@4164 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r-- | gm/gmmain.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp index c6159e3944..6eb96fd227 100644 --- a/gm/gmmain.cpp +++ b/gm/gmmain.cpp @@ -21,7 +21,6 @@ #include "SkImageEncoder.h" #include "SkPicture.h" #include "SkStream.h" -#include "SkRefCnt.h" static bool gForceBWtext; @@ -805,7 +804,7 @@ private: } int main(int argc, char * const argv[]) { - SkGraphics::Init(); + SkAutoGraphics ag; // we don't need to see this during a run gSkSuppressFontCachePurgeSpew = true; @@ -893,7 +892,7 @@ int main(int argc, char * const argv[]) { GM::SetResourcePath(resourcePath); - GrContextFactory* grFactory = new GrContextFactory; + GrContextFactory grFactory; if (readPath) { fprintf(stderr, "reading from %s\n", readPath); @@ -936,7 +935,7 @@ int main(int argc, char * const argv[]) { SkAutoTUnref<GrRenderTarget> rt; AutoResetGr autogr; if (kGPU_Backend == gRec[i].fBackend) { - GrContext* gr = grFactory->get(gRec[i].fGLContextType); + GrContext* gr = grFactory.get(gRec[i].fGLContextType); if (!gr) { continue; } @@ -1037,11 +1036,5 @@ int main(int argc, char * const argv[]) { printf("Ran %d tests: %d passed, %d failed, %d missing reference images\n", testsRun, testsPassed, testsFailed, testsMissingReferenceImages); - delete grFactory; - SkGraphics::Term(); - - PRINT_INST_COUNT(SkRefCnt); - PRINT_INST_COUNT(GrResource); - return (0 == testsFailed) ? 0 : -1; } |