Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: src/core/SkPaint.cpp

Issue 206623005: Revert of SkPaint: eliminate some dead bytes in 64-bit build. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPaint.h ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « include/core/SkPaint.h ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698