[gjs/gnome-3-34] cairo: Remove unused fields from private structures
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/gnome-3-34] cairo: Remove unused fields from private structures
- Date: Wed, 8 Jan 2020 01:05:44 +0000 (UTC)
commit e1c07c946fecc5ea15f694fcf96cecf74b6eb8ba
Author: Philip Chimento <philip endlessm com>
Date: Mon Nov 25 18:58:02 2019 -0800
cairo: Remove unused fields from private structures
This should save 16-24 bytes of memory per Cairo object, easy win!
modules/cairo-context.cpp | 5 -----
modules/cairo-path.cpp | 4 ----
modules/cairo-pattern.cpp | 5 -----
modules/cairo-region.cpp | 4 ----
modules/cairo-surface.cpp | 5 -----
5 files changed, 23 deletions(-)
---
diff --git a/modules/cairo-context.cpp b/modules/cairo-context.cpp
index e7b79632..4a8008cf 100644
--- a/modules/cairo-context.cpp
+++ b/modules/cairo-context.cpp
@@ -234,9 +234,6 @@ _GJS_CAIRO_CONTEXT_DEFINE_FUNC_BEGIN(method) \
_GJS_CAIRO_CONTEXT_DEFINE_FUNC_END
typedef struct {
- void *dummy;
- JSContext *context;
- JSObject *object;
cairo_t * cr;
} GjsCairoContext;
@@ -260,8 +257,6 @@ _gjs_cairo_context_construct_internal(JSContext *context,
g_assert(!priv_from_js(context, obj));
JS_SetPrivate(obj, priv);
- priv->context = context;
- priv->object = obj;
priv->cr = cairo_reference(cr);
}
diff --git a/modules/cairo-path.cpp b/modules/cairo-path.cpp
index 62ed78f6..13079c1e 100644
--- a/modules/cairo-path.cpp
+++ b/modules/cairo-path.cpp
@@ -31,8 +31,6 @@
#include "modules/cairo-private.h" // IWYU pragma: keep
typedef struct {
- JSContext *context;
- JSObject *object;
cairo_path_t *path;
} GjsCairoPath;
@@ -92,8 +90,6 @@ gjs_cairo_path_from_path(JSContext *context,
g_assert(!priv_from_js(context, object));
JS_SetPrivate(object, priv);
- priv->context = context;
- priv->object = object;
priv->path = path;
return object;
diff --git a/modules/cairo-pattern.cpp b/modules/cairo-pattern.cpp
index c9adf6c1..14e93ef8 100644
--- a/modules/cairo-pattern.cpp
+++ b/modules/cairo-pattern.cpp
@@ -32,9 +32,6 @@
#include "modules/cairo-private.h"
typedef struct {
- void *dummy;
- JSContext *context;
- JSObject *object;
cairo_pattern_t *pattern;
} GjsCairoPattern;
@@ -123,8 +120,6 @@ gjs_cairo_pattern_construct(JSContext *context,
g_assert(!priv_from_js(context, object));
JS_SetPrivate(object, priv);
- priv->context = context;
- priv->object = object;
priv->pattern = cairo_pattern_reference(pattern);
}
diff --git a/modules/cairo-region.cpp b/modules/cairo-region.cpp
index 6fd57612..723c0ef0 100644
--- a/modules/cairo-region.cpp
+++ b/modules/cairo-region.cpp
@@ -38,8 +38,6 @@
#include "modules/cairo-private.h"
typedef struct {
- JSContext *context;
- JSObject *object;
cairo_region_t *region;
} GjsCairoRegion;
@@ -255,8 +253,6 @@ _gjs_cairo_region_construct_internal(JSContext *context,
g_assert(!priv_from_js(context, obj));
JS_SetPrivate(obj, priv);
- priv->context = context;
- priv->object = obj;
priv->region = cairo_region_reference(region);
}
diff --git a/modules/cairo-surface.cpp b/modules/cairo-surface.cpp
index 5b98c1b7..4d39c74c 100644
--- a/modules/cairo-surface.cpp
+++ b/modules/cairo-surface.cpp
@@ -36,9 +36,6 @@
#include "modules/cairo-private.h"
typedef struct {
- void *dummy;
- JSContext *context;
- JSObject *object;
cairo_surface_t *surface;
} GjsCairoSurface;
@@ -162,8 +159,6 @@ gjs_cairo_surface_construct(JSContext *context,
g_assert(!priv_from_js(context, object));
JS_SetPrivate(object, priv);
- priv->context = context;
- priv->object = object;
priv->surface = cairo_surface_reference(surface);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]