aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-03-07 09:08:36 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-07 14:52:45 +0000
commitbd7c551a0f65cb79fe4ed188ce5b594d653bddad (patch)
tree1a92d863f27440d821aca4fb3add4ab20e075121
parentc0a4c4f969464ec9854d726836a430262351d63d (diff)
Don't run image tests on msaa configs.
BUG=skia:6331 BUG=skia:4888 Change-Id: I8b66f4662342c2b60ddd2859146839d7cb09bbeb Reviewed-on: https://skia-review.googlesource.com/9339 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
-rw-r--r--dm/DMSrcSink.cpp4
-rw-r--r--dm/DMSrcSink.h11
2 files changed, 11 insertions, 4 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 54ce44ce61..6561ad9da3 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -880,7 +880,9 @@ ImageGenSrc::ImageGenSrc(Path path, Mode mode, SkAlphaType alphaType, bool isGpu
bool ImageGenSrc::veto(SinkFlags flags) const {
if (fIsGpu) {
- return flags.type != SinkFlags::kGPU || flags.approach != SinkFlags::kDirect;
+ // MSAA runs tend to run out of memory and tests the same code paths as regular gpu configs.
+ return flags.type != SinkFlags::kGPU || flags.approach != SinkFlags::kDirect ||
+ flags.multisampled == SinkFlags::kMultisampled;
}
return flags.type != SinkFlags::kRaster || flags.approach != SinkFlags::kDirect;
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h
index 92c5773d36..220738b63b 100644
--- a/dm/DMSrcSink.h
+++ b/dm/DMSrcSink.h
@@ -57,8 +57,11 @@ private:
};
struct SinkFlags {
- enum { kNull, kGPU, kVector, kRaster } type;
- enum { kDirect, kIndirect } approach;
+ enum Type { kNull, kGPU, kVector, kRaster } type;
+ enum Approach { kDirect, kIndirect } approach;
+ enum Multisampled { kNotMultisampled, kMultisampled } multisampled;
+ SinkFlags(Type t, Approach a, Multisampled ms = kNotMultisampled)
+ : type(t), approach(a), multisampled(ms) {}
};
struct Src {
@@ -310,7 +313,9 @@ public:
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
bool serial() const override { return !fThreaded; }
const char* fileExtension() const override { return "png"; }
- SinkFlags flags() const override { return SinkFlags{ SinkFlags::kGPU, SinkFlags::kDirect }; }
+ SinkFlags flags() const override {
+ return SinkFlags{ SinkFlags::kGPU, SinkFlags::kDirect, SinkFlags::kMultisampled };
+ }
private:
sk_gpu_test::GrContextFactory::ContextType fContextType;
sk_gpu_test::GrContextFactory::ContextOverrides fContextOverrides;