OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SkBenchmark.h" | 8 #include "SkBenchmark.h" |
9 #include "SkPaint.h" | 9 #include "SkPaint.h" |
10 #include "SkParse.h" | 10 #include "SkParse.h" |
11 | 11 |
12 const char* SkTriState::Name[] = { "default", "true", "false" }; | 12 const char* SkTriState::Name[] = { "default", "true", "false" }; |
13 | 13 |
14 SK_DEFINE_INST_COUNT(SkBenchmark) | 14 SK_DEFINE_INST_COUNT(SkBenchmark) |
15 | 15 |
16 template BenchRegistry* BenchRegistry::gHead; | 16 template BenchRegistry* BenchRegistry::gHead; |
17 | 17 |
18 SkBenchmark::SkBenchmark(void* /*ignored*/) { | 18 SkBenchmark::SkBenchmark() { |
19 fForceAlpha = 0xFF; | 19 fForceAlpha = 0xFF; |
20 fForceAA = true; | 20 fForceAA = true; |
21 fDither = SkTriState::kDefault; | 21 fDither = SkTriState::kDefault; |
22 fIsRendering = true; | 22 fIsRendering = true; |
23 fOrMask = fClearMask = 0; | 23 fOrMask = fClearMask = 0; |
24 fLoops = 1; | 24 fLoops = 1; |
25 } | 25 } |
26 | 26 |
27 const char* SkBenchmark::getName() { | 27 const char* SkBenchmark::getName() { |
28 return this->onGetName(); | 28 return this->onGetName(); |
(...skipping 26 matching lines...) Expand all Loading... |
55 paint->setDither(SkTriState::kTrue == fDither); | 55 paint->setDither(SkTriState::kTrue == fDither); |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 | 59 |
60 /////////////////////////////////////////////////////////////////////////////// | 60 /////////////////////////////////////////////////////////////////////////////// |
61 | 61 |
62 SkIPoint SkBenchmark::onGetSize() { | 62 SkIPoint SkBenchmark::onGetSize() { |
63 return SkIPoint::Make(640, 480); | 63 return SkIPoint::Make(640, 480); |
64 } | 64 } |
OLD | NEW |