Update gpu caps for valid sample counts.
Instead of query and maxSampleCount and using that to cap, we now have
each config store its supported values and when requested returns either
the next highest or equal supported value, or if non the max config supported.
Bug: skia:
Change-Id: I8802d44c13b3b1703ee54a7e69b82102d4b8dc2d
Reviewed-on: https://skia-review.googlesource.com/24302
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/tests/GpuSampleLocationsTest.cpp b/tests/GpuSampleLocationsTest.cpp
index ff87a33..6c5d4a6 100644
--- a/tests/GpuSampleLocationsTest.cpp
+++ b/tests/GpuSampleLocationsTest.cpp
@@ -189,7 +189,8 @@
sk_sp<GrContext> ctx(GrContext::Create(kOpenGL_GrBackend, testInterface));
// This test relies on at least 2 samples.
- if (ctx->caps()->maxSampleCount() < 2) {
+ int supportedSample = ctx->caps()->getSampleCount(2, kRGBA_8888_GrPixelConfig);
+ if (supportedSample < 2) {
return;
}
test_sampleLocations(reporter, &testInterface, ctx.get());