Fix GPU-less build from r5056.
authorbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 13 Aug 2012 14:31:30 +0000 (14:31 +0000)
committerbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 13 Aug 2012 14:31:30 +0000 (14:31 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@5058 2bbb7eff-a529-9590-31e7-b0007b416f81

src/effects/SkMagnifierImageFilter.cpp

index dbd9135..eebfa48 100644 (file)
@@ -9,11 +9,11 @@
 #include "SkMagnifierImageFilter.h"
 #include "SkColorPriv.h"
 #include "SkFlattenableBuffers.h"
-#include "gl/GrGLTexture.h"
 
 #include <algorithm>
 
 ////////////////////////////////////////////////////////////////////////////////
+#if SK_SUPPORT_GPU
 #include "effects/GrSingleTextureEffect.h"
 #include "gl/GrGLProgramStage.h"
 #include "gl/GrGLSL.h"
@@ -226,6 +226,8 @@ bool GrMagnifierEffect::isEqual(const GrCustomStage& sBase) const {
             this->fYInset == s.fYInset);
 }
 
+#endif
+
 ////////////////////////////////////////////////////////////////////////////////
 SkMagnifierImageFilter::SkMagnifierImageFilter(SkFlattenableReadBuffer& buffer)
   : INHERITED(buffer) {
@@ -244,6 +246,7 @@ SkMagnifierImageFilter::SkMagnifierImageFilter(SkRect srcRect, SkScalar inset)
 
 bool SkMagnifierImageFilter::asNewCustomStage(GrCustomStage** stage,
                                               GrTexture* texture) const {
+#if SK_SUPPORT_GPU
     if (stage) {
       *stage =
           SkNEW_ARGS(GrMagnifierEffect, (texture,
@@ -255,6 +258,9 @@ bool SkMagnifierImageFilter::asNewCustomStage(GrCustomStage** stage,
                                          fInset / texture->height()));
     }
     return true;
+#else
+    return false;
+#endif
 }
 
 void SkMagnifierImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const {