Compare commits
No commits in common. "94ac44ddc57a8d02d00cec842cc58bcb6ceb22f6" and "d5dde3658d592d47068d41abfc67af533b115676" have entirely different histories.
94ac44ddc5
...
d5dde3658d
@ -39,36 +39,9 @@ static void layer_settings_init(LayerSettings *self)
|
|||||||
self->layer_infos = NULL;
|
self->layer_infos = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void layer_info_delete_with_name(struct layer_info *const info)
|
|
||||||
{
|
|
||||||
if (!info)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (info->name)
|
|
||||||
free(info->name);
|
|
||||||
free(info);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void layer_settings_dispose(GObject *obj)
|
|
||||||
{
|
|
||||||
LayerSettings *self;
|
|
||||||
|
|
||||||
self = GDS_RENDER_LAYER_SETTINGS(obj);
|
|
||||||
|
|
||||||
if (self->layer_infos) {
|
|
||||||
g_list_free_full(self->layer_infos, (GDestroyNotify)layer_info_delete_with_name);
|
|
||||||
self->layer_infos = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS(layer_settings_parent_class)->dispose(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void layer_settings_class_init(LayerSettingsClass *klass)
|
static void layer_settings_class_init(LayerSettingsClass *klass)
|
||||||
{
|
{
|
||||||
GObjectClass *oclass;
|
(void)klass;
|
||||||
|
|
||||||
oclass = G_OBJECT_CLASS(klass);
|
|
||||||
oclass->dispose = layer_settings_dispose;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -103,6 +76,16 @@ static struct layer_info *layer_info_copy(const struct layer_info * const info)
|
|||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void layer_info_delete_with_name(struct layer_info *const info)
|
||||||
|
{
|
||||||
|
if (!info)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (info->name)
|
||||||
|
free(info->name);
|
||||||
|
free(info);
|
||||||
|
}
|
||||||
|
|
||||||
LayerSettings *layer_settings_new()
|
LayerSettings *layer_settings_new()
|
||||||
{
|
{
|
||||||
return g_object_new(GDS_RENDER_TYPE_LAYER_SETTINGS, NULL);
|
return g_object_new(GDS_RENDER_TYPE_LAYER_SETTINGS, NULL);
|
||||||
|
@ -262,10 +262,9 @@ LayerSettings *gds_output_renderer_get_and_ref_layer_settings(GdsOutputRenderer
|
|||||||
/* Acquire settings lock */
|
/* Acquire settings lock */
|
||||||
g_mutex_lock(&priv->settings_lock);
|
g_mutex_lock(&priv->settings_lock);
|
||||||
|
|
||||||
/* This function seems to already reference the LayerSettings object */
|
|
||||||
g_object_get(renderer, "layer-settings", &ret, NULL);
|
g_object_get(renderer, "layer-settings", &ret, NULL);
|
||||||
/* Reference it, so it is not cleared by another thread overwriting the property */
|
/* Reference it, so it is not cleared by another thread overwriting the property */
|
||||||
//g_object_ref(ret);
|
g_object_ref(ret);
|
||||||
|
|
||||||
/* It is now safe to clear the lock */
|
/* It is now safe to clear the lock */
|
||||||
g_mutex_unlock(&priv->settings_lock);
|
g_mutex_unlock(&priv->settings_lock);
|
||||||
@ -372,8 +371,6 @@ int gds_output_renderer_render_output_async(GdsOutputRenderer *renderer, struct
|
|||||||
}
|
}
|
||||||
|
|
||||||
priv->task = g_task_new(renderer, NULL, gds_output_renderer_async_finished, NULL);
|
priv->task = g_task_new(renderer, NULL, gds_output_renderer_async_finished, NULL);
|
||||||
g_task_set_name(priv->task, "Rendering Thread");
|
|
||||||
|
|
||||||
g_mutex_lock(&priv->settings_lock);
|
g_mutex_lock(&priv->settings_lock);
|
||||||
priv->async_params.cell = cell;
|
priv->async_params.cell = cell;
|
||||||
priv->async_params.scale = scale;
|
priv->async_params.scale = scale;
|
||||||
|
Loading…
Reference in New Issue
Block a user