Index: ui/gfx/render_text.cc |
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc |
index 1ca874a0e461f2014c5568c4fcfeb0802bba7fcc..87e650b8cf3107637f407cad49850905f17fac68 100644 |
--- a/ui/gfx/render_text.cc |
+++ b/ui/gfx/render_text.cc |
@@ -398,9 +398,14 @@ RenderText::~RenderText() { |
} |
RenderText* RenderText::CreateInstance() { |
- return CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kDisableHarfBuzzRenderText) ? CreateNativeInstance() : |
- new RenderTextHarfBuzz; |
+#if defined(OS_MACOSX) && !defined(TOOLKIT_VIEWS) |
+ static const bool use_harfbuzz = CommandLine::ForCurrentProcess()-> |
+ HasSwitch(switches::kEnableHarfBuzzRenderText); |
+#else |
+ static const bool use_harfbuzz = !CommandLine::ForCurrentProcess()-> |
+ HasSwitch(switches::kDisableHarfBuzzRenderText); |
+#endif |
+ return use_harfbuzz ? new RenderTextHarfBuzz : CreateNativeInstance(); |
} |
void RenderText::SetText(const base::string16& text) { |