Re-land "Fix external SkImageFilter caching with clips."

This reverts commit 9efd66b845.

R=reed@google.com
TBR=reed@google.com
BUG=skia:

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/348903004
This commit is contained in:
senorblanco 2014-06-20 15:41:59 -07:00 committed by Commit bot
parent b8f0798849
commit bccac6cbf1

View File

@ -122,6 +122,16 @@ bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm,
SkIRect* dst) const {
SkASSERT(&src);
SkASSERT(dst);
if (SkImageFilter::GetExternalCache()) {
/*
* When the external cache is active, do not intersect the saveLayer
* bounds with the clip bounds. This is so that the cached result
* is always the full size of the primitive's bounds,
* regardless of the clip active on first draw.
*/
*dst = SkIRect::MakeLargest();
return true;
}
return this->onFilterBounds(src, ctm, dst);
}