| 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 CopyTilesRenderer_DEFINED | 8 #ifndef CopyTilesRenderer_DEFINED |
| 9 #define CopyTilesRenderer_DEFINED | 9 #define CopyTilesRenderer_DEFINED |
| 10 | 10 |
| 11 #include "PictureRenderer.h" | 11 #include "PictureRenderer.h" |
| 12 #include "SkTypes.h" | 12 #include "SkTypes.h" |
| 13 | 13 |
| 14 struct GrContextOptions; | |
| 15 class SkPicture; | 14 class SkPicture; |
| 16 class SkString; | 15 class SkString; |
| 17 | 16 |
| 18 namespace sk_tools { | 17 namespace sk_tools { |
| 19 /** | 18 /** |
| 20 * PictureRenderer that draws the picture and then extracts it into tiles.
For large pictures, | 19 * PictureRenderer that draws the picture and then extracts it into tiles.
For large pictures, |
| 21 * it will divide the picture into large tiles and draw the picture once fo
r each large tile. | 20 * it will divide the picture into large tiles and draw the picture once fo
r each large tile. |
| 22 */ | 21 */ |
| 23 class CopyTilesRenderer : public TiledPictureRenderer { | 22 class CopyTilesRenderer : public TiledPictureRenderer { |
| 24 | 23 |
| 25 public: | 24 public: |
| 26 #if SK_SUPPORT_GPU | 25 #if SK_SUPPORT_GPU |
| 27 CopyTilesRenderer(const GrContextOptions &opts, int x, int y); | 26 CopyTilesRenderer(const GrContext::Options &opts, int x, int y); |
| 28 #else | 27 #else |
| 29 CopyTilesRenderer(int x, int y); | 28 CopyTilesRenderer(int x, int y); |
| 30 #endif | 29 #endif |
| 31 virtual void init(const SkPicture* pict, | 30 virtual void init(const SkPicture* pict, |
| 32 const SkString* writePath, | 31 const SkString* writePath, |
| 33 const SkString* mismatchPath, | 32 const SkString* mismatchPath, |
| 34 const SkString* inputFilename, | 33 const SkString* inputFilename, |
| 35 bool useChecksumBasedFilenames, | 34 bool useChecksumBasedFilenames, |
| 36 bool useMultiPictureDraw) override; | 35 bool useMultiPictureDraw) override; |
| 37 | 36 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 49 | 48 |
| 50 int fLargeTileWidth; | 49 int fLargeTileWidth; |
| 51 int fLargeTileHeight; | 50 int fLargeTileHeight; |
| 52 | 51 |
| 53 SkString getConfigNameInternal() override; | 52 SkString getConfigNameInternal() override; |
| 54 | 53 |
| 55 typedef TiledPictureRenderer INHERITED; | 54 typedef TiledPictureRenderer INHERITED; |
| 56 }; | 55 }; |
| 57 } // sk_tools | 56 } // sk_tools |
| 58 #endif // CopyTilesRenderer_DEFINED | 57 #endif // CopyTilesRenderer_DEFINED |
| OLD | NEW |