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

Unified Diff: ui/gfx/render_text.cc

Issue 867003002: Cache gfx::RenderText instances in views::Label. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: do not overuse the memory Created 5 years, 10 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
Index: ui/gfx/render_text.cc
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 9ef575018ff9934f077759c35d2edf43e8759211..725accd01e61fada55d8e479d79272a106c5e89b 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -402,6 +402,7 @@ void ApplyRenderParams(const FontRenderParams& params,
RenderText::~RenderText() {
}
+// static
RenderText* RenderText::CreateInstance() {
#if defined(OS_MACOSX)
static const bool use_native =
@@ -413,10 +414,18 @@ RenderText* RenderText::CreateInstance() {
return new RenderTextHarfBuzz;
}
+// static
RenderText* RenderText::CreateInstanceForEditing() {
return new RenderTextHarfBuzz;
}
+// static
+bool RenderText::MultilineSupported() {
+ // TODO(mukai): turn on for HarfBuzz when https://crrev.com/882643005/ is
msw 2015/02/05 20:16:41 Shouldn't this be non-static for RTHB=>true and RT
Jun Mukai 2015/02/12 21:43:04 Done.
+ // ready.
+ return false;
+}
+
void RenderText::SetText(const base::string16& text) {
DCHECK(!composition_range_.IsValid());
if (text_ == text)

Powered by Google App Engine
This is Rietveld 408576698