aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/gmmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/gmmain.cpp')
-rw-r--r--gm/gmmain.cpp13
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;
}