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