Index: src/core/SkPaint.cpp |
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp |
index c91ada9a3c1064777ca244f680e53721ed7ee2b6..2449ed6793c241fa55ce5c0dfccc77ec72a34a7a 100644 |
--- a/src/core/SkPaint.cpp |
+++ b/src/core/SkPaint.cpp |
@@ -108,29 +108,18 @@ |
} |
SkPaint::SkPaint(const SkPaint& src) { |
-#define COPY(field) field = src.field |
-#define REF_COPY(field) field = SkSafeRef(src.field) |
- REF_COPY(fTypeface); |
- REF_COPY(fPathEffect); |
- REF_COPY(fShader); |
- REF_COPY(fXfermode); |
- REF_COPY(fMaskFilter); |
- REF_COPY(fColorFilter); |
- REF_COPY(fRasterizer); |
- REF_COPY(fLooper); |
- REF_COPY(fImageFilter); |
- REF_COPY(fAnnotation); |
- |
- COPY(fTextSize); |
- COPY(fTextScaleX); |
- COPY(fTextSkewX); |
- COPY(fColor); |
- COPY(fWidth); |
- COPY(fMiterLimit); |
- COPY(fBitfields); |
- COPY(fDirtyBits); |
-#undef COPY |
-#undef REF_COPY |
+ memcpy(this, &src, sizeof(src)); |
+ |
+ SkSafeRef(fTypeface); |
+ SkSafeRef(fPathEffect); |
+ SkSafeRef(fShader); |
+ SkSafeRef(fXfermode); |
+ SkSafeRef(fMaskFilter); |
+ SkSafeRef(fColorFilter); |
+ SkSafeRef(fRasterizer); |
+ SkSafeRef(fLooper); |
+ SkSafeRef(fImageFilter); |
+ SkSafeRef(fAnnotation); |
#ifdef SK_BUILD_FOR_ANDROID |
new (&fPaintOptionsAndroid) SkPaintOptionsAndroid(src.fPaintOptionsAndroid); |