Speculative fix for nexus player unit test failure

TBR=robertphillips@google.com

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/941433006
This commit is contained in:
bsalomon 2015-02-19 12:05:58 -08:00 committed by Commit bot
parent c8e4765b8e
commit b602d4dff8

View File

@ -104,6 +104,12 @@ static void test_stencil_buffers(skiatest::Reporter* reporter, GrContext* contex
GrSurfaceDesc smallMSAADesc = smallDesc; GrSurfaceDesc smallMSAADesc = smallDesc;
smallMSAADesc.fSampleCnt = 4; smallMSAADesc.fSampleCnt = 4;
SkAutoTUnref<GrTexture> smallMSAART0(context->createTexture(smallMSAADesc, false)); 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 && REPORTER_ASSERT(reporter, smallRT0 && smallMSAART0 &&
smallRT0->asRenderTarget() && smallMSAART0->asRenderTarget() && smallRT0->asRenderTarget() && smallMSAART0->asRenderTarget() &&
smallRT0->asRenderTarget()->getStencilBuffer() != smallRT0->asRenderTarget()->getStencilBuffer() !=