Speculative fix for nexus player unit test failure
authorbsalomon <bsalomon@google.com>
Thu, 19 Feb 2015 20:05:58 +0000 (12:05 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 19 Feb 2015 20:05:58 +0000 (12:05 -0800)
TBR=robertphillips@google.com

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/941433006

tests/ResourceCacheTest.cpp

index 8316c6b..d063b6a 100644 (file)
@@ -104,6 +104,12 @@ static void test_stencil_buffers(skiatest::Reporter* reporter, GrContext* contex
         GrSurfaceDesc smallMSAADesc = smallDesc;
         smallMSAADesc.fSampleCnt = 4;
         SkAutoTUnref<GrTexture> smallMSAART0(context->createTexture(smallMSAADesc, false));
+#ifdef SK_BUILD_FOR_ANDROID
+        if (!smallMSAART0) {
+            // The nexus player seems to fail to create MSAA textures.
+            return;
+        }
+#endif
         REPORTER_ASSERT(reporter, smallRT0 && smallMSAART0 &&
                                   smallRT0->asRenderTarget() && smallMSAART0->asRenderTarget() &&
                                   smallRT0->asRenderTarget()->getStencilBuffer() !=