| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 | 8 |
| 9 #include "VisualLightweightBenchModule.h" | 9 #include "VisualLightweightBenchModule.h" |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 class WarmupBench : public Benchmark { | 51 class WarmupBench : public Benchmark { |
| 52 public: | 52 public: |
| 53 WarmupBench() { | 53 WarmupBench() { |
| 54 make_path(fPath); | 54 make_path(fPath); |
| 55 } | 55 } |
| 56 private: | 56 private: |
| 57 static void make_path(SkPath& path) { | 57 static void make_path(SkPath& path) { |
| 58 #include "BigPathBench.inc" | 58 #include "BigPathBench.inc" |
| 59 } | 59 } |
| 60 const char* onGetName() override { return "warmupbench"; } | 60 const char* onGetName() override { return "warmupbench"; } |
| 61 void onDraw(const int loops, SkCanvas* canvas) override { | 61 void onDraw(int loops, SkCanvas* canvas) override { |
| 62 SkPaint paint; | 62 SkPaint paint; |
| 63 paint.setStyle(SkPaint::kStroke_Style); | 63 paint.setStyle(SkPaint::kStroke_Style); |
| 64 paint.setStrokeWidth(2); | 64 paint.setStrokeWidth(2); |
| 65 for (int i = 0; i < loops; i++) { | 65 for (int i = 0; i < loops; i++) { |
| 66 canvas->drawPath(fPath, paint); | 66 canvas->drawPath(fPath, paint); |
| 67 } | 67 } |
| 68 } | 68 } |
| 69 SkPath fPath; | 69 SkPath fPath; |
| 70 }; | 70 }; |
| 71 | 71 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 } | 313 } |
| 314 this->resetTimingState(); | 314 this->resetTimingState(); |
| 315 } else { | 315 } else { |
| 316 fCurrentFrame++; | 316 fCurrentFrame++; |
| 317 } | 317 } |
| 318 } | 318 } |
| 319 | 319 |
| 320 bool VisualLightweightBenchModule::onHandleChar(SkUnichar c) { | 320 bool VisualLightweightBenchModule::onHandleChar(SkUnichar c) { |
| 321 return true; | 321 return true; |
| 322 } | 322 } |
| OLD | NEW |