diff options
-rw-r--r-- | gm/discard.cpp | 4 | ||||
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 4 | ||||
-rw-r--r-- | src/image/SkSurface_Gpu.cpp | 4 | ||||
-rw-r--r-- | tests/ReadWriteAlphaTest.cpp | 3 |
4 files changed, 12 insertions, 3 deletions
diff --git a/gm/discard.cpp b/gm/discard.cpp index ce89e98507..ff8fe4a4b8 100644 --- a/gm/discard.cpp +++ b/gm/discard.cpp @@ -5,14 +5,14 @@ * found in the LICENSE file. */ -#if SK_SUPPORT_GPU - #include "gm.h" #include "SkCanvas.h" #include "SkColorShader.h" #include "SkPaint.h" #include "SkSurface.h" +#if SK_SUPPORT_GPU + namespace skiagm { /* diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 0dc626cd66..35c3ab532d 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -43,6 +43,8 @@ #include "SkXfermode.h" #include "SkErrorInternals.h" +#if SK_SUPPORT_GPU + enum { kDefaultImageFilterCacheSize = 32 * 1024 * 1024 }; #define CACHE_COMPATIBLE_DEVICE_TEXTURES 1 @@ -1855,3 +1857,5 @@ SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { // filter traversal. return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); } + +#endif diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp index c7ebe0ebe1..3e1eb9452b 100644 --- a/src/image/SkSurface_Gpu.cpp +++ b/src/image/SkSurface_Gpu.cpp @@ -10,6 +10,8 @@ #include "SkCanvas.h" #include "SkGpuDevice.h" +#if SK_SUPPORT_GPU + class SkSurface_Gpu : public SkSurface_Base { public: SK_DECLARE_INST_COUNT(SkSurface_Gpu) @@ -154,3 +156,5 @@ SkSurface* SkSurface::NewScratchRenderTarget(GrContext* ctx, const SkImageInfo& return SkNEW_ARGS(SkSurface_Gpu, (tex->asRenderTarget(), props, true)); } + +#endif diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp index 7b6a05d299..6bcc51faf2 100644 --- a/tests/ReadWriteAlphaTest.cpp +++ b/tests/ReadWriteAlphaTest.cpp @@ -5,12 +5,13 @@ * found in the LICENSE file. */ +#include "Test.h" + // This test is specific to the GPU backend. #if SK_SUPPORT_GPU && !defined(SK_BUILD_FOR_ANDROID) #include "GrContextFactory.h" #include "SkGpuDevice.h" -#include "Test.h" static const int X_SIZE = 12; static const int Y_SIZE = 12; |