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

Unified Diff: src/core/SkImageFilter.cpp

Issue 1207353004: Revert of Revert of Fix SkTileImageFilter clipping/cropRect interaction issue (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 7233ec670698d1ebacc80dc95d664bb38e4cd40e..f63d1bf13ba0f6562f1b7e2fb117c3b3a5cf8595 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -32,6 +32,37 @@
enum { kDefaultCacheSize = 128 * 1024 * 1024 };
#endif
+#ifndef SK_IGNORE_TO_STRING
+void SkImageFilter::CropRect::toString(SkString* str) const {
+ if (!fFlags) {
+ return;
+ }
+
+ str->appendf("cropRect (");
+ if (fFlags & CropRect::kHasLeft_CropEdge) {
+ str->appendf("%.2f, ", fRect.fLeft);
+ } else {
+ str->appendf("X, ");
+ }
+ if (fFlags & CropRect::kHasTop_CropEdge) {
+ str->appendf("%.2f, ", fRect.fTop);
+ } else {
+ str->appendf("X, ");
+ }
+ if (fFlags & CropRect::kHasRight_CropEdge) {
+ str->appendf("%.2f, ", fRect.fRight);
+ } else {
+ str->appendf("X, ");
+ }
+ if (fFlags & CropRect::kHasBottom_CropEdge) {
+ str->appendf("%.2f", fRect.fBottom);
+ } else {
+ str->appendf("X");
+ }
+ str->appendf(") ");
+}
+#endif
+
static int32_t next_image_filter_unique_id() {
static int32_t gImageFilterUniqueID;
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698