Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2015 Google Inc. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 #ifndef SKPAnimationBench_DEFINED | |
| 9 #define SKPAnimationBench_DEFINED | |
| 10 | |
| 11 #include "SKPBench.h" | |
| 12 | |
| 13 /** | |
| 14 * Runs an SkPicture as a benchmark by repeatedly drawing it, first centering th e picture and | |
| 15 * for each step it concats the passed in matrix | |
| 16 */ | |
| 17 class SKPAnimationBench : public SKPBench { | |
| 18 public: | |
| 19 SKPAnimationBench(const char* name, const SkPicture*, const SkIRect& devClip , | |
| 20 SkMatrix viewMatrix, int steps); | |
| 21 | |
| 22 protected: | |
| 23 const char* onGetName() override; | |
| 24 const char* onGetUniqueName() override; | |
| 25 void onPerCanvasPreDraw(SkCanvas* canvas) override; | |
| 26 | |
| 27 void drawMPDPicture() override { | |
| 28 SkFAIL("MPD not supported\n"); | |
|
bsalomon
2015/04/27 14:31:43
Won't this cause you to crash in a run that has th
joshualitt
2015/04/27 15:29:50
Its your call. Its currently never called because
| |
| 29 } | |
| 30 void drawPicture() override; | |
| 31 | |
| 32 private: | |
| 33 int fSteps; | |
| 34 SkMatrix fAnimationMatrix; | |
| 35 SkString fName; | |
| 36 SkString fUniqueName; | |
| 37 SkPoint fCenter; | |
| 38 | |
| 39 typedef SKPBench INHERITED; | |
| 40 }; | |
| 41 | |
| 42 #endif | |
| OLD | NEW |