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

Side by Side Diff: ui/gfx/pango_util.h

Issue 8910004: Optimize setting the font when drawing in RenderTextLinux. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/gfx/pango_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_PANGO_UTIL_H_ 5 #ifndef UI_GFX_PANGO_UTIL_H_
6 #define UI_GFX_PANGO_UTIL_H_ 6 #define UI_GFX_PANGO_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <cairo/cairo.h> 9 #include <cairo/cairo.h>
10 #include <pango/pango.h> 10 #include <pango/pango.h>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 int flags); 66 int flags);
67 67
68 // Draw an underline under the text using |cr|, which must already be 68 // Draw an underline under the text using |cr|, which must already be
69 // initialized with the correct source. |extra_edge_width| is added to the 69 // initialized with the correct source. |extra_edge_width| is added to the
70 // outer edge of the line. 70 // outer edge of the line.
71 void DrawPangoTextUnderline(cairo_t* cr, 71 void DrawPangoTextUnderline(cairo_t* cr,
72 gfx::PlatformFontPango* platform_font, 72 gfx::PlatformFontPango* platform_font,
73 double extra_edge_width, 73 double extra_edge_width,
74 const Rect& text_rect); 74 const Rect& text_rect);
75 75
76 // Returns the size in pixels for the specified |pango_font|.
77 size_t GetPangoFontSizeInPixels(PangoFontDescription* pango_font);
78
76 } // namespace gfx 79 } // namespace gfx
77 80
78 #endif // UI_GFX_PANGO_UTIL_H_ 81 #endif // UI_GFX_PANGO_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/pango_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698