aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkBitmap.h2
-rw-r--r--include/core/SkColorFilter.h2
-rw-r--r--include/core/SkColorShader.h2
-rw-r--r--include/core/SkComposeShader.h2
-rw-r--r--include/core/SkDrawLooper.h2
-rw-r--r--include/core/SkEmptyShader.h2
-rw-r--r--include/core/SkMaskFilter.h2
-rw-r--r--include/core/SkMatrix.h2
-rw-r--r--include/core/SkPaint.h2
-rw-r--r--include/core/SkShader.h3
-rw-r--r--include/core/SkTypes.h18
-rw-r--r--include/core/SkXfermode.h4
12 files changed, 26 insertions, 17 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index d0f7a8ea60..b69234baa1 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -747,7 +747,7 @@ public:
int fHeight;
};
- SkDEVCODE(void toString(SkString* str) const;)
+ SK_TO_STRING_NONVIRT()
private:
struct MipMap;
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index a5ffca818d..c26bc075c9 100644
--- a/include/core/SkColorFilter.h
+++ b/include/core/SkColorFilter.h
@@ -128,7 +128,7 @@ public:
*/
virtual GrEffectRef* asNewEffect(GrContext*) const;
- SkDEVCODE(virtual void toString(SkString* str) const = 0;)
+ SK_TO_STRING_PUREVIRT()
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
SK_DEFINE_FLATTENABLE_TYPE(SkColorFilter)
diff --git a/include/core/SkColorShader.h b/include/core/SkColorShader.h
index 5b8a86dfc1..975156c0eb 100644
--- a/include/core/SkColorShader.h
+++ b/include/core/SkColorShader.h
@@ -48,7 +48,7 @@ public:
virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
- SK_DEVELOPER_TO_STRING()
+ SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader)
protected:
diff --git a/include/core/SkComposeShader.h b/include/core/SkComposeShader.h
index 1fefd1369a..e29578cabc 100644
--- a/include/core/SkComposeShader.h
+++ b/include/core/SkComposeShader.h
@@ -39,7 +39,7 @@ public:
virtual void endContext() SK_OVERRIDE;
virtual void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE;
- SK_DEVELOPER_TO_STRING()
+ SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeShader)
protected:
diff --git a/include/core/SkDrawLooper.h b/include/core/SkDrawLooper.h
index 65650d88e8..3c45a6a5b6 100644
--- a/include/core/SkDrawLooper.h
+++ b/include/core/SkDrawLooper.h
@@ -88,7 +88,7 @@ public:
virtual void computeFastBounds(const SkPaint& paint,
const SkRect& src, SkRect* dst) const;
- SkDEVCODE(virtual void toString(SkString* str) const = 0;)
+ SK_TO_STRING_PUREVIRT()
SK_DEFINE_FLATTENABLE_TYPE(SkDrawLooper)
protected:
diff --git a/include/core/SkEmptyShader.h b/include/core/SkEmptyShader.h
index 3f7dae41a9..d2ebb61221 100644
--- a/include/core/SkEmptyShader.h
+++ b/include/core/SkEmptyShader.h
@@ -30,7 +30,7 @@ public:
virtual void shadeSpan16(int x, int y, uint16_t span[], int count) SK_OVERRIDE;
virtual void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) SK_OVERRIDE;
- SK_DEVELOPER_TO_STRING()
+ SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmptyShader)
protected:
diff --git a/include/core/SkMaskFilter.h b/include/core/SkMaskFilter.h
index ac9b7189b2..3113c93442 100644
--- a/include/core/SkMaskFilter.h
+++ b/include/core/SkMaskFilter.h
@@ -138,7 +138,7 @@ public:
*/
virtual void computeFastBounds(const SkRect& src, SkRect* dest) const;
- SkDEVCODE(virtual void toString(SkString* str) const = 0;)
+ SK_TO_STRING_PUREVIRT()
SK_DEFINE_FLATTENABLE_TYPE(SkMaskFilter)
protected:
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index 9bbbc1745b..d7c163d439 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -560,7 +560,7 @@ public:
size_t readFromMemory(const void* buffer, size_t length);
SkDEVCODE(void dump() const;)
- SkDEVCODE(void toString(SkString*) const;)
+ SK_TO_STRING_NONVIRT()
/**
* Calculates the minimum stretching factor of the matrix. If the matrix has
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 2b30a7cda5..d1853c613c 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -1032,7 +1032,7 @@ public:
return SetTextMatrix(matrix, fTextSize, fTextScaleX, fTextSkewX);
}
- SkDEVCODE(void toString(SkString*) const;)
+ SK_TO_STRING_NONVIRT()
struct FlatteningTraits {
static void Flatten(SkWriteBuffer& buffer, const SkPaint& paint);
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index d0fac49f7e..acff959949 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -345,8 +345,7 @@ public:
static SkShader* CreateBitmapShader(const SkBitmap& src,
TileMode tmx, TileMode tmy);
- SkDEVCODE(virtual void toString(SkString* str) const;)
-
+ SK_TO_STRING_VIRT()
SK_DEFINE_FLATTENABLE_TYPE(SkShader)
protected:
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>
diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h
index 86c08dd6b7..e2977255dd 100644
--- a/include/core/SkXfermode.h
+++ b/include/core/SkXfermode.h
@@ -211,7 +211,7 @@ public:
Coeff* dst,
GrTexture* background = NULL);
- SkDEVCODE(virtual void toString(SkString* str) const = 0;)
+ SK_TO_STRING_PUREVIRT()
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
SK_DEFINE_FLATTENABLE_TYPE(SkXfermode)
@@ -265,7 +265,7 @@ public:
virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count,
const SkAlpha aa[]) const SK_OVERRIDE;
- SK_DEVELOPER_TO_STRING()
+ SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcXfermode)
protected: