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

Unified Diff: src/core/SkPaint.cpp

Issue 23056005: Nobody defines SK_SUPPORT_HINTING_SCALE_FACTOR any more, so remove it. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: undo Created 7 years, 4 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') | src/core/SkScalerContext.h » ('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 372e68051e76b90b62c0d9c1598cfd30d7ee882c..df8b292cedf2e5c69549e359a473397334c543af 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());
« no previous file with comments | « include/core/SkPaint.h ('k') | src/core/SkScalerContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698