Update ProxyTest to skip configs that don't support the requested sample counts
authorGreg Daniel <egdaniel@google.com>
Wed, 19 Apr 2017 19:27:54 +0000 (15:27 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Wed, 19 Apr 2017 20:05:51 +0000 (20:05 +0000)
Bug: skia:
Change-Id: I806dc153b8b6cf6dd6b74549905990cadb55daab
Reviewed-on: https://skia-review.googlesource.com/13871
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

tests/ProxyTest.cpp

index 7657e28f5aa9dbf66cb5e2013b81286ba0f8e189..7fd302951b23b88818080279cfc7614acfe1941f 100644 (file)
@@ -213,6 +213,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
         for (auto config : { kAlpha_8_GrPixelConfig, kRGBA_8888_GrPixelConfig }) {
             for (auto budgeted : { SkBudgeted::kYes, SkBudgeted::kNo }) {
                 for (auto numSamples: { 0, 4}) {
+                    if (caps.maxSampleCount() < numSamples) continue;
                     bool renderable = caps.isConfigRenderable(config, numSamples > 0);
 
                     GrSurfaceDesc desc;