gegl r2992 - in trunk: . examples gegl/buffer gegl/operation
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2992 - in trunk: . examples gegl/buffer gegl/operation
- Date: Thu, 26 Mar 2009 18:27:49 +0000 (UTC)
Author: martinn
Date: Thu Mar 26 18:27:49 2009
New Revision: 2992
URL: http://svn.gnome.org/viewvc/gegl?rev=2992&view=rev
Log:
Some vendor compilers choke on compound declaration casts
Patch from Gary V. Vaughan.
Modified:
trunk/ChangeLog
trunk/examples/gegl-paint.c
trunk/gegl/buffer/gegl-sampler-cubic.c
trunk/gegl/buffer/gegl-sampler-linear.c
trunk/gegl/buffer/gegl-sampler-nearest.c
trunk/gegl/buffer/gegl-sampler-sharp.c
trunk/gegl/buffer/gegl-sampler-yafr.c
trunk/gegl/operation/gegl-operation-temporal.c
Modified: trunk/examples/gegl-paint.c
==============================================================================
--- trunk/examples/gegl-paint.c (original)
+++ trunk/examples/gegl-paint.c Thu Mar 26 18:27:49 2009
@@ -140,10 +140,10 @@
if (argv[1] == NULL)
{
+ GeglRectangle rect = {0, 0, 512, 512};
gpointer buf;
- buffer = gegl_buffer_new (&(GeglRectangle){0, 0, 512, 512},
- babl_format("RaGaBaA float"));
+ buffer = gegl_buffer_new (&rect, babl_format("RaGaBaA float"));
buf = gegl_buffer_linear_open (buffer, NULL, NULL, babl_format ("Y' u8"));
memset (buf, 255, 512 * 512); /* FIXME: we need a babl_buffer_paint () */
gegl_buffer_linear_close (buffer, buf);
Modified: trunk/gegl/buffer/gegl-sampler-cubic.c
==============================================================================
--- trunk/gegl/buffer/gegl-sampler-cubic.c (original)
+++ trunk/gegl/buffer/gegl-sampler-cubic.c Thu Mar 26 18:27:49 2009
@@ -96,7 +96,10 @@
static void
gegl_sampler_cubic_init (GeglSamplerCubic *self)
{
- GEGL_SAMPLER (self)->context_rect= (GeglRectangle){-1,-1,4,4};
+ GEGL_SAMPLER (self)->context_rect.x = -1;
+ GEGL_SAMPLER (self)->context_rect.y = -1;
+ GEGL_SAMPLER (self)->context_rect.width = 4;
+ GEGL_SAMPLER (self)->context_rect.height = 4;
GEGL_SAMPLER (self)->interpolate_format = babl_format ("RaGaBaA float");
self->b=1.0;
self->c=0.0;
Modified: trunk/gegl/buffer/gegl-sampler-linear.c
==============================================================================
--- trunk/gegl/buffer/gegl-sampler-linear.c (original)
+++ trunk/gegl/buffer/gegl-sampler-linear.c Thu Mar 26 18:27:49 2009
@@ -106,7 +106,10 @@
static void
gegl_sampler_linear_init (GeglSamplerLinear *self)
{
- GEGL_SAMPLER (self)->context_rect = (GeglRectangle){ 0, 0, 2, 2 };
+ GEGL_SAMPLER (self)->context_rect.x = 0;
+ GEGL_SAMPLER (self)->context_rect.y = 0;
+ GEGL_SAMPLER (self)->context_rect.width = 2;
+ GEGL_SAMPLER (self)->context_rect.height = 2;
GEGL_SAMPLER (self)->interpolate_format = babl_format ("RaGaBaA float");
}
Modified: trunk/gegl/buffer/gegl-sampler-nearest.c
==============================================================================
--- trunk/gegl/buffer/gegl-sampler-nearest.c (original)
+++ trunk/gegl/buffer/gegl-sampler-nearest.c Thu Mar 26 18:27:49 2009
@@ -63,7 +63,10 @@
static void
gegl_sampler_nearest_init (GeglSamplerNearest *self)
{
- GEGL_SAMPLER (self)->context_rect = (GeglRectangle){0,0,1,1};
+ GEGL_SAMPLER (self)->context_rect.x = 0;
+ GEGL_SAMPLER (self)->context_rect.y = 0;
+ GEGL_SAMPLER (self)->context_rect.width = 1;
+ GEGL_SAMPLER (self)->context_rect.height = 1;
GEGL_SAMPLER (self)->interpolate_format = babl_format ("RGBA float");
}
Modified: trunk/gegl/buffer/gegl-sampler-sharp.c
==============================================================================
--- trunk/gegl/buffer/gegl-sampler-sharp.c (original)
+++ trunk/gegl/buffer/gegl-sampler-sharp.c Thu Mar 26 18:27:49 2009
@@ -260,7 +260,10 @@
* nearest input pixel center. See comment below about using a
* "non-centered" stencil (one based at the corner) instead.
*/
- GEGL_SAMPLER (self)->context_rect = (GeglRectangle){-2,-2,5,5};
+ GEGL_SAMPLER (self)->context_rect.x = -2;
+ GEGL_SAMPLER (self)->context_rect.y = -2;
+ GEGL_SAMPLER (self)->context_rect.width = 5;
+ GEGL_SAMPLER (self)->context_rect.height = 5;
GEGL_SAMPLER (self)->interpolate_format = babl_format ("RaGaBaA float");
}
Modified: trunk/gegl/buffer/gegl-sampler-yafr.c
==============================================================================
--- trunk/gegl/buffer/gegl-sampler-yafr.c (original)
+++ trunk/gegl/buffer/gegl-sampler-yafr.c Thu Mar 26 18:27:49 2009
@@ -133,7 +133,10 @@
* The computation stencil is 4x4, and sticks out one column to the
* left and one row above the requested integer position:
*/
- GEGL_SAMPLER (self)->context_rect = (GeglRectangle){-1,-1,4,4};
+ GEGL_SAMPLER (self)->context_rect.x = -1;
+ GEGL_SAMPLER (self)->context_rect.y = -1;
+ GEGL_SAMPLER (self)->context_rect.width = 4;
+ GEGL_SAMPLER (self)->context_rect.height = 4;
GEGL_SAMPLER (self)->interpolate_format = babl_format ("RaGaBaA float");
}
Modified: trunk/gegl/operation/gegl-operation-temporal.c
==============================================================================
--- trunk/gegl/operation/gegl-operation-temporal.c (original)
+++ trunk/gegl/operation/gegl-operation-temporal.c Thu Mar 26 18:27:49 2009
@@ -138,6 +138,8 @@
gegl_operation_temporal_init (GeglOperationTemporal *self)
{
GeglOperationTemporalPrivate *priv;
+ GeglRectangle rect = { 0, 0, 4096, 4096*600 };
+
self->priv = GEGL_OPERATION_TEMPORAL_GET_PRIVATE(self);
priv=self->priv;
priv->count = 0;
@@ -150,7 +152,7 @@
* input
*/
priv->frame_store =
- gegl_buffer_new (&((GeglRectangle){0,0,4096,4096*600}), babl_format ("RGB u8"));
+ gegl_buffer_new (&rect, babl_format ("RGB u8"));
;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]