OLD | NEW |
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 #include "ui/gfx/canvas_skia.h" | 5 #include "ui/gfx/canvas_skia.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include <cairo/cairo.h> | 9 #include <cairo/cairo.h> |
10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // Update |cairo_font_options| based on GtkSettings, allocating it if needed. | 43 // Update |cairo_font_options| based on GtkSettings, allocating it if needed. |
44 void UpdateCairoFontOptions() { | 44 void UpdateCairoFontOptions() { |
45 if (!cairo_font_options) | 45 if (!cairo_font_options) |
46 cairo_font_options = cairo_font_options_create(); | 46 cairo_font_options = cairo_font_options_create(); |
47 | 47 |
48 gint antialias = 0; | 48 gint antialias = 0; |
49 gint hinting = 0; | 49 gint hinting = 0; |
50 gchar* hint_style = NULL; | 50 gchar* hint_style = NULL; |
51 gchar* rgba_style = NULL; | 51 gchar* rgba_style = NULL; |
52 | 52 |
53 #if !defined(USE_WAYLAND) | 53 #if !defined(USE_WAYLAND) && !defined(USE_AURA) |
54 GtkSettings* gtk_settings = gtk_settings_get_default(); | 54 GtkSettings* gtk_settings = gtk_settings_get_default(); |
55 g_object_get(gtk_settings, | 55 g_object_get(gtk_settings, |
56 "gtk-xft-antialias", &antialias, | 56 "gtk-xft-antialias", &antialias, |
57 "gtk-xft-hinting", &hinting, | 57 "gtk-xft-hinting", &hinting, |
58 "gtk-xft-hintstyle", &hint_style, | 58 "gtk-xft-hintstyle", &hint_style, |
59 "gtk-xft-rgba", &rgba_style, | 59 "gtk-xft-rgba", &rgba_style, |
60 NULL); | 60 NULL); |
61 #endif | 61 #endif |
62 | 62 |
63 // g_object_get() doesn't tell us whether the properties were present or not, | 63 // g_object_get() doesn't tell us whether the properties were present or not, |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 gdk_cairo_set_source_pixbuf(cr, pixbuf, x, y); | 495 gdk_cairo_set_source_pixbuf(cr, pixbuf, x, y); |
496 cairo_paint(cr); | 496 cairo_paint(cr); |
497 } | 497 } |
498 | 498 |
499 ui::TextureID CanvasSkia::GetTextureID() { | 499 ui::TextureID CanvasSkia::GetTextureID() { |
500 // TODO(wjmaclean) | 500 // TODO(wjmaclean) |
501 return 0; | 501 return 0; |
502 } | 502 } |
503 | 503 |
504 } // namespace gfx | 504 } // namespace gfx |
OLD | NEW |