aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar senorblanco <senorblanco@chromium.org>2015-04-20 15:00:06 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-20 15:00:06 -0700
commit0e95b116fcc7bec1bbdf5f0459ebd464c458f714 (patch)
treee6433a850ead6ea4d6b9acad7027b751b435428b /tests
parentf3c2c46cf818fe408d0ec295338002fc01c64926 (diff)
Speculative fix for ASAN build.
Check for NULL GrContext in TessellatingPathRendererTests. Also fix an upload nag (no #includes before GPU #ifdef). TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1097943004
Diffstat (limited to 'tests')
-rw-r--r--tests/TessellatingPathRendererTests.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp
index 0635e7f354..c59d4951fe 100644
--- a/tests/TessellatingPathRendererTests.cpp
+++ b/tests/TessellatingPathRendererTests.cpp
@@ -5,6 +5,8 @@
* found in the LICENSE file.
*/
+#include "SkPath.h"
+
#if SK_SUPPORT_GPU
#include "GrContextFactory.h"
#include "GrTessellatingPathRenderer.h"
@@ -240,6 +242,9 @@ static void test_path(GrDrawTarget* dt, GrRenderTarget* rt, const SkPath& path)
DEF_GPUTEST(TessellatingPathRendererTests, reporter, factory) {
GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(0));
+ if (!context) {
+ return;
+ }
GrSurfaceDesc desc;
desc.fFlags = kRenderTarget_GrSurfaceFlag;
desc.fWidth = 800;