Index: tools/PictureRenderer.cpp |
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp |
index dd4cea481d1f6b1f86fea400400b79a607fa13e2..7325c201b8ea2fd56acc0b82420fab265acdd2fd 100644 |
--- a/tools/PictureRenderer.cpp |
+++ b/tools/PictureRenderer.cpp |
@@ -444,8 +444,14 @@ SkString SimplePictureRenderer::getConfigNameInternal() { |
/////////////////////////////////////////////////////////////////////////////////////////////// |
+#if SK_SUPPORT_GPU |
+TiledPictureRenderer::TiledPictureRenderer(const GrContext::Options& opts) |
+ : INHERITED(opts) |
+ , fTileWidth(kDefaultTileWidth) |
+#else |
TiledPictureRenderer::TiledPictureRenderer() |
: fTileWidth(kDefaultTileWidth) |
+#endif |
, fTileHeight(kDefaultTileHeight) |
, fTileWidthPercentage(0.0) |
, fTileHeightPercentage(0.0) |
@@ -745,6 +751,10 @@ SkBBHFactory* PictureRenderer::getFactory() { |
class GatherRenderer : public PictureRenderer { |
public: |
+#if SK_SUPPORT_GPU |
+ GatherRenderer(const GrContext::Options& opts) : INHERITED(opts) { } |
+#endif |
+ |
virtual bool render(SkBitmap** out = NULL) SK_OVERRIDE { |
SkRect bounds = SkRect::MakeWH(SkIntToScalar(fPicture->width()), |
SkIntToScalar(fPicture->height())); |
@@ -758,10 +768,18 @@ private: |
virtual SkString getConfigNameInternal() SK_OVERRIDE { |
return SkString("gather_pixelrefs"); |
} |
+ |
+ typedef PictureRenderer INHERITED; |
}; |
+#if SK_SUPPORT_GPU |
+PictureRenderer* CreateGatherPixelRefsRenderer(const GrContext::Options& opts) { |
+ return SkNEW_ARGS(GatherRenderer, (opts)); |
+} |
+#else |
PictureRenderer* CreateGatherPixelRefsRenderer() { |
return SkNEW(GatherRenderer); |
} |
+#endif |
} // namespace sk_tools |