diff options
author | Ben Wagner <bungeman@google.com> | 2017-11-01 11:47:39 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-01 17:51:20 +0000 |
commit | 3e45a2f48ed8dbf3a55e980c43d97d29afeb93a0 (patch) | |
tree | 88a3c6ad3bc329d8255cb8f0415bf746026a123a /src/ports/SkFontHost_win.cpp | |
parent | 89ab2406f7845b8e62fb8dd479e5fff5bf5ccf10 (diff) |
Directly use SkScalerContextRec.
Some time ago SkScalerContext::Rec was made SkScalerContextRec so that
it could be forward declared. However, SkScalerContext::Rec remains as a
typedef to SkScalerContextRec. This removes the typedef and updates the
users to use the SkScalerContextRec type directly.
This change was prompted by my own confusion when looking at some code
which mixed these two, by IntelliSense's confusion when declaring an
argument with one and defining with the other, and reducing the general
proliferation of nested 'Rec' types in Skia.
Change-Id: I3a23a4bdd83a591807c78cea6aa7a0117544b614
Reviewed-on: https://skia-review.googlesource.com/66153
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/ports/SkFontHost_win.cpp')
-rw-r--r-- | src/ports/SkFontHost_win.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index 231841423a..3cf42fd39e 100644 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -59,7 +59,7 @@ typedef uint32_t SkGdiRGB; // for rotated text, regardless of GDI's notions. //#define SK_ENFORCE_ROTATED_TEXT_AA_ON_WINDOWS -static bool isLCD(const SkScalerContext::Rec& rec) { +static bool isLCD(const SkScalerContextRec& rec) { return SkMask::kLCD16_Format == rec.fMaskFormat; } @@ -68,13 +68,13 @@ static bool bothZero(SkScalar a, SkScalar b) { } // returns false if there is any non-90-rotation or skew -static bool isAxisAligned(const SkScalerContext::Rec& rec) { +static bool isAxisAligned(const SkScalerContextRec& rec) { return 0 == rec.fPreSkewX && (bothZero(rec.fPost2x2[0][1], rec.fPost2x2[1][0]) || bothZero(rec.fPost2x2[0][0], rec.fPost2x2[1][1])); } -static bool needToRenderWithSkia(const SkScalerContext::Rec& rec) { +static bool needToRenderWithSkia(const SkScalerContextRec& rec) { #ifdef SK_ENFORCE_ROTATED_TEXT_AA_ON_WINDOWS // What we really want to catch is when GDI will ignore the AA request and give // us BW instead. Smallish rotated text is one heuristic, so this code is just @@ -592,7 +592,7 @@ static inline float FIXED2float(FIXED x) { return SkFixedToFloat(SkFIXEDToFixed(x)); } -static BYTE compute_quality(const SkScalerContext::Rec& rec) { +static BYTE compute_quality(const SkScalerContextRec& rec) { switch (rec.fMaskFormat) { case SkMask::kBW_Format: return NONANTIALIASED_QUALITY; |