Re: [Gimp-developer] Friends of GIMP

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

 



kevin:
you misunderstood.
it makes sense to store the Palettes as a list.. but not the contents of the 
palettes. what i meant was that each GimpPalette has a GList of 
GimpPaletteEntries. 

GArray-based allocation would be one way to optimize memory allocation, which 
is currently unnecessarily inefficient(2 mallocs per each palette entry?!.) 
and slows the palette editing down significantly for large palettes (>256).
it may be able to eliminate the 'position' attribute for each palette entry, 
which as noted in gimppalette.h is EEK*.

next best would be allocating the GimpPaletteEntries using a GMemChunk while 
ordering them using the current GList arrangements.
this appears straightforward and i could probably make a patch for it easily.

* and appears to be because there is a widget for each color in the gimp 
palette editor, rather than a single widget for the entire grid. which i 
don't see a good rationale for either. maybe its just a hack that avoids 
having to calculate which color was clicked on using the realized widget 
dimensions.

---
david gowers


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux