aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2014-06-04 15:19:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-04 15:19:47 -0700
commitdf1640d413c16abf4527960642aca41581808699 (patch)
tree207adcc9e62d6b0982bb790c660612f4183e3c5e
parent77f68b623eeb9a50de3603388f0773a45a2604cf (diff)
Remove SK_IGNORE_DWRITE_BITMAP_FIX.
This define has been removed from Blink and is no longer used anywhere. R=reed@google.com TBR=reed1 Author: bungeman@google.com Review URL: https://codereview.chromium.org/319513006
-rw-r--r--src/ports/SkFontHost_win_dw.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/ports/SkFontHost_win_dw.cpp b/src/ports/SkFontHost_win_dw.cpp
index 16350c7397..ea41d86209 100644
--- a/src/ports/SkFontHost_win_dw.cpp
+++ b/src/ports/SkFontHost_win_dw.cpp
@@ -741,24 +741,11 @@ SkScalerContext_DW::SkScalerContext_DW(DWriteFontTypeface* typeface,
// If the scale is negative, this means the matrix will do the flip anyway.
SkScalar realTextSize = SkScalarAbs(GA.get(SkMatrix::kMScaleY));
// Due to floating point math, the lower bits are suspect. Round carefully.
-#ifdef SK_IGNORE_DWRITE_BITMAP_FIX
- SkScalar roundedTextSize = SkScalarRoundToScalar(realTextSize * 64.0f) / 64.0f;
- SkScalar gdiTextSize = SkScalarFloorToScalar(roundedTextSize);
-#else
SkScalar gdiTextSize = SkScalarRoundToScalar(realTextSize * 64.0f) / 64.0f;
-#endif
if (gdiTextSize == 0) {
gdiTextSize = SK_Scalar1;
}
-#ifdef SK_IGNORE_DWRITE_BITMAP_FIX
- bool hasBitmap = fRec.fFlags & SkScalerContext::kEmbeddedBitmapText_Flag &&
- hasBitmapStrike(typeface, SkScalarTruncToInt(gdiTextSize));
- bool axisAligned = isAxisAligned(fRec);
- bool isBiLevel = SkMask::kBW_Format == fRec.fMaskFormat || (hasBitmap && axisAligned);
-
- if (isBiLevel) {
-#else
bool bitmapRequested = SkToBool(fRec.fFlags & SkScalerContext::kEmbeddedBitmapText_Flag);
bool hasBitmap = false;
bool axisAlignedBitmap = false;
@@ -769,13 +756,12 @@ SkScalerContext_DW::SkScalerContext_DW(DWriteFontTypeface* typeface,
// If the user requested aliased, do so with aliased compatible metrics.
if (SkMask::kBW_Format == fRec.fMaskFormat) {
-#endif
fTextSizeRender = gdiTextSize;
fRenderingMode = DWRITE_RENDERING_MODE_ALIASED;
fTextureType = DWRITE_TEXTURE_ALIASED_1x1;
fTextSizeMeasure = gdiTextSize;
fMeasuringMode = DWRITE_MEASURING_MODE_GDI_CLASSIC;
-#ifndef SK_IGNORE_DWRITE_BITMAP_FIX
+
// If we can use a bitmap, use gdi classic rendering and measurement.
// This will not always provide a bitmap, but matches expected behavior.
} else if (hasBitmap && axisAlignedBitmap) {
@@ -784,7 +770,7 @@ SkScalerContext_DW::SkScalerContext_DW(DWriteFontTypeface* typeface,
fTextureType = DWRITE_TEXTURE_CLEARTYPE_3x1;
fTextSizeMeasure = gdiTextSize;
fMeasuringMode = DWRITE_MEASURING_MODE_GDI_CLASSIC;
-#endif
+
// If rotated but the horizontal text could have used a bitmap,
// render high quality rotated glyphs but measure using bitmap metrics.
} else if (hasBitmap) {