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

Side by Side Diff: tests/PathOpsThreadedCommon.h

Issue 52653002: pathops work in progress (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add raster vs gpu test Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « tests/PathOpsSkpTest.cpp ('k') | tests/PathOpsTypesTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 PathOpsThreadedRunnable(void (*testFun)(PathOpsThreadState*), const char* st r, 63 PathOpsThreadedRunnable(void (*testFun)(PathOpsThreadState*), const char* st r,
64 PathOpsThreadedTestRunner* runner) { 64 PathOpsThreadedTestRunner* runner) {
65 SkASSERT(strlen(str) < sizeof(fState.fSerialNo) - 1); 65 SkASSERT(strlen(str) < sizeof(fState.fSerialNo) - 1);
66 strcpy(fState.fSerialNo, str); 66 strcpy(fState.fSerialNo, str);
67 fState.fReporter = runner->fReporter; 67 fState.fReporter = runner->fReporter;
68 fTestFun = testFun; 68 fTestFun = testFun;
69 } 69 }
70 70
71 PathOpsThreadedRunnable(void (*testFun)(PathOpsThreadState*), int dirNo, con st char* str,
72 PathOpsThreadedTestRunner* runner) {
73 SkASSERT(strlen(str) < sizeof(fState.fSerialNo) - 1);
74 fState.fA = dirNo;
75 strcpy(fState.fSerialNo, str);
76 fState.fReporter = runner->fReporter;
77 fTestFun = testFun;
78 }
79
71 virtual void run() SK_OVERRIDE { 80 virtual void run() SK_OVERRIDE {
72 SkBitmap bitmap; 81 SkBitmap bitmap;
73 fState.fBitmap = &bitmap; 82 fState.fBitmap = &bitmap;
74 char pathStr[PATH_STR_SIZE]; 83 char pathStr[PATH_STR_SIZE];
75 fState.fPathStr = pathStr; 84 fState.fPathStr = pathStr;
76 SkGraphics::SetTLSFontCacheLimit(1 * 1024 * 1024); 85 SkGraphics::SetTLSFontCacheLimit(1 * 1024 * 1024);
77 (*fTestFun)(&fState); 86 (*fTestFun)(&fState);
78 } 87 }
79 88
80 private: 89 private:
81 PathOpsThreadState fState; 90 PathOpsThreadState fState;
82 void (*fTestFun)(PathOpsThreadState*); 91 void (*fTestFun)(PathOpsThreadState*);
83 }; 92 };
84 93
85 #endif 94 #endif
OLDNEW
« no previous file with comments | « tests/PathOpsSkpTest.cpp ('k') | tests/PathOpsTypesTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698