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

Unified Diff: ui/gfx/render_text_harfbuzz.h

Issue 1925033002: RenderText: Don't default-construct gfx::Fonts unnecessarily (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove gfx::Font from RTM completely Created 4 years, 8 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 | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_harfbuzz.h
diff --git a/ui/gfx/render_text_harfbuzz.h b/ui/gfx/render_text_harfbuzz.h
index 38ee2b4f3c31465d04b1e69784d0d5e270af5163..f164dc1d42053139d1963b9c78fc0b4cf5164680 100644
--- a/ui/gfx/render_text_harfbuzz.h
+++ b/ui/gfx/render_text_harfbuzz.h
@@ -32,7 +32,9 @@ class RangeF;
namespace internal {
struct GFX_EXPORT TextRunHarfBuzz {
- TextRunHarfBuzz();
+ // Construct the run with |template_font| since determining the details of a
+ // default-constructed gfx::Font is expensive, but it will always be replaced.
+ explicit TextRunHarfBuzz(const gfx::Font& template_font);
~TextRunHarfBuzz();
// Returns the index of the first glyph that corresponds to the character at
« no previous file with comments | « no previous file | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698