Fix DeferredTextureImage test on Mac

Change-Id: I34cf12b2aa16b2441b9e57162cbaee1444f42c52
Reviewed-on: https://skia-review.googlesource.com/29607
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2017-08-02 11:51:43 -04:00 committed by Skia Commit-Bot
parent d8f7da46d0
commit d9971c0c20
2 changed files with 9 additions and 0 deletions

View File

@ -486,6 +486,9 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SkImage_makeTextureImage, reporter, contextIn
ERRORF(reporter, "makeTextureImage changed image alpha type."); ERRORF(reporter, "makeTextureImage changed image alpha type.");
} }
} }
testContext->makeCurrent();
context->flush();
} }
} }
@ -1123,6 +1126,9 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DeferredTextureImage, reporter, ctxInfo) {
} }
sk_free(buffer); sk_free(buffer);
} }
testContext->makeCurrent();
context->flush();
} }
} }
#endif #endif

View File

@ -251,6 +251,9 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
if (renderable) { if (renderable) {
desc.fFlags = kRenderTarget_GrSurfaceFlag; desc.fFlags = kRenderTarget_GrSurfaceFlag;
tex = provider->createTexture(desc, budgeted); tex = provider->createTexture(desc, budgeted);
if (!tex) {
continue; // This can fail on Mesa
}
sk_sp<GrRenderTarget> rt(sk_ref_sp(tex->asRenderTarget())); sk_sp<GrRenderTarget> rt(sk_ref_sp(tex->asRenderTarget()));
sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(rt, origin)); sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(rt, origin));