2 * Copyright 2012 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #ifndef CopyTilesRenderer_DEFINED
9 #define CopyTilesRenderer_DEFINED
11 #include "PictureRenderer.h"
19 * PictureRenderer that draws the picture and then extracts it into tiles. For large pictures,
20 * it will divide the picture into large tiles and draw the picture once for each large tile.
22 class CopyTilesRenderer : public TiledPictureRenderer {
26 CopyTilesRenderer(const GrContext::Options &opts, int x, int y);
28 CopyTilesRenderer(int x, int y);
30 virtual void init(const SkPicture* pict,
31 const SkString* writePath,
32 const SkString* mismatchPath,
33 const SkString* inputFilename,
34 bool useChecksumBasedFilenames,
35 bool useMultiPictureDraw) SK_OVERRIDE;
38 * Similar to TiledPictureRenderer, this will draw a PNG for each tile. However, the
39 * numbering (and actual tiles) will be different.
41 virtual bool render(SkBitmap** out) SK_OVERRIDE;
43 virtual bool supportsTimingIndividualTiles() SK_OVERRIDE { return false; }
46 int fXTilesPerLargeTile;
47 int fYTilesPerLargeTile;
52 virtual SkString getConfigNameInternal() SK_OVERRIDE;
54 typedef TiledPictureRenderer INHERITED;
57 #endif // CopyTilesRenderer_DEFINED