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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/Font.cpp

Issue 2120143002: Activate Complex text on Android after memory improvements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 FontCachePurgePreventer purgePreventer; 407 FontCachePurgePreventer purgePreventer;
408 408
409 if (codePath(TextRunPaintInfo(run)) != ComplexPath && !getFontDescription(). getTypesettingFeatures()) 409 if (codePath(TextRunPaintInfo(run)) != ComplexPath && !getFontDescription(). getTypesettingFeatures())
410 return offsetForPositionForSimpleText(run, x, includePartialGlyphs); 410 return offsetForPositionForSimpleText(run, x, includePartialGlyphs);
411 411
412 return offsetForPositionForComplexText(run, x, includePartialGlyphs); 412 return offsetForPositionForComplexText(run, x, includePartialGlyphs);
413 } 413 }
414 414
415 CodePath Font::codePath(const TextRunPaintInfo& runInfo) const 415 CodePath Font::codePath(const TextRunPaintInfo& runInfo) const
416 { 416 {
417 // TODO(eae): Disable the always use complex text feature on Android for now as
418 // it caused a memory regression for webview. crbug.com/577306
419 #if !OS(ANDROID)
420 if (RuntimeEnabledFeatures::alwaysUseComplexTextEnabled() 417 if (RuntimeEnabledFeatures::alwaysUseComplexTextEnabled()
421 || LayoutTestSupport::alwaysUseComplexTextForTest()) { 418 || LayoutTestSupport::alwaysUseComplexTextForTest()) {
422 return ComplexPath; 419 return ComplexPath;
423 } 420 }
424 #endif
425 421
426 const TextRun& run = runInfo.run; 422 const TextRun& run = runInfo.run;
427 423
428 if (getFontDescription().getTypesettingFeatures()) 424 if (getFontDescription().getTypesettingFeatures())
429 return ComplexPath; 425 return ComplexPath;
430 426
431 if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings ()->size() > 0) 427 if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings ()->size() > 0)
432 return ComplexPath; 428 return ComplexPath;
433 429
434 if (m_fontDescription.isVerticalBaseline()) 430 if (m_fontDescription.isVerticalBaseline())
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 { 854 {
859 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); 855 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts();
860 } 856 }
861 857
862 bool Font::isFallbackValid() const 858 bool Font::isFallbackValid() const
863 { 859 {
864 return !m_fontFallbackList || m_fontFallbackList->isValid(); 860 return !m_fontFallbackList || m_fontFallbackList->isValid();
865 } 861 }
866 862
867 } // namespace blink 863 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698