diff options
author | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-15 00:24:10 +0000 |
---|---|---|
committer | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-15 00:24:10 +0000 |
commit | cd8e55252e2516c70c3c013ee83fb2a17a92d38c (patch) | |
tree | 87a6c308e3d71c55a7f90dcf0b075a06b1f19b03 /ui/gfx/pango_util.h | |
parent | 00060135517852adb6f820be54a50211e63a6a49 (diff) | |
download | chromium_src-cd8e55252e2516c70c3c013ee83fb2a17a92d38c.zip chromium_src-cd8e55252e2516c70c3c013ee83fb2a17a92d38c.tar.gz chromium_src-cd8e55252e2516c70c3c013ee83fb2a17a92d38c.tar.bz2 |
Optimize setting the font when drawing in RenderTextLinux.
Avoid creating a temporary |gfx::Font| just to get its
name and size to pass it to Skia.
Note: There's room for further optimizations here, such
as caching, which I plan to look at in a future CL.
BUG=107394
TEST=Run aura and check that omnibox still looks fine. Run about:tracing and check that time used by this code is significantly decreased.
Review URL: http://codereview.chromium.org/8910004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114541 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/pango_util.h')
-rw-r--r-- | ui/gfx/pango_util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/gfx/pango_util.h b/ui/gfx/pango_util.h index 7cd7720..903e6df 100644 --- a/ui/gfx/pango_util.h +++ b/ui/gfx/pango_util.h @@ -73,6 +73,9 @@ void DrawPangoTextUnderline(cairo_t* cr, double extra_edge_width, const Rect& text_rect); +// Returns the size in pixels for the specified |pango_font|. +size_t GetPangoFontSizeInPixels(PangoFontDescription* pango_font); + } // namespace gfx #endif // UI_GFX_PANGO_UTIL_H_ |