use #if SK_SUPPORT_GPU to guard references to gpudevice



git-svn-id: http://skia.googlecode.com/svn/trunk@6449 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/srcmode.cpp b/gm/srcmode.cpp
index 1e4ce13..6eba098 100644
--- a/gm/srcmode.cpp
+++ b/gm/srcmode.cpp
@@ -10,7 +10,9 @@
 #include "SkGradientShader.h"
 #include "SkSurface.h"
 
-#include "SkGpuDevice.h"
+#if SK_SUPPORT_GPU
+    #include "SkGpuDevice.h"
+#endif
 
 #define W   SkIntToScalar(80)
 #define H   SkIntToScalar(60)
@@ -120,13 +122,14 @@
             SkImage::kPMColor_ColorType,
             SkImage::kPremul_AlphaType
         };
-        
+#if SK_SUPPORT_GPU
         SkDevice* dev = canvas->getDevice();
         if (dev->accessRenderTarget()) {
             SkGpuDevice* gd = (SkGpuDevice*)dev;
             GrContext* ctx = gd->context();
             return SkSurface::NewRenderTarget(ctx, info, 0);
         }
+#endif
         return SkSurface::NewRaster(info);
     }