OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 #include "SkBenchmark.h" | 7 #include "SkBenchmark.h" |
8 #include "SkPaint.h" | 8 #include "SkPaint.h" |
9 #include "SkParse.h" | 9 #include "SkParse.h" |
10 | 10 |
11 const char* SkTriState::Name[] = { "default", "true", "false" }; | 11 const char* SkTriState::Name[] = { "default", "true", "false" }; |
12 | 12 |
13 SK_DEFINE_INST_COUNT(SkBenchmark) | 13 SK_DEFINE_INST_COUNT(SkBenchmark) |
14 | 14 |
15 template BenchRegistry* BenchRegistry::gHead; | 15 template BenchRegistry* BenchRegistry::gHead; |
16 | 16 |
17 SkString SkBenchmark::gResourcePath; | 17 SkString SkBenchmark::gResourcePath; |
18 | 18 |
19 SkBenchmark::SkBenchmark() { | 19 SkBenchmark::SkBenchmark() { |
20 fForceAlpha = 0xFF; | 20 fForceAlpha = 0xFF; |
21 fForceAA = true; | 21 fForceAA = true; |
22 fForceFilter = false; | 22 fForceFilter = false; |
23 fDither = SkTriState::kDefault; | 23 fDither = SkTriState::kDefault; |
24 fIsRendering = true; | |
25 fOrMask = fClearMask = 0; | 24 fOrMask = fClearMask = 0; |
26 fLoops = 1; | 25 fLoops = 1; |
27 } | 26 } |
28 | 27 |
29 const char* SkBenchmark::getName() { | 28 const char* SkBenchmark::getName() { |
30 return this->onGetName(); | 29 return this->onGetName(); |
31 } | 30 } |
32 | 31 |
33 SkIPoint SkBenchmark::getSize() { | 32 SkIPoint SkBenchmark::getSize() { |
34 return this->onGetSize(); | 33 return this->onGetSize(); |
(...skipping 23 matching lines...) Expand all Loading... |
58 paint->setDither(SkTriState::kTrue == fDither); | 57 paint->setDither(SkTriState::kTrue == fDither); |
59 } | 58 } |
60 } | 59 } |
61 | 60 |
62 | 61 |
63 /////////////////////////////////////////////////////////////////////////////// | 62 /////////////////////////////////////////////////////////////////////////////// |
64 | 63 |
65 SkIPoint SkBenchmark::onGetSize() { | 64 SkIPoint SkBenchmark::onGetSize() { |
66 return SkIPoint::Make(640, 480); | 65 return SkIPoint::Make(640, 480); |
67 } | 66 } |
OLD | NEW |