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

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

Issue 1942223002: Re-enable complex text path on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 FontCachePurgePreventer purgePreventer; 402 FontCachePurgePreventer purgePreventer;
403 403
404 if (codePath(TextRunPaintInfo(run)) != ComplexPath && !getFontDescription(). getTypesettingFeatures()) 404 if (codePath(TextRunPaintInfo(run)) != ComplexPath && !getFontDescription(). getTypesettingFeatures())
405 return offsetForPositionForSimpleText(run, x, includePartialGlyphs); 405 return offsetForPositionForSimpleText(run, x, includePartialGlyphs);
406 406
407 return offsetForPositionForComplexText(run, x, includePartialGlyphs); 407 return offsetForPositionForComplexText(run, x, includePartialGlyphs);
408 } 408 }
409 409
410 CodePath Font::codePath(const TextRunPaintInfo& runInfo) const 410 CodePath Font::codePath(const TextRunPaintInfo& runInfo) const
411 { 411 {
412 // TODO(eae): Disable the always use complex text feature on Android for now as
413 // it caused a memory regression for webview. crbug.com/577306
414 #if !OS(ANDROID)
415 if (RuntimeEnabledFeatures::alwaysUseComplexTextEnabled() 412 if (RuntimeEnabledFeatures::alwaysUseComplexTextEnabled()
416 || LayoutTestSupport::alwaysUseComplexTextForTest()) { 413 || LayoutTestSupport::alwaysUseComplexTextForTest()) {
417 return ComplexPath; 414 return ComplexPath;
418 } 415 }
419 #endif
420 416
421 const TextRun& run = runInfo.run; 417 const TextRun& run = runInfo.run;
422 418
423 if (getFontDescription().getTypesettingFeatures() && (runInfo.from || runInf o.to != run.length())) 419 if (getFontDescription().getTypesettingFeatures() && (runInfo.from || runInf o.to != run.length()))
424 return ComplexPath; 420 return ComplexPath;
425 421
426 if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings ()->size() > 0) 422 if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings ()->size() > 0)
427 return ComplexPath; 423 return ComplexPath;
428 424
429 if (m_fontDescription.isVerticalBaseline()) 425 if (m_fontDescription.isVerticalBaseline())
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 { 839 {
844 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); 840 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts();
845 } 841 }
846 842
847 bool Font::isFallbackValid() const 843 bool Font::isFallbackValid() const
848 { 844 {
849 return !m_fontFallbackList || m_fontFallbackList->isValid(); 845 return !m_fontFallbackList || m_fontFallbackList->isValid();
850 } 846 }
851 847
852 } // namespace blink 848 } // 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