[gtk+/wip/window-scales] Revert "gdk: Add gdk_cairo_surface_create_similar"
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/window-scales] Revert "gdk: Add gdk_cairo_surface_create_similar"
- Date: Tue, 2 Jul 2013 15:07:18 +0000 (UTC)
commit 29463e9ea94f8c8cf71047611c980bb014826b74
Author: Alexander Larsson <alexl redhat com>
Date: Tue Jul 2 16:27:55 2013 +0200
Revert "gdk: Add gdk_cairo_surface_create_similar"
This reverts commit 6a98703c9a01a405b6ce6909ede46f65c1e91f58.
Conflicts:
gdk/gdkcairo.h
gdk/gdkcairo.c | 37 -------------------------------------
gdk/gdkinternals.h | 2 --
gdk/gdkwindow.c | 10 +---------
3 files changed, 1 insertions(+), 48 deletions(-)
---
diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c
index 5a4447f..f3a134b 100644
--- a/gdk/gdkcairo.c
+++ b/gdk/gdkcairo.c
@@ -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);
-}
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index ee5c7c4..e7eb9d5 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -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 *
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 6ba4096..fa87325 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]