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>
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index 814dc9b..4ee2803 100644
--- a/tests/ImageTest.cpp
+++ b/tests/ImageTest.cpp
@@ -486,6 +486,9 @@
ERRORF(reporter, "makeTextureImage changed image alpha type.");
}
}
+
+ testContext->makeCurrent();
+ context->flush();
}
}
@@ -1123,6 +1126,9 @@
}
sk_free(buffer);
}
+
+ testContext->makeCurrent();
+ context->flush();
}
}
#endif
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index 547d3b2..a9b4643 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -251,6 +251,9 @@
if (renderable) {
desc.fFlags = kRenderTarget_GrSurfaceFlag;
tex = provider->createTexture(desc, budgeted);
+ if (!tex) {
+ continue; // This can fail on Mesa
+ }
sk_sp<GrRenderTarget> rt(sk_ref_sp(tex->asRenderTarget()));
sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(rt, origin));