Cleanup: Use SkAutoGraphics in gm and tests.

BUG=None
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/704413002
This commit is contained in:
tfarina 2014-11-07 06:12:30 -08:00 committed by Commit bot
parent 0ee2627026
commit a71d3af100
2 changed files with 2 additions and 4 deletions

View File

@ -2257,7 +2257,7 @@ int tool_main(int argc, char** argv) {
}
#endif
SkGraphics::Init();
SkAutoGraphics ag;
setSystemPreferences();
GMMain gmmain;
@ -2474,7 +2474,6 @@ int tool_main(int argc, char** argv) {
delete grFactory;
#endif
SkGraphics::Term();
return (reportError) ? -1 : 0;
}

View File

@ -127,7 +127,7 @@ int test_main() {
}
#endif
SkGraphics::Init();
SkAutoGraphics ag;
{
SkString header("Skia UnitTests:");
@ -213,7 +213,6 @@ int test_main() {
SkDebugf("\nFinished %d tests, %d failures, %d skipped. (%d internal tests)",
toRun, failCount, skipCount, reporter.countTests());
}
SkGraphics::Term();
SkDebugf("\n");
return (failCount == 0) ? 0 : 1;