aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-05-22 14:01:46 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-22 14:01:46 -0700
commit682c269a1511200322916af83053e26004c0ec40 (patch)
treebb382801bc7e7ad13aa6ded4fdcfd93551f6c01f /tools
parenta5f1d5a95a350275c8ea63307d5ceaaccaa0c89b (diff)
Store context options on caps.
Diffstat (limited to 'tools')
-rw-r--r--tools/CopyTilesRenderer.cpp2
-rw-r--r--tools/CopyTilesRenderer.h3
-rw-r--r--tools/PictureRenderer.cpp2
-rw-r--r--tools/PictureRenderer.h17
-rw-r--r--tools/PictureRenderingFlags.cpp5
5 files changed, 17 insertions, 12 deletions
diff --git a/tools/CopyTilesRenderer.cpp b/tools/CopyTilesRenderer.cpp
index 6f95da758b..bc1e32ec11 100644
--- a/tools/CopyTilesRenderer.cpp
+++ b/tools/CopyTilesRenderer.cpp
@@ -18,7 +18,7 @@
namespace sk_tools {
#if SK_SUPPORT_GPU
- CopyTilesRenderer::CopyTilesRenderer(const GrContext::Options& opts, int x, int y)
+ CopyTilesRenderer::CopyTilesRenderer(const GrContextOptions& opts, int x, int y)
: INHERITED(opts)
, fXTilesPerLargeTile(x)
, fYTilesPerLargeTile(y) { }
diff --git a/tools/CopyTilesRenderer.h b/tools/CopyTilesRenderer.h
index 3d9a1eb18c..5ff4175eed 100644
--- a/tools/CopyTilesRenderer.h
+++ b/tools/CopyTilesRenderer.h
@@ -11,6 +11,7 @@
#include "PictureRenderer.h"
#include "SkTypes.h"
+struct GrContextOptions;
class SkPicture;
class SkString;
@@ -23,7 +24,7 @@ namespace sk_tools {
public:
#if SK_SUPPORT_GPU
- CopyTilesRenderer(const GrContext::Options &opts, int x, int y);
+ CopyTilesRenderer(const GrContextOptions &opts, int x, int y);
#else
CopyTilesRenderer(int x, int y);
#endif
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index 93701baed9..0875c5ab65 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -465,7 +465,7 @@ SkString SimplePictureRenderer::getConfigNameInternal() {
///////////////////////////////////////////////////////////////////////////////////////////////
#if SK_SUPPORT_GPU
-TiledPictureRenderer::TiledPictureRenderer(const GrContext::Options& opts)
+TiledPictureRenderer::TiledPictureRenderer(const GrContextOptions& opts)
: INHERITED(opts)
, fTileWidth(kDefaultTileWidth)
#else
diff --git a/tools/PictureRenderer.h b/tools/PictureRenderer.h
index e1434686c6..fadf97085f 100644
--- a/tools/PictureRenderer.h
+++ b/tools/PictureRenderer.h
@@ -28,6 +28,7 @@
#include "image_expectations.h"
+struct GrContextOptions;
class SkBitmap;
class SkCanvas;
class SkGLContext;
@@ -392,7 +393,7 @@ public:
return fGrContext;
}
- const GrContext::Options& getGrContextOptions() {
+ const GrContextOptions& getGrContextOptions() {
return fGrContextFactory.getGlobalOptions();
}
#endif
@@ -406,7 +407,7 @@ public:
}
#if SK_SUPPORT_GPU
- explicit PictureRenderer(const GrContext::Options &opts)
+ explicit PictureRenderer(const GrContextOptions &opts)
#else
PictureRenderer()
#endif
@@ -498,7 +499,7 @@ private:
class RecordPictureRenderer : public PictureRenderer {
public:
#if SK_SUPPORT_GPU
- RecordPictureRenderer(const GrContext::Options &opts) : INHERITED(opts) { }
+ RecordPictureRenderer(const GrContextOptions &opts) : INHERITED(opts) { }
#endif
bool render(SkBitmap** out = NULL) override;
@@ -519,7 +520,7 @@ private:
class PipePictureRenderer : public PictureRenderer {
public:
#if SK_SUPPORT_GPU
- PipePictureRenderer(const GrContext::Options &opts) : INHERITED(opts) { }
+ PipePictureRenderer(const GrContextOptions &opts) : INHERITED(opts) { }
#endif
bool render(SkBitmap** out = NULL) override;
@@ -533,7 +534,7 @@ private:
class SimplePictureRenderer : public PictureRenderer {
public:
#if SK_SUPPORT_GPU
- SimplePictureRenderer(const GrContext::Options &opts) : INHERITED(opts) { }
+ SimplePictureRenderer(const GrContextOptions &opts) : INHERITED(opts) { }
#endif
virtual void init(const SkPicture* pict,
@@ -554,7 +555,7 @@ private:
class TiledPictureRenderer : public PictureRenderer {
public:
#if SK_SUPPORT_GPU
- TiledPictureRenderer(const GrContext::Options &opts);
+ TiledPictureRenderer(const GrContextOptions &opts);
#else
TiledPictureRenderer();
#endif
@@ -689,7 +690,7 @@ private:
class PlaybackCreationRenderer : public PictureRenderer {
public:
#if SK_SUPPORT_GPU
- PlaybackCreationRenderer(const GrContext::Options &opts) : INHERITED(opts) { }
+ PlaybackCreationRenderer(const GrContextOptions &opts) : INHERITED(opts) { }
#endif
void setup() override;
@@ -709,7 +710,7 @@ private:
};
#if SK_SUPPORT_GPU
-extern PictureRenderer* CreateGatherPixelRefsRenderer(const GrContext::Options& opts);
+extern PictureRenderer* CreateGatherPixelRefsRenderer(const GrContextOptions& opts);
#else
extern PictureRenderer* CreateGatherPixelRefsRenderer();
#endif
diff --git a/tools/PictureRenderingFlags.cpp b/tools/PictureRenderingFlags.cpp
index 82097e9819..26d15911d1 100644
--- a/tools/PictureRenderingFlags.cpp
+++ b/tools/PictureRenderingFlags.cpp
@@ -8,6 +8,9 @@
#include "PictureRenderingFlags.h"
#include "CopyTilesRenderer.h"
+#if SK_SUPPORT_GPU
+#include "GrContextOptions.h"
+#endif
#include "PictureRenderer.h"
#include "picture_utils.h"
#include "SkCommandLineFlags.h"
@@ -94,7 +97,7 @@ sk_tools::PictureRenderer* parseRenderer(SkString& error, PictureTool tool) {
const char* mode = NULL;
#if SK_SUPPORT_GPU
- GrContext::Options grContextOpts;
+ GrContextOptions grContextOpts;
grContextOpts.fDrawPathToCompressedTexture = FLAGS_gpuCompressAlphaMasks;
#define RENDERER_ARGS (grContextOpts)
#else