[gtk+] gdkwindow: Don't pass the region to the impl when beginning a paint
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdkwindow: Don't pass the region to the impl when beginning a paint
- Date: Sat, 22 Nov 2014 18:39:29 +0000 (UTC)
commit 8976e84ded5d162c10c74e82edf04cf3c068114d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Nov 22 08:08:34 2014 -0800
gdkwindow: Don't pass the region to the impl when beginning a paint
It's unused. At the same time, rename "begin_paint_region" to
"begin_paint". This will help us clean up how GDK painting works
in the future to allow more creative use of double-buffering.
gdk/gdkwindow.c | 4 ++--
gdk/gdkwindowimpl.h | 3 +--
gdk/mir/gdkmirwindowimpl.c | 7 +++----
gdk/quartz/gdkwindow-quartz.c | 5 ++---
gdk/wayland/gdkwindow-wayland.c | 5 ++---
5 files changed, 10 insertions(+), 14 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 6d56a6c..9d26943 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2891,8 +2891,8 @@ gdk_window_begin_paint_region (GdkWindow *window,
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
needs_surface = TRUE;
- if (impl_class->begin_paint_region)
- needs_surface = impl_class->begin_paint_region (window, region);
+ if (impl_class->begin_paint)
+ needs_surface = impl_class->begin_paint (window);
window->current_paint.region = cairo_region_copy (region);
cairo_region_intersect (window->current_paint.region, window->clip_region);
diff --git a/gdk/gdkwindowimpl.h b/gdk/gdkwindowimpl.h
index b8fb0f0..efdaa1f 100644
--- a/gdk/gdkwindowimpl.h
+++ b/gdk/gdkwindowimpl.h
@@ -106,8 +106,7 @@ struct _GdkWindowImplClass
gdouble *x,
gdouble *y,
GdkModifierType *mask);
- gboolean (* begin_paint_region) (GdkWindow *window,
- const cairo_region_t *region);
+ gboolean (* begin_paint) (GdkWindow *window);
void (* end_paint) (GdkWindow *window);
cairo_region_t * (* get_shape) (GdkWindow *window);
diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c
index 5f22463..6431ed4 100644
--- a/gdk/mir/gdkmirwindowimpl.c
+++ b/gdk/mir/gdkmirwindowimpl.c
@@ -665,10 +665,9 @@ gdk_mir_window_impl_get_device_state (GdkWindow *window,
}
static gboolean
-gdk_mir_window_impl_begin_paint_region (GdkWindow *window,
- const cairo_region_t *region)
+gdk_mir_window_impl_begin_paint (GdkWindow *window)
{
- //g_printerr ("gdk_mir_window_impl_begin_paint_region window=%p\n", window);
+ //g_printerr ("gdk_mir_window_impl_begin_paint window=%p\n", window);
/* Indicate we are ready to be drawn onto directly? */
return FALSE;
}
@@ -1557,7 +1556,7 @@ gdk_mir_window_impl_class_init (GdkMirWindowImplClass *klass)
impl_class->get_geometry = gdk_mir_window_impl_get_geometry;
impl_class->get_root_coords = gdk_mir_window_impl_get_root_coords;
impl_class->get_device_state = gdk_mir_window_impl_get_device_state;
- impl_class->begin_paint_region = gdk_mir_window_impl_begin_paint_region;
+ impl_class->begin_paint = gdk_mir_window_impl_begin_paint;
impl_class->end_paint = gdk_mir_window_impl_end_paint;
impl_class->get_shape = gdk_mir_window_impl_get_shape;
impl_class->get_input_shape = gdk_mir_window_impl_get_input_shape;
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 68ec2bd..468bc8b 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -334,8 +334,7 @@ gdk_window_impl_quartz_init (GdkWindowImplQuartz *impl)
}
static gboolean
-gdk_window_impl_quartz_begin_paint_region (GdkWindow *window,
- const cairo_region_t *region)
+gdk_window_impl_quartz_begin_paint (GdkWindow *window)
{
return FALSE;
}
@@ -2892,7 +2891,7 @@ gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass)
impl_class->destroy_foreign = gdk_quartz_window_destroy_foreign;
impl_class->get_shape = gdk_quartz_window_get_shape;
impl_class->get_input_shape = gdk_quartz_window_get_input_shape;
- impl_class->begin_paint_region = gdk_window_impl_quartz_begin_paint_region;
+ impl_class->begin_paint = gdk_window_impl_quartz_begin_paint;
impl_class->get_scale_factor = gdk_quartz_window_get_scale_factor;
impl_class->focus = gdk_quartz_window_focus;
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index e44125a..dba476c 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -570,8 +570,7 @@ gdk_wayland_window_create_similar_image_surface (GdkWindow * window,
}
static gboolean
-gdk_window_impl_wayland_begin_paint_region (GdkWindow *window,
- const cairo_region_t *region)
+gdk_window_impl_wayland_begin_paint (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
gdk_wayland_window_ensure_cairo_surface (window);
@@ -2125,7 +2124,7 @@ _gdk_window_impl_wayland_class_init (GdkWindowImplWaylandClass *klass)
impl_class->destroy_foreign = gdk_window_wayland_destroy_foreign;
impl_class->get_shape = gdk_wayland_window_get_shape;
impl_class->get_input_shape = gdk_wayland_window_get_input_shape;
- impl_class->begin_paint_region = gdk_window_impl_wayland_begin_paint_region;
+ impl_class->begin_paint = gdk_window_impl_wayland_begin_paint;
impl_class->end_paint = gdk_window_impl_wayland_end_paint;
/* impl_class->beep */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]