Re: [Gegl-developer] in-place buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 21, 2003 at 04:55:31PM -0800, Daniel Rogers wrote:
> As for a scheme, would it be worthwhile to simply set a property (like 
> "in-place") of the ImageData object to true or false, and then insist 
> that every Op know how to deal with objects where the destination may 
> overlap with the source?

I dont think you would put it in ImageData, cause each op has
a different ImageData object for each image input and output it 
has. The Image value the ImageData object holds is what is 
being passed along.  

But I think it might be an Op (or subclass of Op) property. 

So that in the case where the op can operate in place (not
blurs for example) when the op goes to create its output
image buffer (in validate_outputs) it doesnt actually create
an image buffer, but just makes sure that the appropriate
image from the input ImageData is used in the output 
ImageData as well.

> For binary ops, you could insist that only one Image be operated on in 
> place, or assume the left one is in-place if they both try to be. 
> However, if the code is overlap safe, you could take care of the 
> overlapping regions in the instantiation init code, simply setting 
> destination to the correct input.
> 

Comp ops are good examples of ops that can happen in-place. 
A series of images comped onto a background could all get 
computed in the background image buffer. 

Calvin

[Index of Archives]     [Yosemite News]     [Yosemite Photos]     [gtk]     [GIMP Users]     [KDE]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux