aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-21 01:40:07 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-21 01:40:07 +0000
commit9206da6c9e7cf7ec6502c52143f57c3998dcf0f6 (patch)
treee911a39f674bf3824a45edd7a4d80944e7ed4d7b /src/core
parentf48182b1614be99117b65118eefd3cd66e2d1f9a (diff)
Revert of SkPaint: eliminate some dead bytes in 64-bit build. (https://codereview.chromium.org/203203003/)
Reason for revert: Huh, some Android tests are still failing despite the fix. IntelRhB, Xoom... that's weird. Original issue's description: > SkPaint: eliminate some dead bytes in 64-bit build. > > + memcpy-based copy constructor was hiding this gap -> manual copy constructor. > + Split tests for finer-grained failures. > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=13856 > > Committed: http://code.google.com/p/skia/source/detail?r=13887 R=reed@google.com, mtklein@chromium.org TBR=mtklein@chromium.org, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: mtklein@google.com Review URL: https://codereview.chromium.org/206623005 git-svn-id: http://skia.googlecode.com/svn/trunk@13888 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkPaint.cpp37
1 files changed, 12 insertions, 25 deletions
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index bc8df2716b..2449ed6793 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -108,35 +108,22 @@ SkPaint::SkPaint() {
}
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
}
SkPaint::~SkPaint() {