Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: tools/CopyTilesRenderer.h

Issue 202983003: add --writeChecksumBasedFilenames flag to render_pictures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: pass SkString pointers to init Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | tools/CopyTilesRenderer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 class SkPicture; 14 class SkPicture;
15 class SkString; 15 class SkString;
16 16
17 namespace sk_tools { 17 namespace sk_tools {
18 /** 18 /**
19 * 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,
20 * 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.
21 */ 21 */
22 class CopyTilesRenderer : public TiledPictureRenderer { 22 class CopyTilesRenderer : public TiledPictureRenderer {
23 23
24 public: 24 public:
25 CopyTilesRenderer(int x, int y); 25 CopyTilesRenderer(int x, int y);
26 virtual void init(SkPicture* pict) SK_OVERRIDE; 26 virtual void init(SkPicture* pict, const SkString* outputDir, const SkSt ring* inputFilename,
27 bool useChecksumBasedFilenames) SK_OVERRIDE;
27 28
28 /** 29 /**
29 * Similar to TiledPictureRenderer, this will draw a PNG for each tile. However, the 30 * Similar to TiledPictureRenderer, this will draw a PNG for each tile. However, the
30 * numbering (and actual tiles) will be different. 31 * numbering (and actual tiles) will be different.
31 */ 32 */
32 virtual bool render(const SkString* path, SkBitmap** out) SK_OVERRIDE; 33 virtual bool render(SkBitmap** out) SK_OVERRIDE;
33 34
34 virtual bool supportsTimingIndividualTiles() SK_OVERRIDE { return false; } 35 virtual bool supportsTimingIndividualTiles() SK_OVERRIDE { return false; }
35 36
36 private: 37 private:
37 int fXTilesPerLargeTile; 38 int fXTilesPerLargeTile;
38 int fYTilesPerLargeTile; 39 int fYTilesPerLargeTile;
39 40
40 int fLargeTileWidth; 41 int fLargeTileWidth;
41 int fLargeTileHeight; 42 int fLargeTileHeight;
42 43
43 virtual SkString getConfigNameInternal() SK_OVERRIDE; 44 virtual SkString getConfigNameInternal() SK_OVERRIDE;
44 45
45 typedef TiledPictureRenderer INHERITED; 46 typedef TiledPictureRenderer INHERITED;
46 }; 47 };
47 } // sk_tools 48 } // sk_tools
48 #endif // CopyTilesRenderer_DEFINED 49 #endif // CopyTilesRenderer_DEFINED
OLDNEW
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | tools/CopyTilesRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698