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
This commit is contained in:
senorblanco 2015-04-20 15:00:06 -07:00 committed by Commit bot
parent f3c2c46cf8
commit 0e95b116fc

View File

@ -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;