Move rendering mode into GdkDisplay

This is in preparation for making it runtime-settable in the
inspector.
This commit is contained in:
Matthias Clasen 2014-11-10 14:28:43 -05:00
parent 710f332082
commit 8338b7e4cd
3 changed files with 8 additions and 1 deletions

View File

@ -223,6 +223,8 @@ gdk_display_init (GdkDisplay *display)
display->multiple_click_info = g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) g_free);
display->rendering_mode = _gdk_rendering_mode;
}
static void

View File

@ -21,6 +21,7 @@
#include "gdkdisplay.h"
#include "gdkwindow.h"
#include "gdkcursor.h"
#include "gdkinternals.h"
G_BEGIN_DECLS
@ -119,6 +120,8 @@ struct _GdkDisplay
guint has_gl_extension_texture_non_power_of_two : 1;
guint has_gl_extension_texture_rectangle : 1;
GdkRenderingMode rendering_mode;
};
struct _GdkDisplayClass

View File

@ -9448,6 +9448,7 @@ gdk_window_create_similar_surface (GdkWindow * window,
int width,
int height)
{
GdkDisplay *display;
cairo_surface_t *window_surface, *surface;
double sx, sy;
@ -9457,7 +9458,8 @@ gdk_window_create_similar_surface (GdkWindow * window,
sx = sy = 1;
cairo_surface_get_device_scale (window_surface, &sx, &sy);
switch (_gdk_rendering_mode)
display = gdk_window_get_display (window);
switch (display->rendering_mode)
{
case GDK_RENDERING_MODE_RECORDING:
{