aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2015-01-21 11:55:16 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-21 11:55:16 -0800
commitec7e12f3cf240a85a2409205e135c24256233733 (patch)
tree203fd7071960930661c48cfa1164ae3c9e06d058 /src
parent17e7314e0e3085ec6021997d7c0593c339ba6a2e (diff)
Lcd request early check in SkFontHost_FreeType::onFilterRec.
If the user didn't request lcd, don't spend any time checking if the FT_Library supports it. Review URL: https://codereview.chromium.org/864903002
Diffstat (limited to 'src')
-rw-r--r--src/ports/SkFontHost_FreeType.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 167c38b667..ce762d8221 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -697,11 +697,11 @@ void SkTypeface_FreeType::onFilterRec(SkScalerContextRec* rec) const {
rec->fTextSize = SkIntToScalar(1 << 14);
}
- {
+ if (isLCD(*rec)) {
// TODO: re-work so that FreeType is set-up and selected by the SkFontMgr.
SkAutoMutexAcquire ama(gFTMutex);
ref_ft_library();
- if (!gFTLibrary->isLCDSupported() && isLCD(*rec)) {
+ if (!gFTLibrary->isLCDSupported()) {
// If the runtime Freetype library doesn't support LCD, disable it here.
rec->fMaskFormat = SkMask::kA8_Format;
}