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

Unified Diff: ui/gfx/render_text.cc

Issue 634983002: chromeos: Enable RenderTextHarfBuzz. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.cc
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index bf98bc0cde55524f3fba35a8657a9f3bf99e8600..3b6cf09043bdc1e4e50547776b0a55cd676f9000 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -396,13 +396,22 @@ RenderText* RenderText::CreateInstance() {
#if defined(OS_MACOSX) && defined(TOOLKIT_VIEWS)
// Use the more complete HarfBuzz implementation for Views controls on Mac.
return new RenderTextHarfBuzz;
+#endif
+
+#if defined(OS_LINUX)
msw 2014/10/07 18:29:01 nit: elif?
Daniel Erat 2014/10/08 02:03:43 sure, done
+ // RenderTextPango has severe performance issues (http://crbug.com/376077), so
+ // default to RenderTextHarfBuzz on Linux (and Chrome OS).
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableHarfBuzzRenderText)) {
+ return new RenderTextHarfBuzz;
+ }
#else
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableHarfBuzzRenderText)) {
return new RenderTextHarfBuzz;
}
- return CreateNativeInstance();
#endif
+ return CreateNativeInstance();
msw 2014/10/07 18:29:01 nit q: will this trigger unreachable code warnings
Daniel Erat 2014/10/08 02:03:43 good point. i think that nested ifdefs are pretty
}
void RenderText::SetText(const base::string16& text) {
« 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