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

Unified Diff: ui/gfx/pango_util.h

Issue 374833005: Simplify PangoLayout configuration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unneeded PangoContext forward declaration Created 6 years, 5 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/pango_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/pango_util.h
diff --git a/ui/gfx/pango_util.h b/ui/gfx/pango_util.h
index db60c2e6d5890dabff939838800d11309a0fd8f0..fef9e2c71a8f4b25d896f317174b729c99b320c1 100644
--- a/ui/gfx/pango_util.h
+++ b/ui/gfx/pango_util.h
@@ -7,7 +7,6 @@
#include <cairo/cairo.h>
#include <pango/pango.h>
-#include <string>
#include "base/i18n/rtl.h"
#include "base/logging.h"
@@ -15,20 +14,9 @@
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/gfx_export.h"
-typedef struct _PangoContext PangoContext;
-
namespace gfx {
-class Font;
-class PlatformFontPango;
-class Rect;
-
-// Creates and returns a PangoContext. The caller owns the context.
-PangoContext* GetPangoContext();
-
-// Returns the resolution (DPI) used by pango. A negative values means the
-// resolution hasn't been set.
-double GetPangoResolution();
+class FontList;
// Utility class to ensure that PangoFontDescription is freed.
class ScopedPangoFontDescription {
@@ -55,14 +43,11 @@ class ScopedPangoFontDescription {
// They are shared with internal skia interfaces.
// ----------------------------------------------------------------------------
-// Setup pango |layout|; set the |text|, the font description based on
-// |font_description|, the |width| in PANGO_SCALE for RTL locale, the base
-// |text_direction|, alignment, ellipsis, word wrapping, resolution, etc.
-void SetupPangoLayoutWithFontDescription(
+// Configures |layout| for the passed-in parameters.
+void SetUpPangoLayout(
PangoLayout* layout,
const base::string16& text,
- const std::string& font_description,
- int width,
+ const FontList& font_list,
base::i18n::TextDirection text_direction,
int flags);
« 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