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

Unified Diff: include/core/SkRect.h

Issue 311263015: Add dump() to SkClipStack to help with debugging. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add \n. Created 6 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/SkRRect.h ('k') | include/core/SkRegion.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkRect.h
diff --git a/include/core/SkRect.h b/include/core/SkRect.h
index 2c155c477ab46bdc1479f40e215730c61f8e0625..77051c2d8b0117b9f95c5904073c8018ed8162fe 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -833,6 +833,17 @@ struct SK_API SkRect {
* cast-safe way to treat the rect as an array of (4) SkScalars.
*/
const SkScalar* asScalars() const { return &fLeft; }
+
+#ifdef SK_DEVELOPER
+ /**
+ * Dumps the rect using SkDebugf. This is intended for Skia development debugging. Don't
+ * rely on the existence of this function or the formatting of its output.
+ */
+ void dump() const {
+ SkDebugf("{ l: %f, t: %f, r: %f, b: %f }", fLeft, fTop, fRight, fBottom);
+ }
+#endif
+
};
#endif
« no previous file with comments | « include/core/SkRRect.h ('k') | include/core/SkRegion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698