Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Side by Side Diff: tests/PathOpsThreadedCommon.h

Issue 531653002: SkThreadPool ~~> SkTaskGroup (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup allowThreaded() Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 15 matching lines...) Expand all
26 unsigned char fD; 26 unsigned char fD;
27 char* fPathStr; 27 char* fPathStr;
28 const char* fKey; 28 const char* fKey;
29 char fSerialNo[256]; 29 char fSerialNo[256];
30 skiatest::Reporter* fReporter; 30 skiatest::Reporter* fReporter;
31 SkBitmap* fBitmap; 31 SkBitmap* fBitmap;
32 }; 32 };
33 33
34 class PathOpsThreadedTestRunner { 34 class PathOpsThreadedTestRunner {
35 public: 35 public:
36 PathOpsThreadedTestRunner(skiatest::Reporter* reporter, int threadCount) 36 PathOpsThreadedTestRunner(skiatest::Reporter* reporter) : fReporter(reporter ) {}
37 : fNumThreads(threadCount)
38 , fReporter(reporter) {
39 }
40 37
41 ~PathOpsThreadedTestRunner(); 38 ~PathOpsThreadedTestRunner();
42 39
43 void render(); 40 void render();
44 41
45 public: 42 public:
46 int fNumThreads;
47 SkTDArray<PathOpsThreadedRunnable*> fRunnables; 43 SkTDArray<PathOpsThreadedRunnable*> fRunnables;
48 skiatest::Reporter* fReporter; 44 skiatest::Reporter* fReporter;
49 }; 45 };
50 46
51 class PathOpsThreadedRunnable : public SkRunnable { 47 class PathOpsThreadedRunnable : public SkRunnable {
52 public: 48 public:
53 PathOpsThreadedRunnable(void (*testFun)(PathOpsThreadState*), int a, int b, int c, int d, 49 PathOpsThreadedRunnable(void (*testFun)(PathOpsThreadState*), int a, int b, int c, int d,
54 PathOpsThreadedTestRunner* runner) { 50 PathOpsThreadedTestRunner* runner) {
55 fState.fA = a; 51 fState.fA = a;
56 fState.fB = b; 52 fState.fB = b;
(...skipping 28 matching lines...) Expand all
85 SkGraphics::SetTLSFontCacheLimit(1 * 1024 * 1024); 81 SkGraphics::SetTLSFontCacheLimit(1 * 1024 * 1024);
86 (*fTestFun)(&fState); 82 (*fTestFun)(&fState);
87 } 83 }
88 84
89 private: 85 private:
90 PathOpsThreadState fState; 86 PathOpsThreadState fState;
91 void (*fTestFun)(PathOpsThreadState*); 87 void (*fTestFun)(PathOpsThreadState*);
92 }; 88 };
93 89
94 #endif 90 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698