From 2822c9a92b9a6a1308f2106b7c364ae7e8473ab1 Mon Sep 17 00:00:00 2001 From: "mtklein@google.com" Date: Thu, 15 Aug 2013 21:20:14 +0000 Subject: Nobody defines SK_SUPPORT_HINTING_SCALE_FACTOR any more, so remove it. I left the dummy value in the flattened paint. I'm hoping to do an overhaul of the paint serialization format which will need a picture version bump anyway, so it can all go together. If that doesn't pan out we can remove this on its own later. BUG= R=reed@google.com Review URL: https://codereview.chromium.org/23056005 git-svn-id: http://skia.googlecode.com/svn/trunk@10757 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkPaint.cpp | 33 ++------------------------------- src/core/SkScalerContext.h | 3 --- 2 files changed, 2 insertions(+), 34 deletions(-) (limited to 'src/core') diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp index 372e68051e..df8b292ced 100644 --- a/src/core/SkPaint.cpp +++ b/src/core/SkPaint.cpp @@ -70,9 +70,6 @@ SkPaint::SkPaint() { fTextSize = SkPaintDefaults_TextSize; fTextScaleX = SK_Scalar1; -#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR - fHintingScaleFactor = SK_Scalar1; -#endif fColor = SK_ColorBLACK; fMiterLimit = SkPaintDefaults_MiterLimit; fFlags = SkPaintDefaults_Flags; @@ -389,13 +386,6 @@ void SkPaint::setTextSkewX(SkScalar skewX) { fTextSkewX = skewX; } -#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR -void SkPaint::setHintingScaleFactor(SkScalar hintingScaleFactor) { - GEN_ID_INC_EVAL(hintingScaleFactor != fHintingScaleFactor); - fHintingScaleFactor = hintingScaleFactor; -} -#endif - void SkPaint::setTextEncoding(TextEncoding encoding) { if ((unsigned)encoding <= kGlyphID_TextEncoding) { GEN_ID_INC_EVAL((unsigned)encoding != fTextEncoding); @@ -1594,9 +1584,6 @@ void SkScalerContext::MakeRec(const SkPaint& paint, rec->fTextSize = paint.getTextSize(); rec->fPreScaleX = paint.getTextScaleX(); rec->fPreSkewX = paint.getTextSkewX(); -#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR - rec->fHintingScaleFactor = paint.getHintingScaleFactor(); -#endif if (deviceMatrix) { rec->fPost2x2[0][0] = sk_relax(deviceMatrix->getScaleX()); @@ -2058,12 +2045,8 @@ void SkPaint::flatten(SkFlattenableWriteBuffer& buffer) const { ptr = write_scalar(ptr, this->getTextSize()); ptr = write_scalar(ptr, this->getTextScaleX()); ptr = write_scalar(ptr, this->getTextSkewX()); -#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR - ptr = write_scalar(ptr, this->getHintingScaleFactor()); -#else - // Dummy value. + // Dummy value for obsolete hinting scale factor. TODO: remove with next picture version ptr = write_scalar(ptr, SK_Scalar1); -#endif ptr = write_scalar(ptr, this->getStrokeWidth()); ptr = write_scalar(ptr, this->getStrokeMiter()); *ptr++ = this->getColor(); @@ -2080,12 +2063,8 @@ void SkPaint::flatten(SkFlattenableWriteBuffer& buffer) const { buffer.writeScalar(fTextSize); buffer.writeScalar(fTextScaleX); buffer.writeScalar(fTextSkewX); -#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR - buffer.writeScalar(fHintingScaleFactor); -#else - // Dummy value. + // Dummy value for obsolete hinting scale factor. TODO: remove with next picture version buffer.writeScalar(SK_Scalar1); -#endif buffer.writeScalar(fWidth); buffer.writeScalar(fMiterLimit); buffer.writeColor(fColor); @@ -2131,12 +2110,8 @@ void SkPaint::unflatten(SkFlattenableReadBuffer& buffer) { this->setTextSize(read_scalar(pod)); this->setTextScaleX(read_scalar(pod)); this->setTextSkewX(read_scalar(pod)); -#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR - this->setHintingScaleFactor(read_scalar(pod)); -#else // Skip the hinting scalar factor, which is not supported. read_scalar(pod); -#endif this->setStrokeWidth(read_scalar(pod)); this->setStrokeMiter(read_scalar(pod)); this->setColor(*pod++); @@ -2163,12 +2138,8 @@ void SkPaint::unflatten(SkFlattenableReadBuffer& buffer) { this->setTextSize(buffer.readScalar()); this->setTextScaleX(buffer.readScalar()); this->setTextSkewX(buffer.readScalar()); -#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR - this->setHintingScaleFactor(buffer.readScalar()); -#else // Skip the hinting scalar factor, which is not supported. buffer.readScalar(); -#endif this->setStrokeWidth(buffer.readScalar()); this->setStrokeMiter(buffer.readScalar()); this->setColor(buffer.readColor()); diff --git a/src/core/SkScalerContext.h b/src/core/SkScalerContext.h index 52707a387c..2820b5ac2d 100644 --- a/src/core/SkScalerContext.h +++ b/src/core/SkScalerContext.h @@ -34,9 +34,6 @@ struct SkScalerContextRec { SkScalar fTextSize, fPreScaleX, fPreSkewX; SkScalar fPost2x2[2][2]; SkScalar fFrameWidth, fMiterLimit; -#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR - SkScalar fHintingScaleFactor; -#endif //These describe the parameters to create (uniquely identify) the pre-blend. uint32_t fLumBits; -- cgit v1.2.3