From cf8fb1f6f03fc77f9927564f9ef9abeeeec508d2 Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Thu, 2 Aug 2012 14:03:32 +0000 Subject: Create GPU-less build of Skia. git-svn-id: http://skia.googlecode.com/svn/trunk@4912 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tests/Test.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests/Test.cpp') diff --git a/tests/Test.cpp b/tests/Test.cpp index 62df73130f..0441ab0fa7 100644 --- a/tests/Test.cpp +++ b/tests/Test.cpp @@ -7,9 +7,14 @@ */ #include "Test.h" +#include "SkTLazy.h" + +#if SK_SUPPORT_GPU #include "GrContext.h" #include "gl/SkNativeGLContext.h" -#include "SkTLazy.h" +#else +class GrContext; +#endif using namespace skiatest; @@ -78,6 +83,7 @@ bool Test::run() { GrContext* GpuTest::GetContext() { +#if SK_SUPPORT_GPU // preserve this order, we want gGrContext destroyed after gEGLContext static SkTLazy gGLContext; static SkAutoTUnref gGrContext; @@ -93,5 +99,8 @@ GrContext* GpuTest::GetContext() { gGLContext.get()->makeCurrent(); } return gGrContext.get(); +#else + return NULL; +#endif } -- cgit v1.2.3