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

Unified Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.h

Issue 929733002: Fix Pango font rendering with HiDPi displays on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don’t scale fonts up twice when running with device_scale_factor > 1.0. Created 5 years, 9 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
Index: chrome/browser/ui/libgtk2ui/gtk2_ui.h
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.h b/chrome/browser/ui/libgtk2ui/gtk2_ui.h
index d936d89584d3cd42b7d0051e78b00f1247477d1e..8fc7de4518d2937c5a3c4f395742261c30b01a6a 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.h
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.h
@@ -25,6 +25,7 @@ typedef struct _GdkColor GdkColor;
typedef struct _GtkBorder GtkBorder;
typedef struct _GtkStyle GtkStyle;
typedef struct _GtkWidget GtkWidget;
+typedef struct _PangoFontDescription PangoFontDescription;
Daniel Erat 2015/03/16 13:57:53 you might want to rebase or merge your change agai
stapelberg 2015/03/17 08:36:33 Done.
class SkBitmap;
@@ -71,7 +72,7 @@ class Gtk2UI : public views::LinuxUI {
std::string* family_out,
int* size_pixels_out,
int* style_out,
- gfx::FontRenderParams* params_out) const override;
+ gfx::FontRenderParams* params_out) override;
// ui::LinuxShellDialog:
ui::SelectFileDialog* CreateSelectFileDialog(
@@ -118,6 +119,9 @@ class Gtk2UI : public views::LinuxUI {
bool MatchEvent(const ui::Event& event,
std::vector<ui::TextEditCommandAuraLinux>* commands) override;
+ // ui::Views::LinuxUI:
+ void UpdateDeviceScaleFactor(float device_scale_factor) override;
+
private:
typedef std::map<int, SkColor> ColorMap;
typedef std::map<int, color_utils::HSL> TintMap;
@@ -262,6 +266,8 @@ class Gtk2UI : public views::LinuxUI {
// instance.
NativeThemeGetter native_theme_overrider_;
+ float device_scale_factor_;
+
DISALLOW_COPY_AND_ASSIGN(Gtk2UI);
};

Powered by Google App Engine
This is Rietveld 408576698