Chromium Code Reviews

Unified Diff: ui/gfx/render_text.h

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.
Jump to:
View side-by-side diff with in-line comments
Index: ui/gfx/render_text.h
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index 415132ff0b22e5a63672a8b9ee1f70b025a2d23b..331814e38438378e1217e663cd66fc78b6e0b782 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -193,6 +193,9 @@ class GFX_EXPORT RenderText {
static RenderText* CreateInstance();
static RenderText* CreateInstanceForEditing();
+ // Returns true if the current RenderText subclass supports multilines.
+ static bool MultilineSupported();
+
// Creates another instance of the same concrete class.
virtual scoped_ptr<RenderText> CreateInstanceOfSameType() const = 0;
@@ -418,7 +421,7 @@ class GFX_EXPORT RenderText {
// Sets shadows to drawn with text.
void set_shadows(const ShadowValues& shadows) { shadows_ = shadows; }
- const ShadowValues& shadows() { return shadows_; }
+ const ShadowValues& shadows() const { return shadows_; }
typedef std::pair<Font, Range> FontSpan;
// For testing purposes, returns which fonts were chosen for which parts of

Powered by Google App Engine