| Index: src/core/SkPaint.cpp
|
| diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
|
| index bc8df2716b5ababef83402d2aefd04c3dd142641..2449ed6793c241fa55ce5c0dfccc77ec72a34a7a 100644
|
| --- a/src/core/SkPaint.cpp
|
| +++ b/src/core/SkPaint.cpp
|
| @@ -108,35 +108,22 @@
|
| }
|
|
|
| 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);
|
| + 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);
|
| - COPY(fGenerationID);
|
| -#endif
|
| -
|
| -#undef COPY
|
| -#undef REF_COPY
|
| +#endif
|
| }
|
|
|
| SkPaint::~SkPaint() {
|
|
|