revert 5508 -- it broke most of the builds
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 12 Sep 2012 18:34:49 +0000 (18:34 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 12 Sep 2012 18:34:49 +0000 (18:34 +0000)
Use http://skia.googlecode.com/svn/buildbot/buildbots.html to see the state of the build.

git-svn-id: http://skia.googlecode.com/svn/trunk@5511 2bbb7eff-a529-9590-31e7-b0007b416f81

gyp/common_conditions.gypi
include/core/SkPaint.h
src/core/SkPaint.cpp
src/core/SkScalerContext.h
src/ports/SkFontHost_FreeType.cpp

index 2a03c006075a9621cb03fe74d6e6330b3aeff23d..1256ef6760ab66f0c2b47dc85d94c75b6cb5d31c 100644 (file)
@@ -3,7 +3,6 @@
 {
   'defines': [
     'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=<(skia_static_initializers)',
-    'SK_SUPPORT_HINTING_SCALE_FACTOR',
   ],
   'conditions' : [
     ['skia_gpu == 1',
index 16b1b84c900ecac4dc6e7fef508a377e26c31bd9..50fcdd825e562f1e36fedf4a34a6e3026446f7e1 100644 (file)
@@ -668,20 +668,6 @@ public:
     */
     void setTextSkewX(SkScalar skewX);
 
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-    /** Return the paint's scale factor used for correctly rendering
-        glyphs in high DPI mode without text subpixel positioning.
-        @return the scale factor used for rendering glyphs in high DPI mode.
-    */
-    SkScalar getHintingScaleFactor() const { return fHintingScaleFactor; }
-
-    /** Set the paint's scale factor used for correctly rendering
-        glyphs in high DPI mode without text subpixel positioning.
-        @param the scale factor used for rendering glyphs in high DPI mode.
-    */
-    void setHintingScaleFactor(SkScalar hintingScaleFactor);
-#endif
-
     /** Describes how to interpret the text parameters that are passed to paint
         methods like measureText() and getTextWidths().
     */
@@ -924,9 +910,6 @@ private:
     SkScalar        fTextSize;
     SkScalar        fTextScaleX;
     SkScalar        fTextSkewX;
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-    SkScalar        fHintingScaleFactor;
-#endif
 
     SkPathEffect*   fPathEffect;
     SkShader*       fShader;
index 506db0e9c3d55aa1535da269494d78672c18a19e..7e0ea97cdc8edb5fc3b164548ae5a398f29d65fe 100644 (file)
@@ -64,9 +64,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;
@@ -346,13 +343,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);
@@ -1510,9 +1500,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());
@@ -1961,18 +1948,10 @@ enum FlatFlags {
 };
 
 // The size of a flat paint's POD fields
-
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-static const uint32_t kPODPaintSize =   6 * sizeof(SkScalar) +
-                                        1 * sizeof(SkColor) +
-                                        1 * sizeof(uint16_t) +
-                                        6 * sizeof(uint8_t);
-#else
 static const uint32_t kPODPaintSize =   5 * sizeof(SkScalar) +
                                         1 * sizeof(SkColor) +
                                         1 * sizeof(uint16_t) +
                                         6 * sizeof(uint8_t);
-#endif
 
 /*  To save space/time, we analyze the paint, and write a truncated version of
     it if there are not tricky elements like shaders, etc.
@@ -2002,9 +1981,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());
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-        ptr = write_scalar(ptr, this->getHintingScaleFactor());
-#endif
         ptr = write_scalar(ptr, this->getStrokeWidth());
         ptr = write_scalar(ptr, this->getStrokeMiter());
         *ptr++ = this->getColor();
@@ -2021,9 +1997,6 @@ void SkPaint::flatten(SkFlattenableWriteBuffer& buffer) const {
         buffer.writeScalar(fTextSize);
         buffer.writeScalar(fTextScaleX);
         buffer.writeScalar(fTextSkewX);
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-        buffer.writeScalar(fHintingScaleFactor);
-#endif
         buffer.writeScalar(fWidth);
         buffer.writeScalar(fMiterLimit);
         buffer.writeColor(fColor);
@@ -2069,9 +2042,6 @@ 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));
-#endif
         this->setStrokeWidth(read_scalar(pod));
         this->setStrokeMiter(read_scalar(pod));
         this->setColor(*pod++);
@@ -2098,9 +2068,6 @@ 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());
-#endif
         this->setStrokeWidth(buffer.readScalar());
         this->setStrokeMiter(buffer.readScalar());
         this->setColor(buffer.readColor());
index 817558252298dbcb732b809a2fe00ca1729f3aa7..2443aafe6e956cdc2c58d96d519a7a3f33ea207d 100644 (file)
@@ -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;
index ba0afd88a69d4599220fb03b4781edc6f651de5e..f25223f750af2cc5944bd685e27b9ccbb9dcd1c4 100644 (file)
@@ -752,20 +752,8 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(const SkDescriptor* desc)
         fMatrix22.xy = fMatrix22.yx = 0;
     }
 
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-    SkScalar hintingScaleFactor = fRec.fHintingScaleFactor;
-
-    fScaleX = SkScalarToFixed(sx / hintingScaleFactor);
-    fScaleY = SkScalarToFixed(sy / hintingScaleFactor);
-
-    fMatrix22.xx *= hintingScaleFactor;
-    fMatrix22.xy *= hintingScaleFactor;
-    fMatrix22.yx *= hintingScaleFactor;
-    fMatrix22.yy *= hintingScaleFactor;
-#else
     fScaleX = SkScalarToFixed(sx);
     fScaleY = SkScalarToFixed(sy);
-#endif
 
     fLCDIsVert = SkToBool(fRec.fFlags & SkScalerContext::kLCD_Vertical_Flag);