Reland "Add tooling support for dmsaa"
Reland 188443be8d18b270a9f5810448d667e6ba009cb0 without the DMSAA bots
to ensure nothing else changes.
Original change's description:
> Add tooling support for dmsaa
>
> Adds a "fAlwaysAntiAlias" flag to GrContextOptions that can be set from
> tooling code. When dmsaa is set, SkGpuDevice draws everything
> antialiased. Adds new "gldmsaa" and "glesdmsaa" configs and creates bots
> to run them.
>
> Bug: skia:11396
> Change-Id: I165e89434b733f7b02312cea0e6649812528083b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com
Bug: skia:11396
Change-Id: Icb45097e0a34543dc577fa32f19a692e90643a35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386338
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index c646319..2cb8b00 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -247,6 +247,7 @@
}
bool init(SkImageInfo info, Benchmark* bench) override {
GrContextOptions options = grContextOpts;
+ options.fAlwaysAntialias = config.useDMSAA;
bench->modifyGrContextOptions(&options);
this->factory = std::make_unique<GrContextFactory>(options);
SkSurfaceProps props(this->config.surfaceFlags, kRGB_H_SkPixelGeometry);
@@ -469,6 +470,7 @@
const auto ctxType = gpuConfig->getContextType();
const auto ctxOverrides = gpuConfig->getContextOverrides();
const auto sampleCount = gpuConfig->getSamples();
+ const auto useDMSAA = gpuConfig->getUseDMSAA();
const auto colorType = gpuConfig->getColorType();
auto colorSpace = gpuConfig->getColorSpace();
if (gpuConfig->getSurfType() != SkCommandLineConfigGpu::SurfType::kDefault) {
@@ -499,6 +501,7 @@
kPremul_SkAlphaType,
sk_ref_sp(colorSpace),
sampleCount,
+ useDMSAA,
ctxType,
ctxOverrides,
gpuConfig->getSurfaceFlags()
@@ -517,7 +520,7 @@
} \
Config config = { \
SkString(#name), Benchmark::backend, color, alpha, colorSpace, \
- 0, kBogusContextType, kBogusContextOverrides, 0 \
+ 0, false, kBogusContextType, kBogusContextOverrides, 0 \
}; \
configs->push_back(config); \
return; \