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

Unified Diff: tools/PictureRenderer.cpp

Issue 468293002: Add runtime flag to turn compressed alpha masks on (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add flag to bench/render pictures Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/PictureRenderer.h ('k') | tools/PictureRenderingFlags.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « tools/PictureRenderer.h ('k') | tools/PictureRenderingFlags.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698