aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-26 12:46:52 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-26 12:46:52 +0000
commit7f78611271a121ffc1cd08be92018857b615204c (patch)
tree4f1844748e190f078e38d6cf9b12a8d1c3c9e312
parentec18ce7df6c8bed4d82a107edf6f28f554631f3e (diff)
Clean up 4 old bytes per paint.
BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/27370003 git-svn-id: http://skia.googlecode.com/svn/trunk@12390 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/core/SkPaint.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index d6948dd83f..91a76e151f 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -2005,11 +2005,7 @@ enum FlatFlags {
};
// The size of a flat paint's POD fields
-// Include an SkScalar for hinting scale factor whether it is
-// supported or not so that an SKP is valid whether it was
-// created with support or not.
-
-static const uint32_t kPODPaintSize = 6 * sizeof(SkScalar) +
+static const uint32_t kPODPaintSize = 5 * sizeof(SkScalar) +
1 * sizeof(SkColor) +
1 * sizeof(uint16_t) +
6 * sizeof(uint8_t);
@@ -2046,8 +2042,6 @@ void SkPaint::flatten(SkFlattenableWriteBuffer& buffer) const {
ptr = write_scalar(ptr, this->getTextSize());
ptr = write_scalar(ptr, this->getTextScaleX());
ptr = write_scalar(ptr, this->getTextSkewX());
- // Dummy value for obsolete hinting scale factor. TODO: remove with next picture version
- ptr = write_scalar(ptr, SK_Scalar1);
ptr = write_scalar(ptr, this->getStrokeWidth());
ptr = write_scalar(ptr, this->getStrokeMiter());
*ptr++ = this->getColor();
@@ -2064,8 +2058,6 @@ void SkPaint::flatten(SkFlattenableWriteBuffer& buffer) const {
buffer.writeScalar(fTextSize);
buffer.writeScalar(fTextScaleX);
buffer.writeScalar(fTextSkewX);
- // Dummy value for obsolete hinting scale factor. TODO: remove with next picture version
- buffer.writeScalar(SK_Scalar1);
buffer.writeScalar(fWidth);
buffer.writeScalar(fMiterLimit);
buffer.writeColor(fColor);
@@ -2120,8 +2112,6 @@ void SkPaint::unflatten(SkFlattenableReadBuffer& buffer) {
this->setTextSize(read_scalar(pod));
this->setTextScaleX(read_scalar(pod));
this->setTextSkewX(read_scalar(pod));
- // Skip the hinting scalar factor, which is not supported.
- read_scalar(pod);
this->setStrokeWidth(read_scalar(pod));
this->setStrokeMiter(read_scalar(pod));
this->setColor(*pod++);