[gtk/wip/otte/paintable: 7/15] snapshot: "Inherit" from GdkSnapshot
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/paintable: 7/15] snapshot: "Inherit" from GdkSnapshot
- Date: Sat, 17 Feb 2018 06:51:44 +0000 (UTC)
commit 757fa449e5b79f18fe168d6e85150fe440af9361
Author: Benjamin Otte <otte redhat com>
Date: Fri Feb 16 06:30:48 2018 +0100
snapshot: "Inherit" from GdkSnapshot
This is a neat trick to get around the circularity between GDK, GSK and
GTK that we inherit with the GdkPaintable interface.
GdkPaintable uses GtkSnapshot
GtkSnapshot creates GskRenderNodes
GskRenderNodes use GdkTextures
GdkTexture will soon implement GdkPaintable
This causes a loop that spans GDK, GSK and GTK and this is the easiest
way to resolve it without breaking bindings (at least that's the idea).
gtk/gtksnapshotprivate.h | 2 +-
gtk/gtktypes.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtksnapshotprivate.h b/gtk/gtksnapshotprivate.h
index 1319df7d7b..1e38fb86d1 100644
--- a/gtk/gtksnapshotprivate.h
+++ b/gtk/gtksnapshotprivate.h
@@ -80,7 +80,7 @@ struct _GtkSnapshotState {
} data;
};
-struct _GtkSnapshot {
+struct _GdkSnapshot {
gboolean record_names;
GskRenderer *renderer;
GArray *state_stack;
diff --git a/gtk/gtktypes.h b/gtk/gtktypes.h
index c38a845165..b7298d00db 100644
--- a/gtk/gtktypes.h
+++ b/gtk/gtktypes.h
@@ -39,7 +39,7 @@ typedef struct _GtkClipboard GtkClipboard;
typedef struct _GtkRequisition GtkRequisition;
typedef struct _GtkSelectionData GtkSelectionData;
typedef struct _GtkSettings GtkSettings;
-typedef struct _GtkSnapshot GtkSnapshot;
+typedef GdkSnapshot GtkSnapshot;
typedef struct _GtkStyleContext GtkStyleContext;
typedef struct _GtkTooltip GtkTooltip;
typedef struct _GtkWidget GtkWidget;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]