blob: 262e8997e6215aa2b1fe21def309798cdb4b85b6 [file] [log] [blame]
caryclark@google.com411bb722012-11-06 21:29:16 +00001/*
keyar@chromium.org451bb9f2012-07-26 17:27:57 +00002 * Copyright 2012 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 PictureRenderer_DEFINED
9#define PictureRenderer_DEFINED
scroggo@google.coma62da2f2012-11-02 21:28:12 +000010
11#include "SkCountdown.h"
caryclark@google.coma3622372012-11-06 21:26:13 +000012#include "SkDrawFilter.h"
keyar@chromium.orgf4959ab2012-08-23 20:53:25 +000013#include "SkMath.h"
reed@google.comea6a3062012-11-06 22:14:54 +000014#include "SkPaint.h"
scroggo@google.com9a412522012-09-07 15:21:18 +000015#include "SkPicture.h"
scroggo@google.comacfb30e2012-09-18 14:32:35 +000016#include "SkRect.h"
keyar@chromium.org451bb9f2012-07-26 17:27:57 +000017#include "SkRefCnt.h"
scroggo@google.coma62da2f2012-11-02 21:28:12 +000018#include "SkRunnable.h"
scroggo@google.com9a412522012-09-07 15:21:18 +000019#include "SkString.h"
scroggo@google.coma62da2f2012-11-02 21:28:12 +000020#include "SkTDArray.h"
21#include "SkThreadPool.h"
22#include "SkTypes.h"
keyar@chromium.org451bb9f2012-07-26 17:27:57 +000023
keyar@chromium.org06125642012-08-20 15:03:33 +000024#if SK_SUPPORT_GPU
25#include "GrContextFactory.h"
26#include "GrContext.h"
27#endif
28
keyar@chromium.org451bb9f2012-07-26 17:27:57 +000029class SkBitmap;
30class SkCanvas;
keyar@chromium.org4ea96c52012-08-20 15:03:29 +000031class SkGLContext;
scroggo@google.coma62da2f2012-11-02 21:28:12 +000032class SkThread;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +000033
34namespace sk_tools {
35
scroggo@google.comcbcef702012-12-13 22:09:28 +000036class TiledPictureRenderer;
37
keyar@chromium.org451bb9f2012-07-26 17:27:57 +000038class PictureRenderer : public SkRefCnt {
scroggo@google.comcbcef702012-12-13 22:09:28 +000039
keyar@chromium.org451bb9f2012-07-26 17:27:57 +000040public:
keyar@chromium.orgc81686c2012-08-20 15:04:04 +000041 enum SkDeviceTypes {
42 kBitmap_DeviceType,
43#if SK_SUPPORT_GPU
44 kGPU_DeviceType
45#endif
46 };
47
junov@chromium.org9313ca42012-11-02 18:11:49 +000048 enum BBoxHierarchyType {
49 kNone_BBoxHierarchyType = 0,
50 kRTree_BBoxHierarchyType,
junov@chromium.org7b537062012-11-06 18:58:43 +000051 kTileGrid_BBoxHierarchyType,
junov@chromium.org9313ca42012-11-02 18:11:49 +000052 };
53
caryclark@google.coma3622372012-11-06 21:26:13 +000054 // this uses SkPaint::Flags as a base and adds additional flags
55 enum DrawFilterFlags {
56 kNone_DrawFilterFlag = 0,
caryclark@google.come3e940c2012-11-07 16:42:17 +000057 kBlur_DrawFilterFlag = 0x4000, // toggles between blur and no blur
reed@google.com457d8a72012-12-18 18:20:44 +000058 kHinting_DrawFilterFlag = 0x8000, // toggles between no hinting and normal hinting
59 kSlightHinting_DrawFilterFlag = 0x10000, // toggles between slight and normal hinting
60 kAAClip_DrawFilterFlag = 0x20000, // toggles between soft and hard clip
caryclark@google.coma3622372012-11-06 21:26:13 +000061 };
62
63 SK_COMPILE_ASSERT(!(kBlur_DrawFilterFlag & SkPaint::kAllFlags), blur_flag_must_be_greater);
64 SK_COMPILE_ASSERT(!(kHinting_DrawFilterFlag & SkPaint::kAllFlags),
65 hinting_flag_must_be_greater);
66 SK_COMPILE_ASSERT(!(kSlightHinting_DrawFilterFlag & SkPaint::kAllFlags),
67 slight_hinting_flag_must_be_greater);
68
scroggo@google.coma62da2f2012-11-02 21:28:12 +000069 /**
70 * Called with each new SkPicture to render.
71 */
keyar@chromium.org9d696c02012-08-07 17:11:33 +000072 virtual void init(SkPicture* pict);
scroggo@google.com9a412522012-09-07 15:21:18 +000073
74 /**
scroggo@google.comc0d5e542012-12-13 21:40:48 +000075 * Set the viewport so that only the portion listed gets drawn.
76 */
77 void setViewport(SkISize size) { fViewport = size; }
78
79 /**
scroggo@google.com82ec0b02012-12-17 19:25:54 +000080 * Set the scale factor at which draw the picture.
81 */
82 void setScaleFactor(SkScalar scale) { fScaleFactor = scale; }
83
84 /**
scroggo@google.com9a412522012-09-07 15:21:18 +000085 * Perform any setup that should done prior to each iteration of render() which should not be
86 * timed.
87 */
88 virtual void setup() {}
89
90 /**
91 * Perform work that is to be timed. Typically this is rendering, but is also used for recording
92 * and preparing picture for playback by the subclasses which do those.
scroggo@google.com81f9d2e2012-09-20 14:54:21 +000093 * If path is non-null, subclass implementations should call write().
94 * @param path If non-null, also write the output to the file specified by path. path should
95 * have no extension; it will be added by write().
borenet@google.com070d3542012-10-26 13:26:55 +000096 * @return bool True if rendering succeeded and, if path is non-null, the output was
97 * successfully written to a file.
scroggo@google.com9a412522012-09-07 15:21:18 +000098 */
scroggo@google.com81f9d2e2012-09-20 14:54:21 +000099 virtual bool render(const SkString* path) = 0;
scroggo@google.com9a412522012-09-07 15:21:18 +0000100
scroggo@google.coma62da2f2012-11-02 21:28:12 +0000101 /**
102 * Called once finished with a particular SkPicture, before calling init again, and before
103 * being done with this Renderer.
104 */
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000105 virtual void end();
scroggo@google.coma62da2f2012-11-02 21:28:12 +0000106
scroggo@google.comcbcef702012-12-13 22:09:28 +0000107 /**
108 * If this PictureRenderer is actually a TiledPictureRender, return a pointer to this as a
109 * TiledPictureRender so its methods can be called.
110 */
111 virtual TiledPictureRenderer* getTiledRenderer() { return NULL; }
112
keyar@chromium.org28136b32012-08-20 15:04:15 +0000113 void resetState();
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000114
keyar@chromium.orgc81686c2012-08-20 15:04:04 +0000115 void setDeviceType(SkDeviceTypes deviceType) {
116 fDeviceType = deviceType;
keyar@chromium.orgfe6391a2012-08-20 15:03:41 +0000117 }
118
caryclark@google.come3e940c2012-11-07 16:42:17 +0000119 void setDrawFilters(DrawFilterFlags const * const filters, const SkString& configName) {
120 memcpy(fDrawFilters, filters, sizeof(fDrawFilters));
caryclark@google.coma3622372012-11-06 21:26:13 +0000121 fDrawFiltersConfig = configName;
122 }
123
junov@chromium.org9313ca42012-11-02 18:11:49 +0000124 void setBBoxHierarchyType(BBoxHierarchyType bbhType) {
125 fBBoxHierarchyType = bbhType;
126 }
127
junov@chromium.org7b537062012-11-06 18:58:43 +0000128 void setGridSize(int width, int height) {
129 fGridWidth = width;
130 fGridHeight = height;
131 }
132
keyar@chromium.orgfe6391a2012-08-20 15:03:41 +0000133 bool isUsingBitmapDevice() {
keyar@chromium.org78a35c52012-08-20 15:03:44 +0000134 return kBitmap_DeviceType == fDeviceType;
keyar@chromium.org4ea96c52012-08-20 15:03:29 +0000135 }
136
scroggo@google.com9a412522012-09-07 15:21:18 +0000137 virtual SkString getPerIterTimeFormat() { return SkString("%.2f"); }
138
139 virtual SkString getNormalTimeFormat() { return SkString("%6.2f"); }
140
scroggo@google.com0a049b82012-11-02 22:01:26 +0000141 /**
142 * Reports the configuration of this PictureRenderer.
143 */
144 SkString getConfigName() {
145 SkString config = this->getConfigNameInternal();
scroggo@google.comc4013c12012-12-13 22:07:08 +0000146 if (!fViewport.isEmpty()) {
147 config.appendf("_viewport_%ix%i", fViewport.width(), fViewport.height());
148 }
scroggo@google.com0a049b82012-11-02 22:01:26 +0000149 if (kRTree_BBoxHierarchyType == fBBoxHierarchyType) {
150 config.append("_rtree");
junov@chromium.org7b537062012-11-06 18:58:43 +0000151 } else if (kTileGrid_BBoxHierarchyType == fBBoxHierarchyType) {
152 config.append("_grid");
scroggo@google.com0a049b82012-11-02 22:01:26 +0000153 }
154#if SK_SUPPORT_GPU
155 if (this->isUsingGpuDevice()) {
156 config.append("_gpu");
157 }
158#endif
caryclark@google.coma3622372012-11-06 21:26:13 +0000159 config.append(fDrawFiltersConfig.c_str());
scroggo@google.com0a049b82012-11-02 22:01:26 +0000160 return config;
161 }
162
keyar@chromium.org4ea96c52012-08-20 15:03:29 +0000163#if SK_SUPPORT_GPU
keyar@chromium.orgfe6391a2012-08-20 15:03:41 +0000164 bool isUsingGpuDevice() {
keyar@chromium.org78a35c52012-08-20 15:03:44 +0000165 return kGPU_DeviceType == fDeviceType;
keyar@chromium.orgfe6391a2012-08-20 15:03:41 +0000166 }
keyar@chromium.org77a55222012-08-20 15:03:47 +0000167
168 SkGLContext* getGLContext() {
169 if (this->isUsingGpuDevice()) {
170 return fGrContextFactory.getGLContext(GrContextFactory::kNative_GLContextType);
171 } else {
172 return NULL;
173 }
174 }
robertphillips@google.com163c84b2012-09-13 15:40:37 +0000175
176 GrContext* getGrContext() {
177 return fGrContext;
178 }
keyar@chromium.org4ea96c52012-08-20 15:03:29 +0000179#endif
180
keyar@chromium.org02dfb122012-08-20 15:03:36 +0000181 PictureRenderer()
keyar@chromium.org06125642012-08-20 15:03:33 +0000182 : fPicture(NULL)
183 , fDeviceType(kBitmap_DeviceType)
junov@chromium.org50ff9bd2012-11-02 19:16:22 +0000184 , fBBoxHierarchyType(kNone_BBoxHierarchyType)
junov@chromium.org7b537062012-11-06 18:58:43 +0000185 , fGridWidth(0)
186 , fGridHeight(0)
scroggo@google.com82ec0b02012-12-17 19:25:54 +0000187 , fScaleFactor(SK_Scalar1)
keyar@chromium.org06125642012-08-20 15:03:33 +0000188#if SK_SUPPORT_GPU
189 , fGrContext(fGrContextFactory.get(GrContextFactory::kNative_GLContextType))
190#endif
caryclark@google.come3e940c2012-11-07 16:42:17 +0000191 {
192 sk_bzero(fDrawFilters, sizeof(fDrawFilters));
scroggo@google.comc0d5e542012-12-13 21:40:48 +0000193 fViewport.set(0, 0);
caryclark@google.come3e940c2012-11-07 16:42:17 +0000194 }
keyar@chromium.org06125642012-08-20 15:03:33 +0000195
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000196protected:
197 SkAutoTUnref<SkCanvas> fCanvas;
scroggo@google.comc0d5e542012-12-13 21:40:48 +0000198 SkPicture* fPicture;
199 SkDeviceTypes fDeviceType;
200 BBoxHierarchyType fBBoxHierarchyType;
201 DrawFilterFlags fDrawFilters[SkDrawFilter::kTypeCount];
202 SkString fDrawFiltersConfig;
203 int fGridWidth, fGridHeight; // used when fBBoxHierarchyType is TileGrid
keyar@chromium.org06125642012-08-20 15:03:33 +0000204
205#if SK_SUPPORT_GPU
206 GrContextFactory fGrContextFactory;
207 GrContext* fGrContext;
208#endif
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000209
scroggo@google.comc0d5e542012-12-13 21:40:48 +0000210 void buildBBoxHierarchy();
211
212 /**
213 * Return the total width that should be drawn. If the viewport width has been set greater than
214 * 0, this will be the minimum of the current SkPicture's width and the viewport's width.
215 */
216 int getViewWidth();
217
218 /**
219 * Return the total height that should be drawn. If the viewport height has been set greater
220 * than 0, this will be the minimum of the current SkPicture's height and the viewport's height.
221 */
222 int getViewHeight();
223
scroggo@google.com82ec0b02012-12-17 19:25:54 +0000224 /**
225 * Scales the provided canvas to the scale factor set by setScaleFactor.
226 */
227 void scaleToScaleFactor(SkCanvas*);
228
scroggo@google.comc0d5e542012-12-13 21:40:48 +0000229 SkPicture* createPicture();
230 uint32_t recordFlags();
231 SkCanvas* setupCanvas();
232 virtual SkCanvas* setupCanvas(int width, int height);
233
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000234private:
scroggo@google.comc0d5e542012-12-13 21:40:48 +0000235 SkISize fViewport;
scroggo@google.com82ec0b02012-12-17 19:25:54 +0000236 SkScalar fScaleFactor;
scroggo@google.comc0d5e542012-12-13 21:40:48 +0000237
scroggo@google.com0a049b82012-11-02 22:01:26 +0000238 virtual SkString getConfigNameInternal() = 0;
239
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000240 typedef SkRefCnt INHERITED;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000241};
242
scroggo@google.com9a412522012-09-07 15:21:18 +0000243/**
244 * This class does not do any rendering, but its render function executes recording, which we want
245 * to time.
246 */
247class RecordPictureRenderer : public PictureRenderer {
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000248 virtual bool render(const SkString*) SK_OVERRIDE;
scroggo@google.com9a412522012-09-07 15:21:18 +0000249
250 virtual SkString getPerIterTimeFormat() SK_OVERRIDE { return SkString("%.4f"); }
251
252 virtual SkString getNormalTimeFormat() SK_OVERRIDE { return SkString("%6.4f"); }
scroggo@google.com0a049b82012-11-02 22:01:26 +0000253
djsollen@google.comfd9720c2012-11-06 16:54:40 +0000254protected:
255 virtual SkCanvas* setupCanvas(int width, int height) SK_OVERRIDE;
256
scroggo@google.com0a049b82012-11-02 22:01:26 +0000257private:
258 virtual SkString getConfigNameInternal() SK_OVERRIDE;
scroggo@google.com9a412522012-09-07 15:21:18 +0000259};
260
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000261class PipePictureRenderer : public PictureRenderer {
keyar@chromium.org163b5672012-08-01 17:53:29 +0000262public:
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000263 virtual bool render(const SkString*) SK_OVERRIDE;
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000264
265private:
scroggo@google.com0a049b82012-11-02 22:01:26 +0000266 virtual SkString getConfigNameInternal() SK_OVERRIDE;
267
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000268 typedef PictureRenderer INHERITED;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000269};
270
271class SimplePictureRenderer : public PictureRenderer {
keyar@chromium.org163b5672012-08-01 17:53:29 +0000272public:
junov@chromium.org9313ca42012-11-02 18:11:49 +0000273 virtual void init(SkPicture* pict) SK_OVERRIDE;
274
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000275 virtual bool render(const SkString*) SK_OVERRIDE;
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000276
277private:
scroggo@google.com0a049b82012-11-02 22:01:26 +0000278 virtual SkString getConfigNameInternal() SK_OVERRIDE;
279
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000280 typedef PictureRenderer INHERITED;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000281};
282
283class TiledPictureRenderer : public PictureRenderer {
284public:
285 TiledPictureRenderer();
286
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000287 virtual void init(SkPicture* pict) SK_OVERRIDE;
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000288
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000289 /**
290 * Renders to tiles, rather than a single canvas. If a path is provided, a separate file is
291 * created for each tile, named "path0.png", "path1.png", etc.
292 * Multithreaded mode currently does not support writing to a file.
293 */
294 virtual bool render(const SkString* path) SK_OVERRIDE;
295
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000296 virtual void end() SK_OVERRIDE;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000297
keyar@chromium.orgcc6e5ef2012-07-27 20:09:26 +0000298 void setTileWidth(int width) {
299 fTileWidth = width;
300 }
301
302 int getTileWidth() const {
303 return fTileWidth;
304 }
305
306 void setTileHeight(int height) {
307 fTileHeight = height;
308 }
309
310 int getTileHeight() const {
311 return fTileHeight;
312 }
313
314 void setTileWidthPercentage(double percentage) {
315 fTileWidthPercentage = percentage;
316 }
317
keyar@chromium.org163b5672012-08-01 17:53:29 +0000318 double getTileWidthPercentage() const {
keyar@chromium.orgcc6e5ef2012-07-27 20:09:26 +0000319 return fTileWidthPercentage;
320 }
321
322 void setTileHeightPercentage(double percentage) {
323 fTileHeightPercentage = percentage;
324 }
325
keyar@chromium.org163b5672012-08-01 17:53:29 +0000326 double getTileHeightPercentage() const {
keyar@chromium.orgcc6e5ef2012-07-27 20:09:26 +0000327 return fTileHeightPercentage;
328 }
329
keyar@chromium.orgf4959ab2012-08-23 20:53:25 +0000330 void setTileMinPowerOf2Width(int width) {
331 SkASSERT(SkIsPow2(width) && width > 0);
332 if (!SkIsPow2(width) || width <= 0) {
333 return;
334 }
335
336 fTileMinPowerOf2Width = width;
337 }
338
339 int getTileMinPowerOf2Width() const {
340 return fTileMinPowerOf2Width;
341 }
342
scroggo@google.comcbcef702012-12-13 22:09:28 +0000343 virtual TiledPictureRenderer* getTiledRenderer() SK_OVERRIDE { return this; }
344
345 /**
346 * Report the number of tiles in the x and y directions. Must not be called before init.
347 * @param x Output parameter identifying the number of tiles in the x direction.
348 * @param y Output parameter identifying the number of tiles in the y direction.
349 * @return True if the tiles have been set up, and x and y are meaningful. If false, x and y are
350 * unmodified.
351 */
352 bool tileDimensions(int& x, int&y);
353
354 /**
355 * Move to the next tile and return its indices. Must be called before calling drawCurrentTile
356 * for the first time.
357 * @param i Output parameter identifying the column of the next tile to be drawn on the next
358 * call to drawNextTile.
359 * @param j Output parameter identifying the row of the next tile to be drawn on the next call
360 * to drawNextTile.
361 * @param True if the tiles have been created and the next tile to be drawn by drawCurrentTile
362 * is within the range of tiles. If false, i and j are unmodified.
363 */
364 bool nextTile(int& i, int& j);
365
366 /**
367 * Render one tile. This will draw the same tile each time it is called until nextTile is
368 * called. The tile rendered will depend on how many calls have been made to nextTile.
369 * It is an error to call this without first calling nextTile, or if nextTile returns false.
370 */
371 void drawCurrentTile();
372
scroggo@google.coma62da2f2012-11-02 21:28:12 +0000373protected:
scroggo@google.coma62da2f2012-11-02 21:28:12 +0000374 SkTDArray<SkRect> fTileRects;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000375
scroggo@google.com0a049b82012-11-02 22:01:26 +0000376 virtual SkCanvas* setupCanvas(int width, int height) SK_OVERRIDE;
377 virtual SkString getConfigNameInternal() SK_OVERRIDE;
378
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000379private:
scroggo@google.comcbcef702012-12-13 22:09:28 +0000380 int fTileWidth;
381 int fTileHeight;
382 double fTileWidthPercentage;
383 double fTileHeightPercentage;
384 int fTileMinPowerOf2Width;
385
386 // These variables are only used for timing individual tiles.
387 // Next tile to draw in fTileRects.
388 int fCurrentTileOffset;
389 // Number of tiles in the x direction.
390 int fTilesX;
391 // Number of tiles in the y direction.
392 int fTilesY;
scroggo@google.combcdf2ec2012-09-20 14:42:33 +0000393
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000394 void setupTiles();
keyar@chromium.orgf4959ab2012-08-23 20:53:25 +0000395 void setupPowerOf2Tiles();
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000396
397 typedef PictureRenderer INHERITED;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000398};
399
scroggo@google.coma62da2f2012-11-02 21:28:12 +0000400class CloneData;
401
402class MultiCorePictureRenderer : public TiledPictureRenderer {
403public:
404 explicit MultiCorePictureRenderer(int threadCount);
405
406 ~MultiCorePictureRenderer();
407
408 virtual void init(SkPicture* pict) SK_OVERRIDE;
409
410 /**
411 * Behaves like TiledPictureRenderer::render(), only using multiple threads.
412 */
413 virtual bool render(const SkString* path) SK_OVERRIDE;
414
415 virtual void end() SK_OVERRIDE;
416
417private:
scroggo@google.com0a049b82012-11-02 22:01:26 +0000418 virtual SkString getConfigNameInternal() SK_OVERRIDE;
419
scroggo@google.coma62da2f2012-11-02 21:28:12 +0000420 const int fNumThreads;
421 SkTDArray<SkCanvas*> fCanvasPool;
422 SkThreadPool fThreadPool;
423 SkPicture* fPictureClones;
424 CloneData** fCloneData;
425 SkCountdown fCountdown;
426
427 typedef TiledPictureRenderer INHERITED;
428};
429
scroggo@google.com9a412522012-09-07 15:21:18 +0000430/**
431 * This class does not do any rendering, but its render function executes turning an SkPictureRecord
432 * into an SkPicturePlayback, which we want to time.
433 */
434class PlaybackCreationRenderer : public PictureRenderer {
435public:
436 virtual void setup() SK_OVERRIDE;
437
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000438 virtual bool render(const SkString*) SK_OVERRIDE;
scroggo@google.com9a412522012-09-07 15:21:18 +0000439
440 virtual SkString getPerIterTimeFormat() SK_OVERRIDE { return SkString("%.4f"); }
441
442 virtual SkString getNormalTimeFormat() SK_OVERRIDE { return SkString("%6.4f"); }
443
444private:
junov@chromium.org9313ca42012-11-02 18:11:49 +0000445 SkAutoTUnref<SkPicture> fReplayer;
scroggo@google.com0a049b82012-11-02 22:01:26 +0000446
447 virtual SkString getConfigNameInternal() SK_OVERRIDE;
448
scroggo@google.com9a412522012-09-07 15:21:18 +0000449 typedef PictureRenderer INHERITED;
450};
451
reed@google.comfe7b1ed2012-11-29 21:00:39 +0000452extern PictureRenderer* CreateGatherPixelRefsRenderer();
reed@google.com5a34fd32012-12-10 16:05:09 +0000453extern PictureRenderer* CreatePictureCloneRenderer();
reed@google.comfe7b1ed2012-11-29 21:00:39 +0000454
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000455}
456
457#endif // PictureRenderer_DEFINED