diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-02 14:03:32 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-02 14:03:32 +0000 |
commit | cf8fb1f6f03fc77f9927564f9ef9abeeeec508d2 (patch) | |
tree | 7534f5f2edd97cd61f18ee35ae4a14407a53453e /tests/Test.cpp | |
parent | f2a9e58858423be9cbfa72e01e8284754e7d6381 (diff) |
Create GPU-less build of Skia.
git-svn-id: http://skia.googlecode.com/svn/trunk@4912 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/Test.cpp')
-rw-r--r-- | tests/Test.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
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<SkNativeGLContext> gGLContext; static SkAutoTUnref<GrContext> gGrContext; @@ -93,5 +99,8 @@ GrContext* GpuTest::GetContext() { gGLContext.get()->makeCurrent(); } return gGrContext.get(); +#else + return NULL; +#endif } |