aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-05-22 12:25:41 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-22 12:25:41 -0700
commitf28cff71db2cbb1ff18a8fbf1e80ca761d1f69bc (patch)
treeb91e0e301f518cd417afb870824e84aa16297a7d /tools
parenta624d12b2d10cff79ba4b31744d81cc2e0a8db5f (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.cpp3
5 files changed, 15 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..0cec3e17be 100644
--- a/tools/PictureRenderingFlags.cpp
+++ b/tools/PictureRenderingFlags.cpp
@@ -8,6 +8,7 @@
#include "PictureRenderingFlags.h"
#include "CopyTilesRenderer.h"
+#include "GrContextOptions.h"
#include "PictureRenderer.h"
#include "picture_utils.h"
#include "SkCommandLineFlags.h"
@@ -94,7 +95,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