| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef PictureRenderer_DEFINED | 8 #ifndef PictureRenderer_DEFINED |
| 9 #define PictureRenderer_DEFINED | 9 #define PictureRenderer_DEFINED |
| 10 | 10 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 /** | 132 /** |
| 133 * Set the scale factor at which draw the picture. | 133 * Set the scale factor at which draw the picture. |
| 134 */ | 134 */ |
| 135 void setScaleFactor(SkScalar scale) { fScaleFactor = scale; } | 135 void setScaleFactor(SkScalar scale) { fScaleFactor = scale; } |
| 136 | 136 |
| 137 /** | 137 /** |
| 138 * Perform any setup that should done prior to each iteration of render() wh
ich should not be | 138 * Perform any setup that should done prior to each iteration of render() wh
ich should not be |
| 139 * timed. | 139 * timed. |
| 140 */ | 140 */ |
| 141 virtual void setup() {} | 141 virtual void setup1() {} |
| 142 | 142 |
| 143 /** | 143 /** |
| 144 * Perform the work. If this is being called within the context of bench_pi
ctures, | 144 * Perform the work. If this is being called within the context of bench_pi
ctures, |
| 145 * this is the step that will be timed. | 145 * this is the step that will be timed. |
| 146 * | 146 * |
| 147 * Typically "the work" is rendering an SkPicture into a bitmap, but in some
subclasses | 147 * Typically "the work" is rendering an SkPicture into a bitmap, but in some
subclasses |
| 148 * it is recording the source SkPicture into another SkPicture. | 148 * it is recording the source SkPicture into another SkPicture. |
| 149 * | 149 * |
| 150 * If fOutputDir has been specified, the result of the work will be written
to that dir. | 150 * If fOutputDir has been specified, the result of the work will be written
to that dir. |
| 151 * | 151 * |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 | 643 |
| 644 typedef TiledPictureRenderer INHERITED; | 644 typedef TiledPictureRenderer INHERITED; |
| 645 }; | 645 }; |
| 646 | 646 |
| 647 /** | 647 /** |
| 648 * This class does not do any rendering, but its render function executes turnin
g an SkPictureRecord | 648 * This class does not do any rendering, but its render function executes turnin
g an SkPictureRecord |
| 649 * into an SkPicturePlayback, which we want to time. | 649 * into an SkPicturePlayback, which we want to time. |
| 650 */ | 650 */ |
| 651 class PlaybackCreationRenderer : public PictureRenderer { | 651 class PlaybackCreationRenderer : public PictureRenderer { |
| 652 public: | 652 public: |
| 653 virtual void setup() SK_OVERRIDE; | 653 virtual void setup1() SK_OVERRIDE; |
| 654 | 654 |
| 655 virtual bool render(SkBitmap** out = NULL) SK_OVERRIDE; | 655 virtual bool render(SkBitmap** out = NULL) SK_OVERRIDE; |
| 656 | 656 |
| 657 virtual SkString getPerIterTimeFormat() SK_OVERRIDE { return SkString("%.4f"
); } | 657 virtual SkString getPerIterTimeFormat() SK_OVERRIDE { return SkString("%.4f"
); } |
| 658 | 658 |
| 659 virtual SkString getNormalTimeFormat() SK_OVERRIDE { return SkString("%6.4f"
); } | 659 virtual SkString getNormalTimeFormat() SK_OVERRIDE { return SkString("%6.4f"
); } |
| 660 | 660 |
| 661 private: | 661 private: |
| 662 SkAutoTUnref<SkPicture> fReplayer; | 662 SkAutoTUnref<SkPicture> fReplayer; |
| 663 | 663 |
| 664 virtual SkString getConfigNameInternal() SK_OVERRIDE; | 664 virtual SkString getConfigNameInternal() SK_OVERRIDE; |
| 665 | 665 |
| 666 typedef PictureRenderer INHERITED; | 666 typedef PictureRenderer INHERITED; |
| 667 }; | 667 }; |
| 668 | 668 |
| 669 extern PictureRenderer* CreateGatherPixelRefsRenderer(); | 669 extern PictureRenderer* CreateGatherPixelRefsRenderer(); |
| 670 extern PictureRenderer* CreatePictureCloneRenderer(); | 670 extern PictureRenderer* CreatePictureCloneRenderer(); |
| 671 | 671 |
| 672 } | 672 } |
| 673 | 673 |
| 674 #endif // PictureRenderer_DEFINED | 674 #endif // PictureRenderer_DEFINED |
| OLD | NEW |