aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/flags/SkCommonFlagsConfig.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-03-09 09:01:53 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-09 16:32:10 +0000
commitf865b05fe50ca2c094b9c60e4405c6094415b4f6 (patch)
treea00eab7c3787b5b977b3ae7c15aa1732f5a42c97 /tools/flags/SkCommonFlagsConfig.h
parentad06544cc6ac4b403a24adda4ee36b9f35b3071f (diff)
Add GM configs that test rendering to a GL backend texture and render target
This also adds GrGpu::create/deleteTestingOnlyBackendRenderTarget. Implemented in GL only for now. Change-Id: I9e5fdc953c4a249959af89e08332f520cefe9d90 Reviewed-on: https://skia-review.googlesource.com/113305 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tools/flags/SkCommonFlagsConfig.h')
-rw-r--r--tools/flags/SkCommonFlagsConfig.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/tools/flags/SkCommonFlagsConfig.h b/tools/flags/SkCommonFlagsConfig.h
index d88edf1c3b..3f1056d113 100644
--- a/tools/flags/SkCommonFlagsConfig.h
+++ b/tools/flags/SkCommonFlagsConfig.h
@@ -52,14 +52,21 @@ class SkCommandLineConfig {
// * backends that represent a shorthand of above (such as "glmsaa16" representing
// "gpu(api=gl,samples=16)")
class SkCommandLineConfigGpu : public SkCommandLineConfig {
- public:
+public:
+ enum class SurfType {
+ kDefault,
+ kBackendTexture,
+ kBackendRenderTarget
+ };
typedef sk_gpu_test::GrContextFactory::ContextType ContextType;
typedef sk_gpu_test::GrContextFactory::ContextOverrides ContextOverrides;
+
SkCommandLineConfigGpu(const SkString& tag, const SkTArray<SkString>& viaParts,
- ContextType contextType, bool useNVPR, bool useDIText,
- int samples, SkColorType colorType, SkAlphaType alphaType,
+ ContextType contextType, bool useNVPR, bool useDIText, int samples,
+ SkColorType colorType, SkAlphaType alphaType,
sk_sp<SkColorSpace> colorSpace, bool useStencilBuffers,
- bool testThreading);
+ bool testThreading, SurfType);
+
const SkCommandLineConfigGpu* asConfigGpu() const override { return this; }
ContextType getContextType() const { return fContextType; }
ContextOverrides getContextOverrides() const { return fContextOverrides; }
@@ -74,8 +81,9 @@ class SkCommandLineConfigGpu : public SkCommandLineConfig {
SkAlphaType getAlphaType() const { return fAlphaType; }
SkColorSpace* getColorSpace() const { return fColorSpace.get(); }
bool getTestThreading() const { return fTestThreading; }
+ SurfType getSurfType() const { return fSurfType; }
- private:
+private:
ContextType fContextType;
ContextOverrides fContextOverrides;
bool fUseDIText;
@@ -84,6 +92,7 @@ class SkCommandLineConfigGpu : public SkCommandLineConfig {
SkAlphaType fAlphaType;
sk_sp<SkColorSpace> fColorSpace;
bool fTestThreading;
+ SurfType fSurfType;
};
#endif