aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkTypes.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-13 18:02:17 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-13 18:02:17 +0000
commit0f10f7bf1fb43ca6346dc220a076773b1f19a367 (patch)
treeda2fe0c954024daea95aefea2b7f05709c0e76f5 /include/core/SkTypes.h
parentfa5edbe5750632b4590ed951c594dd2766ccc4cf (diff)
Allow toString capability to be toggled independent of developer mode.
This change is motivated by the desire to see the text information in the debugger when not in developer mode. It is structured so user's can disable it if the capability is not wanted. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/197763008 git-svn-id: http://skia.googlecode.com/svn/trunk@13795 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkTypes.h')
-rw-r--r--include/core/SkTypes.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index b0a4731fd4..31c81a1aa3 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -115,12 +115,22 @@ inline void operator delete(void* p) {
#ifdef SK_DEVELOPER
#define SkDEVCODE(code) code
- // the 'toString' helper functions convert Sk* objects to human-readable
- // form in developer mode
- #define SK_DEVELOPER_TO_STRING() virtual void toString(SkString* str) const SK_OVERRIDE;
#else
#define SkDEVCODE(code)
- #define SK_DEVELOPER_TO_STRING()
+#endif
+
+#ifdef SK_IGNORE_TO_STRING
+ #define SK_TO_STRING_NONVIRT()
+ #define SK_TO_STRING_VIRT()
+ #define SK_TO_STRING_PUREVIRT()
+ #define SK_TO_STRING_OVERRIDE()
+#else
+ // the 'toString' helper functions convert Sk* objects to human-readable
+ // form in developer mode
+ #define SK_TO_STRING_NONVIRT() void toString(SkString* str) const;
+ #define SK_TO_STRING_VIRT() virtual void toString(SkString* str) const;
+ #define SK_TO_STRING_PUREVIRT() virtual void toString(SkString* str) const = 0;
+ #define SK_TO_STRING_OVERRIDE() virtual void toString(SkString* str) const SK_OVERRIDE;
#endif
template <bool>