diff options
author | senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-30 19:08:47 +0000 |
---|---|---|
committer | senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-30 19:08:47 +0000 |
commit | c2594f41066102d7a8a73effd3c574142a018b9a (patch) | |
tree | c37909d256544ee2932e9fbf2733b2a7c62d813c /src/core | |
parent | 74749cd45c29b4f5300e2518f2c2c765ce8ae208 (diff) |
This changes the signature of SkImageFilter::filterImageGPU() to use SkBitmaps for input and output, and removes the rect param. This allows us to return textures which are larger than the actual result, such as when GrAutoScratchTextures are used. The SkBitmap's size represents the active region, while the GrTexture's size is the full texture size.
This fixes the bicubic image filter GM on the GPU, which otherwise draws garbage outside the filtered region. It also moves us closer to unifying the signatures of SkImageFilter::onFilterImage() and SkImageFilter::filterImageGPU().
Review URL: https://codereview.appspot.com/7180048
git-svn-id: http://skia.googlecode.com/svn/trunk@7467 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkImageFilter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp index fddb5befd0..616b8b9174 100644 --- a/src/core/SkImageFilter.cpp +++ b/src/core/SkImageFilter.cpp @@ -107,8 +107,9 @@ bool SkImageFilter::canFilterImageGPU() const { return false; } -GrTexture* SkImageFilter::filterImageGPU(Proxy* proxy, GrTexture* texture, const SkRect& rect) { - return NULL; +bool SkImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, SkBitmap* result) { + SkASSERT(false); // Should never be called, since canFilterImageGPU() returned false. + return false; } bool SkImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm, |