[gegl/wip/nielsdg/g-param-static-strings: 2/2] Add G_PARAM_STATIC_STRINGS on GObject properties
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/wip/nielsdg/g-param-static-strings: 2/2] Add G_PARAM_STATIC_STRINGS on GObject properties
- Date: Wed, 7 Aug 2019 13:23:20 +0000 (UTC)
commit e8c0314a13b9e34d5852699b4b1eccb6bf0ae196
Author: Niels De Graef <nielsdegraef gmail com>
Date: Tue Aug 6 08:27:08 2019 +0200
Add G_PARAM_STATIC_STRINGS on GObject properties
This prevents some unnecssary string copies when the type is
initialized.
bin/ui-core.c | 8 ++---
gegl/buffer/gegl-buffer-config.c | 18 +++++++----
gegl/buffer/gegl-buffer.c | 51 ++++++++++++++++++++----------
gegl/buffer/gegl-sampler-cubic.c | 12 +++++--
gegl/buffer/gegl-tile-backend-buffer.c | 3 +-
gegl/buffer/gegl-tile-backend-file-async.c | 3 +-
gegl/buffer/gegl-tile-backend.c | 18 +++++++----
gegl/buffer/gegl-tile-handler.c | 3 +-
gegl/gegl-config.c | 24 ++++++++++----
gegl/gegl-stats.c | 42 ++++++++++++------------
gegl/graph/gegl-cache.c | 4 +++
gegl/graph/gegl-node.c | 7 ++++
gegl/process/gegl-processor.c | 8 +++--
gegl/property-types/gegl-audio-fragment.c | 3 +-
gegl/property-types/gegl-color.c | 3 +-
15 files changed, 137 insertions(+), 70 deletions(-)
---
diff --git a/bin/ui-core.c b/bin/ui-core.c
index 00cba56ab..8990839b6 100644
--- a/bin/ui-core.c
+++ b/bin/ui-core.c
@@ -265,19 +265,19 @@ ge_state_class_init (GeStateClass *klass)
obj_properties[PROP_SOURCE] =
g_param_spec_object ("source", "Source", "Source node in processing chain",
GEGL_TYPE_NODE,
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_SINK] =
g_param_spec_object ("sink", "Sink", "Sink node in processing chain",
GEGL_TYPE_NODE,
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_ACTIVE] =
g_param_spec_object ("active", "Active", "Active node",
GEGL_TYPE_NODE,
- G_PARAM_READWRITE);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_PATH] =
g_param_spec_string ("path", "Path", "Path of active image",
NULL,
- G_PARAM_READABLE);
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class,
N_PROPERTIES,
diff --git a/gegl/buffer/gegl-buffer-config.c b/gegl/buffer/gegl-buffer-config.c
index df6259d4a..12379b9e6 100644
--- a/gegl/buffer/gegl-buffer-config.c
+++ b/gegl/buffer/gegl-buffer-config.c
@@ -147,7 +147,8 @@ gegl_buffer_config_class_init (GeglBufferConfigClass *klass)
"default tile width for created buffers.",
0, G_MAXINT, 128,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_TILE_HEIGHT,
g_param_spec_int ("tile-height",
@@ -155,7 +156,8 @@ gegl_buffer_config_class_init (GeglBufferConfigClass *klass)
"default tile height for created buffers.",
0, G_MAXINT, 128,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_TILE_CACHE_SIZE,
g_param_spec_uint64 ("tile-cache-size",
@@ -163,7 +165,8 @@ gegl_buffer_config_class_init (GeglBufferConfigClass *klass)
"size of tile cache in bytes",
0, G_MAXUINT64, 512 * 1024 * 1024,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SWAP,
g_param_spec_string ("swap",
@@ -171,7 +174,8 @@ gegl_buffer_config_class_init (GeglBufferConfigClass *klass)
"where gegl stores it's swap files",
NULL,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SWAP_COMPRESSION,
g_param_spec_string ("swap-compression",
@@ -179,7 +183,8 @@ gegl_buffer_config_class_init (GeglBufferConfigClass *klass)
"compression algorithm used for data stored in the
swap",
"fast",
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_QUEUE_SIZE,
g_param_spec_int ("queue-size",
@@ -187,7 +192,8 @@ gegl_buffer_config_class_init (GeglBufferConfigClass *klass)
"Maximum size of a file backend's writer thread queue
(in bytes)",
2, G_MAXINT, 50 * 1024 *1024,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
}
static void
diff --git a/gegl/buffer/gegl-buffer.c b/gegl/buffer/gegl-buffer.c
index c233503ba..a9d9d2d4b 100644
--- a/gegl/buffer/gegl-buffer.c
+++ b/gegl/buffer/gegl-buffer.c
@@ -780,90 +780,107 @@ gegl_buffer_class_init (GeglBufferClass *class)
g_object_class_install_property (gobject_class, PROP_PX_SIZE,
g_param_spec_int ("px-size", "pixel-size", "size of a single pixel in
bytes.",
0, G_MAXINT, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PIXELS,
g_param_spec_int ("pixels", "pixels", "total amount of pixels in image
(width x height)",
0, G_MAXINT, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_WIDTH,
g_param_spec_int ("width", "width", "pixel width of buffer",
-1, G_MAXINT, -1,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_HEIGHT,
g_param_spec_int ("height", "height", "pixel height of buffer",
-1, G_MAXINT, -1,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_X,
g_param_spec_int ("x", "x", "local origin's offset relative to source
origin",
G_MININT / 2, G_MAXINT / 2, 0,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_Y,
g_param_spec_int ("y", "y", "local origin's offset relative to source
origin",
G_MININT / 2, G_MAXINT / 2, 0,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_ABYSS_WIDTH,
g_param_spec_int ("abyss-width", "abyss-width", "pixel width of abyss",
-1, G_MAXINT, 0,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_ABYSS_HEIGHT,
g_param_spec_int ("abyss-height", "abyss-height", "pixel height of abyss",
-1, G_MAXINT, 0,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_ABYSS_X,
g_param_spec_int ("abyss-x", "abyss-x", "",
G_MININT / 2, G_MAXINT / 2, 0,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_ABYSS_Y,
g_param_spec_int ("abyss-y", "abyss-y", "",
G_MININT / 2, G_MAXINT / 2, 0,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SHIFT_X,
g_param_spec_int ("shift-x", "shift-x", "",
G_MININT / 2, G_MAXINT / 2, 0,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SHIFT_Y,
g_param_spec_int ("shift-y", "shift-y", "",
G_MININT / 2, G_MAXINT / 2, 0,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_FORMAT,
g_param_spec_pointer ("format", "format", "babl format",
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_BACKEND,
g_param_spec_object ("backend", "backend", "A custom tile-backend
instance to use",
GEGL_TYPE_TILE_BACKEND,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_TILE_HEIGHT,
g_param_spec_int ("tile-height", "tile-height", "height of a tile",
-1, G_MAXINT, gegl_buffer_config()->tile_height,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_TILE_WIDTH,
g_param_spec_int ("tile-width", "tile-width", "width of a tile",
-1, G_MAXINT, gegl_buffer_config()->tile_width,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PATH,
g_param_spec_string ("path", "Path",
"URI to where the buffer is stored",
NULL,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
gegl_buffer_signals[CHANGED] =
g_signal_new ("changed",
diff --git a/gegl/buffer/gegl-sampler-cubic.c b/gegl/buffer/gegl-sampler-cubic.c
index c8e7548b5..7b247b7a8 100644
--- a/gegl/buffer/gegl-sampler-cubic.c
+++ b/gegl/buffer/gegl-sampler-cubic.c
@@ -82,7 +82,9 @@ gegl_sampler_cubic_class_init (GeglSamplerCubicClass *klass)
0.0,
1.0,
1.0,
- G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS |
+ G_PARAM_READWRITE));
g_object_class_install_property ( object_class, PROP_C,
g_param_spec_double ("c",
@@ -91,14 +93,18 @@ gegl_sampler_cubic_class_init (GeglSamplerCubicClass *klass)
0.0,
1.0,
0.0,
- G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS |
+ G_PARAM_READWRITE));
g_object_class_install_property ( object_class, PROP_TYPE,
g_param_spec_string ("type",
"type",
"B-spline type (cubic | catmullrom | formula) 2c+b=1",
"cubic",
- G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS |
+ G_PARAM_READWRITE));
}
static void
diff --git a/gegl/buffer/gegl-tile-backend-buffer.c b/gegl/buffer/gegl-tile-backend-buffer.c
index 2a8f67e43..15bd8df65 100644
--- a/gegl/buffer/gegl-tile-backend-buffer.c
+++ b/gegl/buffer/gegl-tile-backend-buffer.c
@@ -101,7 +101,8 @@ gegl_tile_backend_buffer_class_init (GeglTileBackendBufferClass *klass)
g_param_spec_object ("buffer", NULL, NULL,
GEGL_TYPE_BUFFER,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
}
static void
diff --git a/gegl/buffer/gegl-tile-backend-file-async.c b/gegl/buffer/gegl-tile-backend-file-async.c
index 2d3ea602a..215e5cb29 100644
--- a/gegl/buffer/gegl-tile-backend-file-async.c
+++ b/gegl/buffer/gegl-tile-backend-file-async.c
@@ -1281,7 +1281,8 @@ gegl_tile_backend_file_class_init (GeglTileBackendFileClass *klass)
"The base path for this backing file for a buffer",
NULL,
G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
}
static void
diff --git a/gegl/buffer/gegl-tile-backend.c b/gegl/buffer/gegl-tile-backend.c
index 03e5021a8..6af67279f 100644
--- a/gegl/buffer/gegl-tile-backend.c
+++ b/gegl/buffer/gegl-tile-backend.c
@@ -231,33 +231,39 @@ gegl_tile_backend_class_init (GeglTileBackendClass *klass)
"Tile width in pixels",
0, G_MAXINT, 0,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_TILE_HEIGHT,
g_param_spec_int ("tile-height", "tile-height",
"Tile height in pixels",
0, G_MAXINT, 0,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_TILE_SIZE,
g_param_spec_int ("tile-size", "tile-size",
"Size of the tiles linear buffer in bytes",
0, G_MAXINT, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PX_SIZE,
g_param_spec_int ("px-size", "px-size",
"Size of a single pixel in bytes",
0, G_MAXINT, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_FORMAT,
g_param_spec_pointer ("format", "format",
"babl format",
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_FLUSH_ON_DESTROY,
g_param_spec_boolean ("flush-on-destroy", "flush-on-destroy",
"Cache tiles will be flushed before the backend is
destroyed",
TRUE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
}
static void
diff --git a/gegl/buffer/gegl-tile-handler.c b/gegl/buffer/gegl-tile-handler.c
index 621f6d94c..5acd43064 100644
--- a/gegl/buffer/gegl-tile-handler.c
+++ b/gegl/buffer/gegl-tile-handler.c
@@ -129,7 +129,8 @@ gegl_tile_handler_class_init (GeglTileHandlerClass *klass)
"The tilestore to be a facade for",
G_TYPE_OBJECT,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
}
static void
diff --git a/gegl/gegl-config.c b/gegl/gegl-config.c
index 984e2fc4a..a7e4b6258 100644
--- a/gegl/gegl-config.c
+++ b/gegl/gegl-config.c
@@ -220,14 +220,16 @@ gegl_config_class_init (GeglConfigClass *klass)
"Tile width",
"default tile width for created buffers.",
0, G_MAXINT, 128,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_TILE_HEIGHT,
g_param_spec_int ("tile-height",
"Tile height",
"default tile height for created buffers.",
0, G_MAXINT, 128,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
{
uint64_t default_tile_cache_size = 1024l * 1024 * 1024;
@@ -333,7 +335,8 @@ gegl_config_class_init (GeglConfigClass *klass)
"Tile Cache size",
"size of tile cache in bytes",
0, G_MAXUINT64, default_tile_cache_size,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
}
g_object_class_install_property (gobject_class, PROP_CHUNK_SIZE,
@@ -342,6 +345,7 @@ gegl_config_class_init (GeglConfigClass *klass)
"the number of pixels processed simultaneously by
GEGL.",
1, G_MAXINT, 1024 * 1024,
G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT));
g_object_class_install_property (gobject_class, PROP_QUALITY,
@@ -350,6 +354,7 @@ gegl_config_class_init (GeglConfigClass *klass)
"quality/speed trade off 1.0 = full quality, 0.0 =
full speed",
0.0, 1.0, 1.0,
G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT));
g_object_class_install_property (gobject_class, PROP_SWAP,
@@ -357,14 +362,16 @@ gegl_config_class_init (GeglConfigClass *klass)
"Swap",
"where gegl stores it's swap files",
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SWAP_COMPRESSION,
g_param_spec_string ("swap-compression",
"Swap compression",
"compression algorithm used for data stored in the
swap",
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
_gegl_threads = g_get_num_processors ();
_gegl_threads = MIN (_gegl_threads, GEGL_MAX_THREADS);
@@ -375,6 +382,7 @@ gegl_config_class_init (GeglConfigClass *klass)
0, GEGL_MAX_THREADS,
_gegl_threads,
G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT));
g_object_class_install_property (gobject_class, PROP_MIPMAP_RENDERING,
@@ -383,6 +391,7 @@ gegl_config_class_init (GeglConfigClass *klass)
"Enable code paths for mipmap preview rendering,
uses approximations for 50% 25% etc zoom factors to reduce processing.",
FALSE,
G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT));
g_object_class_install_property (gobject_class, PROP_USE_OPENCL,
@@ -391,6 +400,7 @@ gegl_config_class_init (GeglConfigClass *klass)
"Try to use OpenCL",
FALSE,
G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT));
g_object_class_install_property (gobject_class, PROP_QUEUE_SIZE,
@@ -398,7 +408,8 @@ gegl_config_class_init (GeglConfigClass *klass)
"Queue size",
"Maximum size of a file backend's writer thread queue
(in bytes)",
2, G_MAXINT, 50 * 1024 *1024,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_APPLICATION_LICENSE,
g_param_spec_string ("application-license",
@@ -406,6 +417,7 @@ gegl_config_class_init (GeglConfigClass *klass)
"A list of additional licenses to allow for
operations",
"",
G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT));
}
diff --git a/gegl/gegl-stats.c b/gegl/gegl-stats.c
index e336ee555..178e8b4b3 100644
--- a/gegl/gegl-stats.c
+++ b/gegl/gegl-stats.c
@@ -85,63 +85,63 @@ gegl_stats_class_init (GeglStatsClass *klass)
"Tile Cache total size",
"Total size of tile cache in bytes",
0, G_MAXUINT64, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_TILE_CACHE_TOTAL_MAX,
g_param_spec_uint64 ("tile-cache-total-max",
"Tile Cache maximal total size",
"Maximal total size of tile cache throughout the
session in bytes",
0, G_MAXUINT64, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_TILE_CACHE_TOTAL_UNCOMPRESSED,
g_param_spec_uint64 ("tile-cache-total-uncompressed",
"Tile Cache total uncompressed size",
"Total size of tile cache if no compression was
employed in bytes",
0, G_MAXUINT64, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_TILE_CACHE_HITS,
g_param_spec_int ("tile-cache-hits",
"Tile Cache hits",
"Number of tile cache hits",
0, G_MAXINT, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_TILE_CACHE_MISSES,
g_param_spec_int ("tile-cache-misses",
"Tile Cache misses",
"Number of tile cache misses",
0, G_MAXINT, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_SWAP_TOTAL,
g_param_spec_uint64 ("swap-total",
"Swap total size",
"Total size of the data in the swap",
0, G_MAXUINT64, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_SWAP_TOTAL_UNCOMPRESSED,
g_param_spec_uint64 ("swap-total-uncompressed",
"Swap total uncompressed size",
"Total size of if the data in the swap if no
compression was employed in bytes",
0, G_MAXUINT64, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_SWAP_FILE_SIZE,
g_param_spec_uint64 ("swap-file-size",
"Swap file size",
"Size of the swap file",
0, G_MAXUINT64, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_SWAP_BUSY,
g_param_spec_boolean ("swap-busy",
"Swap busy",
"Whether there is work queued for the swap",
FALSE,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_SWAP_QUEUED_TOTAL,
@@ -149,7 +149,7 @@ gegl_stats_class_init (GeglStatsClass *klass)
"Swap total queued size",
"Total size of the data queued for writing to the
swap",
0, G_MAXUINT64, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_SWAP_QUEUE_FULL,
@@ -157,7 +157,7 @@ gegl_stats_class_init (GeglStatsClass *klass)
"Swap queue full",
"Whether the swap queue is full",
FALSE,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_SWAP_QUEUE_STALLS,
g_param_spec_int ("swap-queue-stalls",
@@ -165,14 +165,14 @@ gegl_stats_class_init (GeglStatsClass *klass)
"Number of times writing to the swap has been stalled, "
"due to a full queue",
0, G_MAXINT, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_SWAP_READING,
g_param_spec_boolean ("swap-reading",
"Swap reading",
"Whether data is being read from the swap",
FALSE,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_SWAP_READ_TOTAL,
@@ -180,14 +180,14 @@ gegl_stats_class_init (GeglStatsClass *klass)
"Swap read total",
"Total amount of data read from the swap",
0, G_MAXUINT64, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_SWAP_WRITING,
g_param_spec_boolean ("swap-writing",
"Swap writing",
"Whether data is being written to the swap",
FALSE,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_SWAP_WRITE_TOTAL,
@@ -195,42 +195,42 @@ gegl_stats_class_init (GeglStatsClass *klass)
"Swap write total",
"Total amount of data written to the swap",
0, G_MAXUINT64, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_ZOOM_TOTAL,
g_param_spec_uint64 ("zoom-total",
"Zoom total",
"Total size of data processed by the zoom tile
handler",
0, G_MAXUINT64, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_TILE_ALLOC_TOTAL,
g_param_spec_uint64 ("tile-alloc-total",
"Tile allocator total",
"Total size of tile-allocator memory",
0, G_MAXUINT64, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_SCRATCH_TOTAL,
g_param_spec_uint64 ("scratch-total",
"Scratch total",
"Total size of scratch memory",
0, G_MAXUINT64, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_ASSIGNED_THREADS,
g_param_spec_int ("assigned-threads",
"Assigned threads",
"Number of assigned worker threads",
0, G_MAXINT, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_ACTIVE_THREADS,
g_param_spec_int ("active-threads",
"Active threads",
"Number of active worker threads",
0, G_MAXINT, 0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
}
static void
diff --git a/gegl/graph/gegl-cache.c b/gegl/graph/gegl-cache.c
index aaafca55c..33036bc37 100644
--- a/gegl/graph/gegl-cache.c
+++ b/gegl/graph/gegl-cache.c
@@ -123,6 +123,7 @@ gegl_cache_class_init (GeglCacheClass *klass)
"local origin's offset relative to source origin",
G_MININT / 2, G_MAXINT / 2, -4096,
G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (gobject_class, PROP_Y,
@@ -130,6 +131,7 @@ gegl_cache_class_init (GeglCacheClass *klass)
"local origin's offset relative to source origin",
G_MININT / 2, G_MAXINT / 2, -4096,
G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (gobject_class, PROP_WIDTH,
@@ -137,6 +139,7 @@ gegl_cache_class_init (GeglCacheClass *klass)
"pixel width of buffer",
-1, G_MAXINT, 10240 * 4,
G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (gobject_class, PROP_HEIGHT,
@@ -144,6 +147,7 @@ gegl_cache_class_init (GeglCacheClass *klass)
"pixel height of buffer",
-1, G_MAXINT, 10240 * 4,
G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY));
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index 80152605f..82e275eb9 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -144,6 +144,7 @@ gegl_node_class_init (GeglNodeClass *klass)
"The associated GeglOperation instance",
GEGL_TYPE_OPERATION,
G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT));
g_object_class_install_property (gobject_class, PROP_OP_CLASS,
@@ -152,6 +153,7 @@ gegl_node_class_init (GeglNodeClass *klass)
"The type of associated GeglOperation",
"",
G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_DONT_CACHE,
@@ -161,6 +163,7 @@ gegl_node_class_init (GeglNodeClass *klass)
" (Deprecated for \"cache-policy\".)",
FALSE,
G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_CACHE_POLICY,
@@ -170,6 +173,7 @@ gegl_node_class_init (GeglNodeClass *klass)
GEGL_TYPE_CACHE_POLICY,
GEGL_CACHE_POLICY_AUTO,
G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_USE_OPENCL,
@@ -178,6 +182,7 @@ gegl_node_class_init (GeglNodeClass *klass)
"Use the OpenCL version of this operation if
available, this property is inherited by children created from a node.",
TRUE,
G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_READWRITE));
@@ -187,6 +192,7 @@ gegl_node_class_init (GeglNodeClass *klass)
"The name of the node",
"",
G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_PASSTHROUGH,
@@ -195,6 +201,7 @@ gegl_node_class_init (GeglNodeClass *klass)
"Act as a nop, passing input unmodifed through to
ouput.",
FALSE,
G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_READWRITE));
gegl_node_signals[INVALIDATED] =
diff --git a/gegl/process/gegl-processor.c b/gegl/process/gegl-processor.c
index 15668d758..de9fe63b9 100644
--- a/gegl/process/gegl-processor.c
+++ b/gegl/process/gegl-processor.c
@@ -108,20 +108,23 @@ gegl_processor_class_init (GeglProcessorClass *klass)
"The GeglNode to process (will saturate the
provider's cache if the provided node is a sink node)",
GEGL_TYPE_NODE,
G_PARAM_WRITABLE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT));
g_object_class_install_property (gobject_class, PROP_RECTANGLE,
g_param_spec_pointer ("rectangle",
"rectangle",
"The rectangle of the region to process.",
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PROGRESS,
g_param_spec_double ("progress",
"progress",
"query progress; 0.0 is not started, 1.0 is done.",
0.0, 1.0, 0.0,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CHUNK_SIZE,
g_param_spec_int ("chunksize",
@@ -129,6 +132,7 @@ gegl_processor_class_init (GeglProcessorClass *klass)
"Size of chunks being rendered (larger chunks need more
memory to do the processing).",
1, 4096 * 4096, gegl_config()->chunk_size,
G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY));
}
diff --git a/gegl/property-types/gegl-audio-fragment.c b/gegl/property-types/gegl-audio-fragment.c
index 394752269..bb3b5cd70 100644
--- a/gegl/property-types/gegl-audio-fragment.c
+++ b/gegl/property-types/gegl-audio-fragment.c
@@ -104,7 +104,8 @@ gegl_audio_fragment_class_init (GeglAudioFragmentClass *klass)
"String",
"A String representation of the GeglAudioFragment",
"",
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
}
static void
diff --git a/gegl/property-types/gegl-color.c b/gegl/property-types/gegl-color.c
index c6e6cd4b1..9ff7fd745 100644
--- a/gegl/property-types/gegl-color.c
+++ b/gegl/property-types/gegl-color.c
@@ -127,7 +127,8 @@ gegl_color_class_init (GeglColorClass *klass)
"String",
"A String representation of the GeglColor",
"",
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]