Commit Graph

358 Commits

Author SHA1 Message Date
ec2d5647c0 app: remove gimp_drawable_type_with_alpha() 2012-05-02 17:50:57 +02:00
3c4f9d55ed app: use the new functions added with the last commit 2012-05-02 17:50:57 +02:00
2b18645fb5 app: use gimp_drawable_get_base_type() instead of GIMP_IMAGE_TYPE_BASE_TYPE() 2012-05-02 17:50:57 +02:00
f6f7d53020 app: add gimp_drawable_get_base_type() 2012-05-02 17:50:57 +02:00
afe8eaf256 app: remove GimpImageType based API and macro junk 2012-05-02 17:50:57 +02:00
368ae01c86 app: don't special case the FS wrt its visibility in the layer stack
Its source node produces nothingness anyway, so it can be safely
plugged in. More FS special code gone \o/.
2012-05-02 17:50:54 +02:00
8cca4c51ad app: use gimp_gegl_node_set_layer_mode() to configure the FS' mode node 2012-05-02 17:50:54 +02:00
6efd812d08 app: s/GIMP_GEGL_RECT/GEGL_RECTANGLE/
Defining GeglRectangle inline is so useful that it has been added to
GEGL.
2012-05-02 17:50:52 +02:00
8dfea70191 app: fix GIMP_TIMER_END() to take an arbitrary string
not a string constant that only works in the C preprocessor, and add a
timer to gimp_apply_operation().
2012-05-02 17:50:43 +02:00
1a34171e68 app: remove the legacy option in gimp_drawable_scale() 2012-05-02 17:50:42 +02:00
87b7af7fa5 app: remove drawable->private->format, its buffer has a format already
Also, make group layer type conversion much less hackish by using the
same kind of temporary states that are used for reallocating its
projection on size change.
2012-05-02 17:50:42 +02:00
2a853cd1ee app: remove GimpPickable::get_bytes() 2012-05-02 17:50:42 +02:00
5e754a9641 app: remove GimpPickable::get_image_type() 2012-05-02 17:50:42 +02:00
76546f7e7c rename lanczos to lohalo
GEGL had a broken lanczos implementation, the lohalo implementation is better
anyways (at least when passed a proper scale matrix).
2012-05-02 17:50:38 +02:00
ee97c1f4ff app: correct usage of babl formats
GIMP was doing evil hacks lying to GEGL about it's pixels being in a linear
color space when they are not. This causes incorrect rendering, makes gaussian
blur misbehave etc.

The legacy projection modes should be implemented using the same 2.2 gamma
formats that are correct to specify for sRGB data. (for proper color
management in higher bitdepths; icc backend babl formats should be used.)

For the old image modes correct babl formats are:

R'G'B'A u8  -  8 bit RGB with 2.2 gamma (sRGB) with linear alpha component
R'G'B' u8   -  8 bit RGB with 2.2 gamma (sRGB)
Y'A u8      -  8 bit Grayscale with 2.2 gamma with linear alpha component
Y' u8       -  8 bit Grayscale with 2.2 gamma

Y u8        -  8 bit linear data, used for masks/channels
A u8        -  8 bit linear alpha

-----------------------------------------------

RGBA float  -     32bit floating point linear light RGB
RaGaBaA float  -  32bit floating point linear light RGB, premultiplied alpha
                  to be used for processing that needs to scale by the alpha,
                  (blurs, resampling etc)
R'G'B'A float  -  32bit floating point sRGB with gamma, to be used where
                  the result depends on being closer to perceptual when
                  processing, can be used a cheaper alternative to CIE Lab
                  based modes.

-----------------------------------------------

The legacy layer modes should use the formats with gamma 2.2 only for loading
and rendering legacy XCF files correctly, in the brave new world compositing
should most likely be done in linear light with "RGBA float" and even better
"RaGaBaA float" like GEGL does for porter duff and other compositing modes.

The ability to chose the legacy layer modes should probably be hidden from the
user unless an old .xcf has been opened.
2012-05-02 17:50:38 +02:00
97f6061a91 app: remove some obsolete legacy includes from gimpdrawable.c 2012-05-02 17:46:16 +02:00
f68c3c7051 app: adapt to API changes in GEGL 2012-05-02 17:46:15 +02:00
2b6b5a8ada app: remove unused base/ includes 2012-05-02 17:46:15 +02:00
be853cd239 app: remove "gboolean linear" from all apply_operation APIs
thes were all unused and we want to get rid of that anyway.
2012-05-02 17:46:13 +02:00
7223af17a2 app: completely port GimpDrawable::apply_region()'s API to GeglBuffer
and pass lots of coords that were hidden inside PixelRegions
explicitly.
2012-05-02 17:46:12 +02:00
061e044e0a app: change GimpDrawable::replace_region() by ::replace_buffer() 2012-05-02 17:46:12 +02:00
4bcddb04a2 app: turn gimp_drawable_apply_buffer()'s src1_tiles argument into base_buffer 2012-05-02 17:46:11 +02:00
579d894778 app: turn GimpDrawable::apply_region() into ::apply_buffer()
and GimpDrawableUndo.src2_tiles into applied_buffer.
2012-05-02 17:46:11 +02:00
ea8eebcd47 app: support TempBuf backed buffer in gimp_drawable_apply_buffer() 2012-05-02 17:46:11 +02:00
d9825e0aea app: use gimp_drawable_apply_buffer() for legacy FS composition 2012-05-02 17:46:11 +02:00
99ae46b4ed app: turn the drawable's shadow tiles into a shadow buffer 2012-05-02 17:46:10 +02:00
dbc881376e app: add gimp_drawable_apply_buffer() and port edit, bucket fill, stroke 2012-05-02 17:46:10 +02:00
904a35d722 app: remove width, height from GimpDrawableUndo and GimpDrawable::swap_tiles()
because we always store/swap a buffer of the actual size now.
2012-05-02 17:46:09 +02:00
a0c1007b66 app: port GimpDrawableUndo, GimpDrawable::push_undo() and ::swap_tiles()
which gets rid of the manual implementation of sparse undo buffers,
but GEGL will take care of proper COW here soo enough.
2012-05-02 17:46:08 +02:00
153f56655a app: rename the buffer's tile_source_node to buffer_source_node 2012-05-02 17:46:08 +02:00
a982a5ea3a app: change GimpDrawable::get_tiles() to ::get_buffer()
and shuffle code around because the other API is now virtual.
2012-05-02 17:46:07 +02:00
f8f4455459 app: change GimpDrawable::set_tiles() to ::set_buffer()
and remove the "type" argument, GeglBuffers have a format.
2012-05-02 17:46:07 +02:00
9d260c380b app: completely port gimpdrawable-convert.c to GeglBuffer 2012-05-02 17:46:07 +02:00
c4f88e5166 app: port gimp_drawable_scale() to gimp_drawable_set_buffer_full() 2012-05-02 17:46:07 +02:00
9774bb62e7 app: use hard-edges = TRUE when GEGL-scaling drawables 2012-05-02 17:46:07 +02:00
d5795c0081 app: use a GeglBuffer instead of TileManager as storage in drawables \o/ 2012-05-02 17:46:06 +02:00
765c2cfea2 app: replace GimpDraable's type by a Babl format
and change gimp_drawable_new() and all gimp_layer_new() variants to
take formats instead of types.
2012-05-02 17:46:06 +02:00
525a405270 app: port the entire transform API from TileManager to GeglBuffer 2012-05-02 17:46:06 +02:00
b89a912cc7 app: use gimp_drawable_set_buffer() in a few places 2012-05-02 17:46:05 +02:00
f8b1372038 app: make use of GIMP_GEGL_RECT in more places 2012-05-02 17:46:05 +02:00
6274b269ca app: add gimp_drawable_set_buffer() and set_buffer_full() 2012-05-02 17:46:05 +02:00
fe3220ae6f app: remove write property of GeglBuffer backend 2012-05-02 17:46:05 +02:00
0bcae125b5 app: merge gimp_drawable_get_read_buffer() and get_write_buffer()
into get_buffer(). The loss of zero copy will be compensated soon.
2012-05-02 17:46:04 +02:00
69c52173fb app: change gimp_gegl_color_set_rgba() to gimp_gegl_color_new()
which saves one line of code in every single use case.
2012-05-02 17:46:03 +02:00
58dfa962a1 app: port simple rotating and flipping to GEGL
Which requires making the entire copy/paste apparatus aware of the
Babl format of the passed around tile managers.
2012-05-02 17:46:02 +02:00
62a23f8a89 app: port drawable'e and projection's get_pixel_at() to gegl_buffer_sample() 2012-05-02 17:46:02 +02:00
906176831d app: add image API to get Babl formats based on GimpImageType
because we often have only a type and an image, but no drawable
(yet) to ask for its types.
2012-05-02 17:46:00 +02:00
b05e213d6d app: stop using gegl_color_set_pixel() with hand-transformed pixels
instead, simply use rgb values and rely on the subsequent
gegl_buffer_set_color() to do the right thing because the buffer know
their indexed format now.
2012-05-02 17:45:59 +02:00
75467664be app: enable GEGL scaling of indexed drawables in gimp_drawable_scale()
by simply using gimp_drawable_apply_operation_to_buffer() and the
right Babl format on the buffer.
2012-05-02 17:45:58 +02:00
9ecdea30b8 app: add gimp_drawable_get_format_without_alpha() 2012-05-02 17:45:58 +02:00