OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #ifndef PathOpsThreadedCommon_DEFINED | 7 #ifndef PathOpsThreadedCommon_DEFINED |
8 #define PathOpsThreadedCommon_DEFINED | 8 #define PathOpsThreadedCommon_DEFINED |
9 | 9 |
10 #include "SkGraphics.h" | 10 #include "SkGraphics.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 PathOpsThreadedRunnable(void (*testFun)(PathOpsThreadState*), int dirNo, con
st char* str, | 67 PathOpsThreadedRunnable(void (*testFun)(PathOpsThreadState*), int dirNo, con
st char* str, |
68 PathOpsThreadedTestRunner* runner) { | 68 PathOpsThreadedTestRunner* runner) { |
69 SkASSERT(strlen(str) < sizeof(fState.fSerialNo) - 1); | 69 SkASSERT(strlen(str) < sizeof(fState.fSerialNo) - 1); |
70 fState.fA = dirNo; | 70 fState.fA = dirNo; |
71 strcpy(fState.fSerialNo, str); | 71 strcpy(fState.fSerialNo, str); |
72 fState.fReporter = runner->fReporter; | 72 fState.fReporter = runner->fReporter; |
73 fTestFun = testFun; | 73 fTestFun = testFun; |
74 } | 74 } |
75 | 75 |
76 void run() SK_OVERRIDE { | 76 void run() override { |
77 SkBitmap bitmap; | 77 SkBitmap bitmap; |
78 fState.fBitmap = &bitmap; | 78 fState.fBitmap = &bitmap; |
79 char pathStr[PATH_STR_SIZE]; | 79 char pathStr[PATH_STR_SIZE]; |
80 fState.fPathStr = pathStr; | 80 fState.fPathStr = pathStr; |
81 SkGraphics::SetTLSFontCacheLimit(1 * 1024 * 1024); | 81 SkGraphics::SetTLSFontCacheLimit(1 * 1024 * 1024); |
82 (*fTestFun)(&fState); | 82 (*fTestFun)(&fState); |
83 } | 83 } |
84 | 84 |
85 private: | 85 private: |
86 PathOpsThreadState fState; | 86 PathOpsThreadState fState; |
87 void (*fTestFun)(PathOpsThreadState*); | 87 void (*fTestFun)(PathOpsThreadState*); |
88 }; | 88 }; |
89 | 89 |
90 #endif | 90 #endif |
OLD | NEW |