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

Side by Side Diff: tests/PathOpsExtendedTest.cpp

Issue 371853005: Move threadpool code from include/utils to tools/threadpool. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: gyp Created 6 years, 5 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
« no previous file with comments | « tests/OnceTest.cpp ('k') | tests/PathOpsSkpClipTest.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 7
8 #include "PathOpsExtendedTest.h" 8 #include "PathOpsExtendedTest.h"
9 #include "PathOpsThreadedCommon.h" 9 #include "PathOpsThreadedCommon.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 #include "SkForceLinking.h" 12 #include "SkForceLinking.h"
13 #include "SkMatrix.h" 13 #include "SkMatrix.h"
14 #include "SkPaint.h" 14 #include "SkPaint.h"
15 #include "SkRTConf.h" 15 #include "SkRTConf.h"
16 #include "SkStream.h" 16 #include "SkStream.h"
17 #include "SkThread.h" 17 #include "SkThread.h"
18 #include "SkThreadPool.h" 18 #include "ThreadPool.h"
19 19
20 #ifdef SK_BUILD_FOR_MAC 20 #ifdef SK_BUILD_FOR_MAC
21 #include <sys/sysctl.h> 21 #include <sys/sysctl.h>
22 #endif 22 #endif
23 23
24 __SK_FORCE_IMAGE_DECODER_LINKING; 24 __SK_FORCE_IMAGE_DECODER_LINKING;
25 25
26 static const char marker[] = 26 static const char marker[] =
27 "</div>\n" 27 "</div>\n"
28 "\n" 28 "\n"
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 inFile.read(inData.begin(), inLen); 688 inFile.read(inData.begin(), inLen);
689 inFile.setPath(NULL); 689 inFile.setPath(NULL);
690 char* insert = strstr(inData.begin(), marker); 690 char* insert = strstr(inData.begin(), marker);
691 if (insert) { 691 if (insert) {
692 insert += sizeof(marker) - 1; 692 insert += sizeof(marker) - 1;
693 const char* numLoc = insert + 4 /* indent spaces */ + testNameSi ze - 1; 693 const char* numLoc = insert + 4 /* indent spaces */ + testNameSi ze - 1;
694 testNumber = atoi(numLoc) + 1; 694 testNumber = atoi(numLoc) + 1;
695 } 695 }
696 } 696 }
697 } 697 }
698 return reporter->allowThreaded() ? SkThreadPool::kThreadPerCore : 1; 698 return reporter->allowThreaded() ? ThreadPool::kThreadPerCore : 1;
699 } 699 }
700 700
701 void outputProgress(char* ramStr, const char* pathStr, SkPath::FillType pathFill Type) { 701 void outputProgress(char* ramStr, const char* pathStr, SkPath::FillType pathFill Type) {
702 const char testFunction[] = "testSimplify(path);"; 702 const char testFunction[] = "testSimplify(path);";
703 const char* pathPrefix = NULL; 703 const char* pathPrefix = NULL;
704 const char* nameSuffix = NULL; 704 const char* nameSuffix = NULL;
705 if (pathFillType == SkPath::kEvenOdd_FillType) { 705 if (pathFillType == SkPath::kEvenOdd_FillType) {
706 pathPrefix = " path.setFillType(SkPath::kEvenOdd_FillType);\n"; 706 pathPrefix = " path.setFillType(SkPath::kEvenOdd_FillType);\n";
707 nameSuffix = "x"; 707 nameSuffix = "x";
708 } 708 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 if (tests[index].fun == stopTest) { 749 if (tests[index].fun == stopTest) {
750 SkDebugf("lastTest\n"); 750 SkDebugf("lastTest\n");
751 break; 751 break;
752 } 752 }
753 if (index == last) { 753 if (index == last) {
754 break; 754 break;
755 } 755 }
756 index += reverse ? -1 : 1; 756 index += reverse ? -1 : 1;
757 } while (true); 757 } while (true);
758 } 758 }
OLDNEW
« no previous file with comments | « tests/OnceTest.cpp ('k') | tests/PathOpsSkpClipTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698