| OLD | NEW | 
|---|
| 1 #include "CrashHandler.h" | 1 #include "CrashHandler.h" | 
| 2 // #include "OverwriteLine.h" | 2 // #include "OverwriteLine.h" | 
| 3 #include "Resources.h" | 3 #include "Resources.h" | 
| 4 #include "SkBitmap.h" | 4 #include "SkBitmap.h" | 
| 5 #include "SkCanvas.h" | 5 #include "SkCanvas.h" | 
| 6 #include "SkColor.h" | 6 #include "SkColor.h" | 
| 7 #include "SkColorPriv.h" | 7 #include "SkColorPriv.h" | 
| 8 #include "SkCommandLineFlags.h" | 8 #include "SkCommandLineFlags.h" | 
| 9 #include "SkDevice.h" | 9 #include "SkDevice.h" | 
| 10 #include "SkForceLinking.h" | 10 #include "SkForceLinking.h" | 
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 246 }; | 246 }; | 
| 247 | 247 | 
| 248 struct TestRunner { | 248 struct TestRunner { | 
| 249     ~TestRunner(); | 249     ~TestRunner(); | 
| 250     void render(); | 250     void render(); | 
| 251     SkTDArray<class TestRunnable*> fRunnables; | 251     SkTDArray<class TestRunnable*> fRunnables; | 
| 252 }; | 252 }; | 
| 253 | 253 | 
| 254 class TestRunnable : public SkRunnable { | 254 class TestRunnable : public SkRunnable { | 
| 255 public: | 255 public: | 
| 256     virtual void run() SK_OVERRIDE { | 256     void run() SK_OVERRIDE { | 
| 257         SkGraphics::SetTLSFontCacheLimit(1 * 1024 * 1024); | 257         SkGraphics::SetTLSFontCacheLimit(1 * 1024 * 1024); | 
| 258         (*fTestFun)(&fState); | 258         (*fTestFun)(&fState); | 
| 259     } | 259     } | 
| 260 | 260 | 
| 261     TestState fState; | 261     TestState fState; | 
| 262     void (*fTestFun)(TestState*); | 262     void (*fTestFun)(TestState*); | 
| 263 }; | 263 }; | 
| 264 | 264 | 
| 265 | 265 | 
| 266 class TestRunnableDir : public TestRunnable { | 266 class TestRunnableDir : public TestRunnable { | 
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 812 }; | 812 }; | 
| 813 | 813 | 
| 814 typedef SkTRegistry<Test*(*)(void*)> TestRegistry; | 814 typedef SkTRegistry<Test*(*)(void*)> TestRegistry; | 
| 815 | 815 | 
| 816 #define DEF_TEST(name)                                        \ | 816 #define DEF_TEST(name)                                        \ | 
| 817     static void test_##name();                       \ | 817     static void test_##name();                       \ | 
| 818     class name##Class : public Test {                                   \ | 818     class name##Class : public Test {                                   \ | 
| 819     public:                                                             \ | 819     public:                                                             \ | 
| 820         static Test* Factory(void*) { return SkNEW(name##Class); }      \ | 820         static Test* Factory(void*) { return SkNEW(name##Class); }      \ | 
| 821     protected:                                                          \ | 821     protected:                                                          \ | 
| 822         virtual void onGetName(SkString* name) SK_OVERRIDE {            \ | 822         void onGetName(SkString* name) SK_OVERRIDE {            \ | 
| 823             name->set(#name);                                           \ | 823             name->set(#name);                                           \ | 
| 824         }                                                               \ | 824         }                                                               \ | 
| 825         virtual void onRun() SK_OVERRIDE { test_##name(); } \ | 825         void onRun() SK_OVERRIDE { test_##name(); } \ | 
| 826     };                                                                  \ | 826     };                                                                  \ | 
| 827     static TestRegistry gReg_##name##Class(name##Class::Factory);       \ | 827     static TestRegistry gReg_##name##Class(name##Class::Factory);       \ | 
| 828     static void test_##name() | 828     static void test_##name() | 
| 829 | 829 | 
| 830 DEF_TEST(PathOpsSkpClip) { | 830 DEF_TEST(PathOpsSkpClip) { | 
| 831     gDirs.setDefault(); | 831     gDirs.setDefault(); | 
| 832     initTest(); | 832     initTest(); | 
| 833     SkTArray<TestResult, true> errors; | 833     SkTArray<TestResult, true> errors; | 
| 834     TestState state; | 834     TestState state; | 
| 835     state.init(0); | 835     state.init(0); | 
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1097     } | 1097     } | 
| 1098     SkGraphics::Term(); | 1098     SkGraphics::Term(); | 
| 1099     return 0; | 1099     return 0; | 
| 1100 } | 1100 } | 
| 1101 | 1101 | 
| 1102 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 1102 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 
| 1103 int main(int argc, char * const argv[]) { | 1103 int main(int argc, char * const argv[]) { | 
| 1104     return tool_main(argc, (char**) argv); | 1104     return tool_main(argc, (char**) argv); | 
| 1105 } | 1105 } | 
| 1106 #endif | 1106 #endif | 
| OLD | NEW | 
|---|