blob: ada7bd42204afc7dcf3a98e677cbacc3d845f762 [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
58 kLowBlur_DrawFilterFlag = 0x8000, // toggles between low and high quality blur
59 kHinting_DrawFilterFlag = 0x10000, // toggles between no hinting and normal hinting
60 kSlightHinting_DrawFilterFlag = 0x20000, // toggles between slight and normal hinting
61 kAAClip_DrawFilterFlag = 0x40000, // toggles between soft and hard clip
caryclark@google.coma3622372012-11-06 21:26:13 +000062 };
63
64 SK_COMPILE_ASSERT(!(kBlur_DrawFilterFlag & SkPaint::kAllFlags), blur_flag_must_be_greater);
65 SK_COMPILE_ASSERT(!(kHinting_DrawFilterFlag & SkPaint::kAllFlags),
66 hinting_flag_must_be_greater);
67 SK_COMPILE_ASSERT(!(kSlightHinting_DrawFilterFlag & SkPaint::kAllFlags),
68 slight_hinting_flag_must_be_greater);
69
scroggo@google.coma62da2f2012-11-02 21:28:12 +000070 /**
71 * Called with each new SkPicture to render.
72 */
keyar@chromium.org9d696c02012-08-07 17:11:33 +000073 virtual void init(SkPicture* pict);
scroggo@google.com9a412522012-09-07 15:21:18 +000074
75 /**
scroggo@google.comc0d5e542012-12-13 21:40:48 +000076 * Set the viewport so that only the portion listed gets drawn.
77 */
78 void setViewport(SkISize size) { fViewport = size; }
79
80 /**
scroggo@google.com82ec0b02012-12-17 19:25:54 +000081 * Set the scale factor at which draw the picture.
82 */
83 void setScaleFactor(SkScalar scale) { fScaleFactor = scale; }
84
85 /**
scroggo@google.com9a412522012-09-07 15:21:18 +000086 * Perform any setup that should done prior to each iteration of render() which should not be
87 * timed.
88 */
89 virtual void setup() {}
90
91 /**
92 * Perform work that is to be timed. Typically this is rendering, but is also used for recording
93 * and preparing picture for playback by the subclasses which do those.
scroggo@google.com81f9d2e2012-09-20 14:54:21 +000094 * If path is non-null, subclass implementations should call write().
95 * @param path If non-null, also write the output to the file specified by path. path should
96 * have no extension; it will be added by write().
borenet@google.com070d3542012-10-26 13:26:55 +000097 * @return bool True if rendering succeeded and, if path is non-null, the output was
98 * successfully written to a file.
scroggo@google.com9a412522012-09-07 15:21:18 +000099 */
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000100 virtual bool render(const SkString* path) = 0;
scroggo@google.com9a412522012-09-07 15:21:18 +0000101
scroggo@google.coma62da2f2012-11-02 21:28:12 +0000102 /**
103 * Called once finished with a particular SkPicture, before calling init again, and before
104 * being done with this Renderer.
105 */
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000106 virtual void end();
scroggo@google.coma62da2f2012-11-02 21:28:12 +0000107
scroggo@google.comcbcef702012-12-13 22:09:28 +0000108 /**
109 * If this PictureRenderer is actually a TiledPictureRender, return a pointer to this as a
110 * TiledPictureRender so its methods can be called.
111 */
112 virtual TiledPictureRenderer* getTiledRenderer() { return NULL; }
113
keyar@chromium.org28136b32012-08-20 15:04:15 +0000114 void resetState();
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000115
keyar@chromium.orgc81686c2012-08-20 15:04:04 +0000116 void setDeviceType(SkDeviceTypes deviceType) {
117 fDeviceType = deviceType;
keyar@chromium.orgfe6391a2012-08-20 15:03:41 +0000118 }
119
caryclark@google.come3e940c2012-11-07 16:42:17 +0000120 void setDrawFilters(DrawFilterFlags const * const filters, const SkString& configName) {
121 memcpy(fDrawFilters, filters, sizeof(fDrawFilters));
caryclark@google.coma3622372012-11-06 21:26:13 +0000122 fDrawFiltersConfig = configName;
123 }
124
junov@chromium.org9313ca42012-11-02 18:11:49 +0000125 void setBBoxHierarchyType(BBoxHierarchyType bbhType) {
126 fBBoxHierarchyType = bbhType;
127 }
128
junov@chromium.org7b537062012-11-06 18:58:43 +0000129 void setGridSize(int width, int height) {
130 fGridWidth = width;
131 fGridHeight = height;
132 }
133
keyar@chromium.orgfe6391a2012-08-20 15:03:41 +0000134 bool isUsingBitmapDevice() {
keyar@chromium.org78a35c52012-08-20 15:03:44 +0000135 return kBitmap_DeviceType == fDeviceType;
keyar@chromium.org4ea96c52012-08-20 15:03:29 +0000136 }
137
scroggo@google.com9a412522012-09-07 15:21:18 +0000138 virtual SkString getPerIterTimeFormat() { return SkString("%.2f"); }
139
140 virtual SkString getNormalTimeFormat() { return SkString("%6.2f"); }
141
scroggo@google.com0a049b82012-11-02 22:01:26 +0000142 /**
143 * Reports the configuration of this PictureRenderer.
144 */
145 SkString getConfigName() {
146 SkString config = this->getConfigNameInternal();
scroggo@google.comc4013c12012-12-13 22:07:08 +0000147 if (!fViewport.isEmpty()) {
148 config.appendf("_viewport_%ix%i", fViewport.width(), fViewport.height());
149 }
scroggo@google.com0a049b82012-11-02 22:01:26 +0000150 if (kRTree_BBoxHierarchyType == fBBoxHierarchyType) {
151 config.append("_rtree");
junov@chromium.org7b537062012-11-06 18:58:43 +0000152 } else if (kTileGrid_BBoxHierarchyType == fBBoxHierarchyType) {
153 config.append("_grid");
scroggo@google.com0a049b82012-11-02 22:01:26 +0000154 }
155#if SK_SUPPORT_GPU
156 if (this->isUsingGpuDevice()) {
157 config.append("_gpu");
158 }
159#endif
caryclark@google.coma3622372012-11-06 21:26:13 +0000160 config.append(fDrawFiltersConfig.c_str());
scroggo@google.com0a049b82012-11-02 22:01:26 +0000161 return config;
162 }
163
keyar@chromium.org4ea96c52012-08-20 15:03:29 +0000164#if SK_SUPPORT_GPU
keyar@chromium.orgfe6391a2012-08-20 15:03:41 +0000165 bool isUsingGpuDevice() {
keyar@chromium.org78a35c52012-08-20 15:03:44 +0000166 return kGPU_DeviceType == fDeviceType;
keyar@chromium.orgfe6391a2012-08-20 15:03:41 +0000167 }
keyar@chromium.org77a55222012-08-20 15:03:47 +0000168
169 SkGLContext* getGLContext() {
170 if (this->isUsingGpuDevice()) {
171 return fGrContextFactory.getGLContext(GrContextFactory::kNative_GLContextType);
172 } else {
173 return NULL;
174 }
175 }
robertphillips@google.com163c84b2012-09-13 15:40:37 +0000176
177 GrContext* getGrContext() {
178 return fGrContext;
179 }
keyar@chromium.org4ea96c52012-08-20 15:03:29 +0000180#endif
181
keyar@chromium.org02dfb122012-08-20 15:03:36 +0000182 PictureRenderer()
keyar@chromium.org06125642012-08-20 15:03:33 +0000183 : fPicture(NULL)
184 , fDeviceType(kBitmap_DeviceType)
junov@chromium.org50ff9bd2012-11-02 19:16:22 +0000185 , fBBoxHierarchyType(kNone_BBoxHierarchyType)
junov@chromium.org7b537062012-11-06 18:58:43 +0000186 , fGridWidth(0)
187 , fGridHeight(0)
scroggo@google.com82ec0b02012-12-17 19:25:54 +0000188 , fScaleFactor(SK_Scalar1)
keyar@chromium.org06125642012-08-20 15:03:33 +0000189#if SK_SUPPORT_GPU
190 , fGrContext(fGrContextFactory.get(GrContextFactory::kNative_GLContextType))
191#endif
caryclark@google.come3e940c2012-11-07 16:42:17 +0000192 {
193 sk_bzero(fDrawFilters, sizeof(fDrawFilters));
scroggo@google.comc0d5e542012-12-13 21:40:48 +0000194 fViewport.set(0, 0);
caryclark@google.come3e940c2012-11-07 16:42:17 +0000195 }
keyar@chromium.org06125642012-08-20 15:03:33 +0000196
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000197protected:
198 SkAutoTUnref<SkCanvas> fCanvas;
scroggo@google.comc0d5e542012-12-13 21:40:48 +0000199 SkPicture* fPicture;
200 SkDeviceTypes fDeviceType;
201 BBoxHierarchyType fBBoxHierarchyType;
202 DrawFilterFlags fDrawFilters[SkDrawFilter::kTypeCount];
203 SkString fDrawFiltersConfig;
204 int fGridWidth, fGridHeight; // used when fBBoxHierarchyType is TileGrid
keyar@chromium.org06125642012-08-20 15:03:33 +0000205
206#if SK_SUPPORT_GPU
207 GrContextFactory fGrContextFactory;
208 GrContext* fGrContext;
209#endif
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000210
scroggo@google.comc0d5e542012-12-13 21:40:48 +0000211 void buildBBoxHierarchy();
212
213 /**
214 * Return the total width that should be drawn. If the viewport width has been set greater than
215 * 0, this will be the minimum of the current SkPicture's width and the viewport's width.
216 */
217 int getViewWidth();
218
219 /**
220 * Return the total height that should be drawn. If the viewport height has been set greater
221 * than 0, this will be the minimum of the current SkPicture's height and the viewport's height.
222 */
223 int getViewHeight();
224
scroggo@google.com82ec0b02012-12-17 19:25:54 +0000225 /**
226 * Scales the provided canvas to the scale factor set by setScaleFactor.
227 */
228 void scaleToScaleFactor(SkCanvas*);
229
scroggo@google.comc0d5e542012-12-13 21:40:48 +0000230 SkPicture* createPicture();
231 uint32_t recordFlags();
232 SkCanvas* setupCanvas();
233 virtual SkCanvas* setupCanvas(int width, int height);
234
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000235private:
scroggo@google.comc0d5e542012-12-13 21:40:48 +0000236 SkISize fViewport;
scroggo@google.com82ec0b02012-12-17 19:25:54 +0000237 SkScalar fScaleFactor;
scroggo@google.comc0d5e542012-12-13 21:40:48 +0000238
scroggo@google.com0a049b82012-11-02 22:01:26 +0000239 virtual SkString getConfigNameInternal() = 0;
240
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000241 typedef SkRefCnt INHERITED;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000242};
243
scroggo@google.com9a412522012-09-07 15:21:18 +0000244/**
245 * This class does not do any rendering, but its render function executes recording, which we want
246 * to time.
247 */
248class RecordPictureRenderer : public PictureRenderer {
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000249 virtual bool render(const SkString*) SK_OVERRIDE;
scroggo@google.com9a412522012-09-07 15:21:18 +0000250
251 virtual SkString getPerIterTimeFormat() SK_OVERRIDE { return SkString("%.4f"); }
252
253 virtual SkString getNormalTimeFormat() SK_OVERRIDE { return SkString("%6.4f"); }
scroggo@google.com0a049b82012-11-02 22:01:26 +0000254
djsollen@google.comfd9720c2012-11-06 16:54:40 +0000255protected:
256 virtual SkCanvas* setupCanvas(int width, int height) SK_OVERRIDE;
257
scroggo@google.com0a049b82012-11-02 22:01:26 +0000258private:
259 virtual SkString getConfigNameInternal() SK_OVERRIDE;
scroggo@google.com9a412522012-09-07 15:21:18 +0000260};
261
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000262class PipePictureRenderer : public PictureRenderer {
keyar@chromium.org163b5672012-08-01 17:53:29 +0000263public:
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000264 virtual bool render(const SkString*) SK_OVERRIDE;
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000265
266private:
scroggo@google.com0a049b82012-11-02 22:01:26 +0000267 virtual SkString getConfigNameInternal() SK_OVERRIDE;
268
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000269 typedef PictureRenderer INHERITED;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000270};
271
272class SimplePictureRenderer : public PictureRenderer {
keyar@chromium.org163b5672012-08-01 17:53:29 +0000273public:
junov@chromium.org9313ca42012-11-02 18:11:49 +0000274 virtual void init(SkPicture* pict) SK_OVERRIDE;
275
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000276 virtual bool render(const SkString*) SK_OVERRIDE;
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000277
278private:
scroggo@google.com0a049b82012-11-02 22:01:26 +0000279 virtual SkString getConfigNameInternal() SK_OVERRIDE;
280
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000281 typedef PictureRenderer INHERITED;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000282};
283
284class TiledPictureRenderer : public PictureRenderer {
285public:
286 TiledPictureRenderer();
287
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000288 virtual void init(SkPicture* pict) SK_OVERRIDE;
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000289
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000290 /**
291 * Renders to tiles, rather than a single canvas. If a path is provided, a separate file is
292 * created for each tile, named "path0.png", "path1.png", etc.
293 * Multithreaded mode currently does not support writing to a file.
294 */
295 virtual bool render(const SkString* path) SK_OVERRIDE;
296
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000297 virtual void end() SK_OVERRIDE;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000298
keyar@chromium.orgcc6e5ef2012-07-27 20:09:26 +0000299 void setTileWidth(int width) {
300 fTileWidth = width;
301 }
302
303 int getTileWidth() const {
304 return fTileWidth;
305 }
306
307 void setTileHeight(int height) {
308 fTileHeight = height;
309 }
310
311 int getTileHeight() const {
312 return fTileHeight;
313 }
314
315 void setTileWidthPercentage(double percentage) {
316 fTileWidthPercentage = percentage;
317 }
318
keyar@chromium.org163b5672012-08-01 17:53:29 +0000319 double getTileWidthPercentage() const {
keyar@chromium.orgcc6e5ef2012-07-27 20:09:26 +0000320 return fTileWidthPercentage;
321 }
322
323 void setTileHeightPercentage(double percentage) {
324 fTileHeightPercentage = percentage;
325 }
326
keyar@chromium.org163b5672012-08-01 17:53:29 +0000327 double getTileHeightPercentage() const {
keyar@chromium.orgcc6e5ef2012-07-27 20:09:26 +0000328 return fTileHeightPercentage;
329 }
330
keyar@chromium.orgf4959ab2012-08-23 20:53:25 +0000331 void setTileMinPowerOf2Width(int width) {
332 SkASSERT(SkIsPow2(width) && width > 0);
333 if (!SkIsPow2(width) || width <= 0) {
334 return;
335 }
336
337 fTileMinPowerOf2Width = width;
338 }
339
340 int getTileMinPowerOf2Width() const {
341 return fTileMinPowerOf2Width;
342 }
343
scroggo@google.comcbcef702012-12-13 22:09:28 +0000344 virtual TiledPictureRenderer* getTiledRenderer() SK_OVERRIDE { return this; }
345
346 /**
347 * Report the number of tiles in the x and y directions. Must not be called before init.
348 * @param x Output parameter identifying the number of tiles in the x direction.
349 * @param y Output parameter identifying the number of tiles in the y direction.
350 * @return True if the tiles have been set up, and x and y are meaningful. If false, x and y are
351 * unmodified.
352 */
353 bool tileDimensions(int& x, int&y);
354
355 /**
356 * Move to the next tile and return its indices. Must be called before calling drawCurrentTile
357 * for the first time.
358 * @param i Output parameter identifying the column of the next tile to be drawn on the next
359 * call to drawNextTile.
360 * @param j Output parameter identifying the row of the next tile to be drawn on the next call
361 * to drawNextTile.
362 * @param True if the tiles have been created and the next tile to be drawn by drawCurrentTile
363 * is within the range of tiles. If false, i and j are unmodified.
364 */
365 bool nextTile(int& i, int& j);
366
367 /**
368 * Render one tile. This will draw the same tile each time it is called until nextTile is
369 * called. The tile rendered will depend on how many calls have been made to nextTile.
370 * It is an error to call this without first calling nextTile, or if nextTile returns false.
371 */
372 void drawCurrentTile();
373
scroggo@google.coma62da2f2012-11-02 21:28:12 +0000374protected:
scroggo@google.coma62da2f2012-11-02 21:28:12 +0000375 SkTDArray<SkRect> fTileRects;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000376
scroggo@google.com0a049b82012-11-02 22:01:26 +0000377 virtual SkCanvas* setupCanvas(int width, int height) SK_OVERRIDE;
378 virtual SkString getConfigNameInternal() SK_OVERRIDE;
379
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000380private:
scroggo@google.comcbcef702012-12-13 22:09:28 +0000381 int fTileWidth;
382 int fTileHeight;
383 double fTileWidthPercentage;
384 double fTileHeightPercentage;
385 int fTileMinPowerOf2Width;
386
387 // These variables are only used for timing individual tiles.
388 // Next tile to draw in fTileRects.
389 int fCurrentTileOffset;
390 // Number of tiles in the x direction.
391 int fTilesX;
392 // Number of tiles in the y direction.
393 int fTilesY;
scroggo@google.combcdf2ec2012-09-20 14:42:33 +0000394
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000395 void setupTiles();
keyar@chromium.orgf4959ab2012-08-23 20:53:25 +0000396 void setupPowerOf2Tiles();
keyar@chromium.org9d696c02012-08-07 17:11:33 +0000397
398 typedef PictureRenderer INHERITED;
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000399};
400
scroggo@google.coma62da2f2012-11-02 21:28:12 +0000401class CloneData;
402
403class MultiCorePictureRenderer : public TiledPictureRenderer {
404public:
405 explicit MultiCorePictureRenderer(int threadCount);
406
407 ~MultiCorePictureRenderer();
408
409 virtual void init(SkPicture* pict) SK_OVERRIDE;
410
411 /**
412 * Behaves like TiledPictureRenderer::render(), only using multiple threads.
413 */
414 virtual bool render(const SkString* path) SK_OVERRIDE;
415
416 virtual void end() SK_OVERRIDE;
417
418private:
scroggo@google.com0a049b82012-11-02 22:01:26 +0000419 virtual SkString getConfigNameInternal() SK_OVERRIDE;
420
scroggo@google.coma62da2f2012-11-02 21:28:12 +0000421 const int fNumThreads;
422 SkTDArray<SkCanvas*> fCanvasPool;
423 SkThreadPool fThreadPool;
424 SkPicture* fPictureClones;
425 CloneData** fCloneData;
426 SkCountdown fCountdown;
427
428 typedef TiledPictureRenderer INHERITED;
429};
430
scroggo@google.com9a412522012-09-07 15:21:18 +0000431/**
432 * This class does not do any rendering, but its render function executes turning an SkPictureRecord
433 * into an SkPicturePlayback, which we want to time.
434 */
435class PlaybackCreationRenderer : public PictureRenderer {
436public:
437 virtual void setup() SK_OVERRIDE;
438
scroggo@google.com81f9d2e2012-09-20 14:54:21 +0000439 virtual bool render(const SkString*) SK_OVERRIDE;
scroggo@google.com9a412522012-09-07 15:21:18 +0000440
441 virtual SkString getPerIterTimeFormat() SK_OVERRIDE { return SkString("%.4f"); }
442
443 virtual SkString getNormalTimeFormat() SK_OVERRIDE { return SkString("%6.4f"); }
444
445private:
junov@chromium.org9313ca42012-11-02 18:11:49 +0000446 SkAutoTUnref<SkPicture> fReplayer;
scroggo@google.com0a049b82012-11-02 22:01:26 +0000447
448 virtual SkString getConfigNameInternal() SK_OVERRIDE;
449
scroggo@google.com9a412522012-09-07 15:21:18 +0000450 typedef PictureRenderer INHERITED;
451};
452
reed@google.comfe7b1ed2012-11-29 21:00:39 +0000453extern PictureRenderer* CreateGatherPixelRefsRenderer();
reed@google.com5a34fd32012-12-10 16:05:09 +0000454extern PictureRenderer* CreatePictureCloneRenderer();
reed@google.comfe7b1ed2012-11-29 21:00:39 +0000455
keyar@chromium.org451bb9f2012-07-26 17:27:57 +0000456}
457
458#endif // PictureRenderer_DEFINED