[babl] removed redundant RGBA double registration
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] removed redundant RGBA double registration
- Date: Thu, 20 Jan 2011 21:43:28 +0000 (UTC)
commit 8f30c5109fe921bea7c52f00d1133a52b22126e5
Author: Rupert Weber <gimp leguanease org>
Date: Sun Sep 19 14:59:07 2010 +0200
removed redundant RGBA double registration
"RGBA double2 was registred twice, once per name, once per id.
babl/babl-core.c | 10 ----------
babl/babl-model.c | 7 ++++++-
2 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/babl/babl-core.c b/babl/babl-core.c
index f66b191..00e43e8 100644
--- a/babl/babl-core.c
+++ b/babl/babl-core.c
@@ -133,16 +133,6 @@ babl_core_init (void)
babl_component_from_id (BABL_ALPHA),
NULL);
- babl_format_new (
- "id", BABL_RGBA_DOUBLE,
- babl_model_from_id (BABL_RGBA),
- babl_type_from_id (BABL_DOUBLE),
- babl_component_from_id (BABL_RED),
- babl_component_from_id (BABL_GREEN),
- babl_component_from_id (BABL_BLUE),
- babl_component_from_id (BABL_ALPHA),
- NULL);
-
/*
babl_conversion_new (
babl_model_from_id (BABL_RGBA),
diff --git a/babl/babl-model.c b/babl/babl-model.c
index 11a3dd1..be2cdde 100644
--- a/babl/babl-model.c
+++ b/babl/babl-model.c
@@ -244,10 +244,15 @@ static Babl *reference_format (void)
static Babl *construct_double_format (Babl *model)
{
- void *argument[42 + 1];
+ void *argument[44 + 1];
int args = 0;
int i;
+ if (model == babl_model_from_id (BABL_RGBA))
+ {
+ argument[args++] = "id";
+ argument[args++] = (void*) BABL_RGBA_DOUBLE;
+ }
argument[args++] = model;
argument[args++] = babl_type_from_id (BABL_DOUBLE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]