Commit Graph

885 Commits

Author SHA1 Message Date
Michael Natterer 42a5f01be3 app: rename TempBuf to GimpTempBuf 2012-05-02 17:51:00 +02:00
Michael Natterer 7441a1f6f7 app: turn the TempBuf's "bytes" into "format" and port everything to it 2012-05-02 17:50:59 +02:00
Michael Natterer ff86f85744 app: remove x, y and color parameters from temp_buf_new()
Fix the places that passed the color by either temp_buf_data_clear()
or memset(), and assign x and y manually, they are going to vanish
completely soon.
2012-05-02 17:50:58 +02:00
Michael Natterer 0e9581b956 app: pass the paint area's coords to gimp_brush_core_color_area_with_pixmap()
They are no longer stored in the paint area TempBuf.
2012-05-02 17:50:58 +02:00
Michael Natterer 36fb008197 app: port GimpPaintCore's paste and replase APIs to GeglBuffer 2012-05-02 17:50:54 +02:00
Michael Natterer f07f01664e app: heal the paint_buffer directly, without an intermediate copy 2012-05-02 17:50:54 +02:00
Michael Natterer 1c60024250 app: port GimpHeal to GEGL, using insane buffer casting tricks 2012-05-02 17:50:53 +02:00
Michael Natterer 441120b6b5 app: use gimp_gegl_dodgeburn() in GimpDodgeBurn 2012-05-02 17:50:53 +02:00
Øyvind Kolås 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
Michael Natterer a76f44a9de app: port GimpConvolve to gimp_gegl_convolve() 2012-05-02 17:50:52 +02:00
Michael Natterer 49dcc3d78a app: remove obsolete include 2012-05-02 17:50:51 +02:00
Michael Natterer c0fdfbd226 app: port GimpInk blob rendering to GeglBufferIterator 2012-05-02 17:50:51 +02:00
Michael Natterer c5c555c834 app: add "take_ownerspip" param to gimp_temp_buf_create_buffer()
and get rid of some more intermediate buffer creation/destruction, and
some redundant temp_buf_free() plus g_object_unref().
2012-05-02 17:50:51 +02:00
Michael Natterer 7b5252ac54 app: replace GimpPaintCore::get_paint_area() by ::get_paint_buffer()
and remove the public TempBuf based get_paint_area() API.
2012-05-02 17:50:51 +02:00
Michael Natterer b4996f2605 app: port GimpSourceCore and its classes to painting to the paint_buffer 2012-05-02 17:50:51 +02:00
Michael Natterer 0c8cf5ef73 app: more GEGL in gimp_smudge_motion() 2012-05-02 17:50:50 +02:00
Michael Natterer 60ae55f87b app: don't return bogus paint buffers if get_paint_area() returned NULL 2012-05-02 17:50:50 +02:00
Michael Natterer 70c6885e7e app: replace GimpSmudge's accum buffer by a TempBuf 2012-05-02 17:50:50 +02:00
Michael Natterer 4455d3e75d app: more GEGL in gimp_smudge_start() 2012-05-02 17:50:49 +02:00
Michael Natterer 1037c7e88b app: more GEGL in GimpDodgeBurn, still uses gimp_lut_process() 2012-05-02 17:50:49 +02:00
Michael Natterer 0da63f9526 app: port GimpConvolve to GEGL apart from the call to convolve_region() 2012-05-02 17:50:49 +02:00
Michael Natterer db0eb0f77c app: paint ink's color into the paint_buffer not the paint_area 2012-05-02 17:50:47 +02:00
Michael Natterer 9ac79ddc9c app: port paintbrush and eraser to paint to GEGL buffers 2012-05-02 17:50:47 +02:00
Michael Natterer 12ac0bea13 app: add gimp_paint_core_get_paint_buffer()
which is the same as gimp_paint_core_get_paint_area() but returns a
GeglBuffer to paint to, not a TempBuf.
2012-05-02 17:50:47 +02:00
Michael Natterer ab29daf758 app: remove unneeded includes from gimpairbush.c 2012-05-02 17:50:47 +02:00
Michael Natterer 1dbadb772d app: rename GimpPaintCore->canvas_buf to ->paint_area
because that's what it's called in public API. This has confused me
long enough now.
2012-05-02 17:50:46 +02:00
Michael Natterer 93009ef274 app: use gimp_temp_buf_create_buffer() all over the place
instead of creating linear buffers manually.
2012-05-02 17:50:46 +02:00
Michael Natterer 2957795372 app: add gimp_gegl_node_set_matrix() and use it instead of manual fiddling 2012-05-02 17:50:46 +02:00
Michael Natterer 2af0681587 app: don't create copies in gimp_paint_core_get_orig_image,proj()
and instead simply return the paint_core owned buffers. Also, move
graph creation and source buffer fiddling out of perspective clone's
inner loop, and set an area to be processed manually, which makes it
responsive again.
2012-05-02 17:50:46 +02:00
Michael Natterer 77c34a835b app: pattern-clone using gegl_buffer_set_pattern()
instead of tons and tons of legacy code.
2012-05-02 17:50:45 +02:00
Michael Natterer 7da52eb917 app: keep the transform graph around during one paint stroke 2012-05-02 17:50:45 +02:00
Michael Natterer 93864e3082 app: remove legacy includes 2012-05-02 17:50:45 +02:00
Michael Natterer 7c2c671703 app: make gimp_paint_core_get_orig_image,proj() return GeglBuffers
and change their users accordingly, getting rid of temp buffers and
useless copies.
2012-05-02 17:50:44 +02:00
Michael Natterer 2c4a59c1e5 app: fix buffer copying offsets in gimp_clone_motion()
so it works again at the image's borders.
2012-05-02 17:50:44 +02:00
Michael Natterer 95bf75d7a5 app: in GimpSourceCore's vfuncs, pass GeglBuffers around not PixelRegions
which simplifies a lot of code, just don't look at GimpHeal until
it's completely ported ;)
2012-05-02 17:50:44 +02:00
Michael Natterer eb2e658408 app: replace GimpPaintCore->canvas_buf by a GeglBuffer 2012-05-02 17:50:43 +02:00
Michael Natterer c9d0386e0c app: replace GimpPaintCore->saved_proj_tiles by a GeglBuffer 2012-05-02 17:50:43 +02:00
Michael Natterer 50d7242b87 app: remove gimp_image_transform_rgb()
and use gimp_rgba_get_pixel() instead.
2012-05-02 17:50:43 +02:00
Michael Natterer 7f437d7d53 app: remove gimp_image_get_foreground,background()
and use gimp_context_get_foreground,background_pixel() instead.
2012-05-02 17:50:43 +02:00
Michael Natterer 2a853cd1ee app: remove GimpPickable::get_bytes() 2012-05-02 17:50:42 +02:00
Michael Natterer f4a4aa2133 app: use a GEGL graph for perspective clone's transform
Horribly slow, but seems to work.
2012-05-02 17:50:41 +02:00
Michael Natterer 867da8f293 app: add gimp_context_get_foreground,background_pixel()
which takes a Babl format to convert from/to.
Include <gegl.h> in a million places.
2012-05-02 17:50:41 +02:00
Michael Natterer 39cca4aabd app: more GimpImageType -> Babl 2012-05-02 17:50:40 +02:00
Øyvind Kolås 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
Michael Natterer 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
Michael Natterer 061e044e0a app: change GimpDrawable::replace_region() by ::replace_buffer() 2012-05-02 17:46:12 +02:00
Michael Natterer 3bb973f24b app: pass the right undo buffer and extents to gimp_drawable_push_undo()
the coords need to be in drawable bounds now that we got rid of the
weird sparse logic.
2012-05-02 17:46:11 +02:00
Michael Natterer 4bcddb04a2 app: turn gimp_drawable_apply_buffer()'s src1_tiles argument into base_buffer 2012-05-02 17:46:11 +02:00
Michael Natterer ca734f91b7 app: port gimp_paint_core_paste() to gimp_drawable_apply_buffer()
using the new TempBuf-GeglBuffer.
2012-05-02 17:46:11 +02:00
Michael Natterer 6c59c45612 app: replace GimpPaintCore's undo_tiles by a GeglBuffer
and simply use a dumb straight copy of the drawable, it's GEGL's job
to do proper COW.
2012-05-02 17:46:10 +02:00