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>
This commit is contained in:
Brian Salomon 2017-03-07 09:08:36 -05:00 committed by Skia Commit-Bot
parent c0a4c4f969
commit bd7c551a0f
2 changed files with 11 additions and 4 deletions

View File

@ -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;

View File

@ -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;