aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkBlurImageFilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/SkBlurImageFilter.cpp')
-rw-r--r--src/effects/SkBlurImageFilter.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp
index e3ac346653..ed76743dbc 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -8,6 +8,7 @@
#include "SkBitmap.h"
#include "SkBlurImageFilter.h"
#include "SkColorPriv.h"
+#include "GrContext.h"
SkBlurImageFilter::SkBlurImageFilter(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer) {
@@ -20,11 +21,6 @@ SkBlurImageFilter::SkBlurImageFilter(SkScalar sigmaX, SkScalar sigmaY)
SkASSERT(sigmaX >= 0 && sigmaY >= 0);
}
-bool SkBlurImageFilter::asABlur(SkSize* sigma) const {
- *sigma = fSigma;
- return true;
-}
-
void SkBlurImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeScalar(fSigma.fWidth);
@@ -187,4 +183,9 @@ bool SkBlurImageFilter::onFilterImage(Proxy*,
return true;
}
+GrTexture* SkBlurImageFilter::onFilterImageGPU(GrTexture* src, const SkRect& rect) {
+ return src->getContext()->gaussianBlur(src, false, rect,
+ fSigma.width(), fSigma.height());
+}
+
SK_DEFINE_FLATTENABLE_REGISTRAR(SkBlurImageFilter)