Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Unified Diff: src/effects/SkTileImageFilter.cpp

Issue 1152553006: Fix dst bound reported by SkTileImageFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/effects/SkTileImageFilter.cpp
diff --git a/src/effects/SkTileImageFilter.cpp b/src/effects/SkTileImageFilter.cpp
index c5cf51871da4aab697086e21db0611afc3dcae1b..6acf9fd5ac36494d79579ceaa2154303d981150e 100644
--- a/src/effects/SkTileImageFilter.cpp
+++ b/src/effects/SkTileImageFilter.cpp
@@ -82,6 +82,10 @@ bool SkTileImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src,
return true;
}
+void SkTileImageFilter::computeFastBounds(const SkRect& src, SkRect* dst) const {
+ *dst = fDstRect;
+}
+
bool SkTileImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
SkIRect* dst) const {
SkRect srcRect;
@@ -110,6 +114,15 @@ void SkTileImageFilter::flatten(SkWriteBuffer& buffer) const {
#ifndef SK_IGNORE_TO_STRING
void SkTileImageFilter::toString(SkString* str) const {
str->appendf("SkTileImageFilter: (");
+ str->appendf("src: %.2f %.2f %.2f %.2f",
+ fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBottom);
+ str->appendf(" dst: %.2f %.2f %.2f %.2f",
+ fDstRect.fLeft, fDstRect.fTop, fDstRect.fRight, fDstRect.fBottom);
+ if (this->getInput(0)) {
+ str->appendf("input: (");
+ this->getInput(0)->toString(str);
+ str->appendf(")");
+ }
str->append(")");
}
#endif

Powered by Google App Engine
This is Rietveld 408576698