Commit 29463e9e authored by Alexander Larsson's avatar Alexander Larsson
Browse files

Revert "gdk: Add gdk_cairo_surface_create_similar"

This reverts commit 6a98703c.

Conflicts:
	gdk/gdkcairo.h
parent 86a5f2c3
......@@ -478,40 +478,3 @@ gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
return region;
}
static const cairo_user_data_key_t window_key;
static GdkWindow *
_gdk_cairo_surface_get_window (cairo_surface_t *surface)
{
return cairo_surface_get_user_data (surface, &window_key);
}
void
_gdk_cairo_surface_set_window (cairo_surface_t *surface,
GdkWindow *window)
{
cairo_surface_set_user_data (surface, &window_key,
window, NULL);
}
cairo_surface_t *
gdk_cairo_surface_create_similar (cairo_surface_t *surface,
cairo_content_t content,
int width,
int height)
{
GdkWindow *window;
window = _gdk_cairo_surface_get_window (surface);
if (window)
return gdk_window_create_similar_surface (window,
content,
width,
height);
else
return cairo_surface_create_similar (surface,
content,
width,
height);
}
......@@ -318,8 +318,6 @@ void gdk_synthesize_window_state (GdkWindow *window,
gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface,
GdkRectangle *extents);
void _gdk_cairo_surface_set_window (cairo_surface_t *surface,
GdkWindow *window);
/*************************************
* Interfaces used by windowing code *
......
......@@ -3099,9 +3099,8 @@ gdk_window_create_cairo_surface (GdkWindow *window,
subsurface = cairo_surface_create_for_rectangle (surface,
window->abs_x,
window->abs_y,
width ,
width,
height);
_gdk_cairo_surface_set_window (subsurface, window);
cairo_surface_destroy (surface);
return subsurface;
}
......@@ -3126,7 +3125,6 @@ _gdk_window_ref_cairo_surface (GdkWindow *window)
window->abs_y,
window->width,
window->height);
_gdk_cairo_surface_set_window (surface, window);
}
else
{
......@@ -3135,7 +3133,6 @@ _gdk_window_ref_cairo_surface (GdkWindow *window)
window->cairo_surface = gdk_window_create_cairo_surface (window,
window->width,
window->height);
_gdk_cairo_surface_set_window (window->cairo_surface, window);
if (window->cairo_surface)
{
......@@ -9245,8 +9242,6 @@ gdk_window_create_similar_surface (GdkWindow * window,
cairo_surface_destroy (window_surface);
_gdk_cairo_surface_set_window (surface, window);
return surface;
}
......@@ -9311,9 +9306,6 @@ gdk_window_create_similar_image_surface (GdkWindow * window,
cairo_surface_set_device_scale (surface, scale, scale);
#endif
if (window)
_gdk_cairo_surface_set_window (surface, window);
return surface;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment