• Ell's avatar
    app: layer mode code shuffling · 71bbd88e
    Ell authored
    Commit 3635cf04 moved the special
    handling of bottom-layer compositing to GimpOperationLayerMode.
    This required giving the op more control over the process()
    function of its subclasses.  As a temporary workaround, the commit
    bypassed the subclasses entirely, using "gimp:layer-mode" for all
    modes.  This is the reckoning :)
    
    Add a process() virtual function to GimpOperationLayerMode, which
    its subclasses should override instead of
    GeglOperationPointComposer3's process() functions.  Reinstate the
    subclasses (by returning the correct op in
    gimp_layer_mode_get_oepration()), and have them override this
    function.
    
    Improve the way gimp_operation_layer_mode_process() dispatches to
    the actual process function, to slightly lower its overhead and
    fix some thread-safety issues.
    
    Remove the "function" field of the layer-mode info array, and have
    gimp_layer_mode_get_function() return the
    GimpOperationLayerMode::process() function of the corresponding
    op's class (caching the result, to keep it cheap.)  This reduces
    redundancy, allows us to make the ops' process() functions private,
    and simplifies SSE dispatching (only used by NORMAL mode,
    currently.)
    
    Move the blend and composite functions of the non-specialized
    layer modes to gimpoperationlayermode-{blend,composite}.[hc],
    respectively, to improve code organization.
    
    Move the SSE2 composite functions to a separate file, so that they
    can be built as part of libapplayermodes_sse2, allowing
    libapplayermodes to be built without SSE2 compiler flags.  This
    allows building GIMP with SSE acceleration enabled, while running
    the resulting binary on a target with no SSE accelration.
    
    Add a "blend_function" field to the layer-mode info array, and use
    it to specify the blend function for the non-specialized modes.
    This replaces the separate switch() statement that we used
    previously.
    
    Remove the "affected_region" field of the layer-mode info array.
    We don't need it anymore, since we can go back to using
    GimpOperationLayerMode's virtual get_affected_region() function.
    
    Last but not least, a bunch of code cleanups and consistency
    adjustments.
    71bbd88e
Name
Last commit
Last update
app Loading commit data...
build Loading commit data...
cursors Loading commit data...
data Loading commit data...
desktop Loading commit data...
devel-docs Loading commit data...
docs Loading commit data...
etc Loading commit data...
icons Loading commit data...
libgimp Loading commit data...
libgimpbase Loading commit data...
libgimpcolor Loading commit data...
libgimpconfig Loading commit data...
libgimpmath Loading commit data...
libgimpmodule Loading commit data...
libgimpthumb Loading commit data...
libgimpwidgets Loading commit data...
m4macros Loading commit data...
menus Loading commit data...
modules Loading commit data...
plug-ins Loading commit data...
po Loading commit data...
po-libgimp Loading commit data...
po-plug-ins Loading commit data...
po-python Loading commit data...
po-script-fu Loading commit data...
po-tags Loading commit data...
po-tips Loading commit data...
themes Loading commit data...
tools Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
.kateconfig Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog.pre-1-0 Loading commit data...
ChangeLog.pre-1-2 Loading commit data...
ChangeLog.pre-2-0 Loading commit data...
ChangeLog.pre-2-2 Loading commit data...
ChangeLog.pre-2-4 Loading commit data...
ChangeLog.pre-2-6 Loading commit data...
ChangeLog.pre-git Loading commit data...
HACKING Loading commit data...
INSTALL.in Loading commit data...
LICENSE Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
NEWS.pre-2-0 Loading commit data...
NEWS.pre-2-2 Loading commit data...
NEWS.pre-2-4 Loading commit data...
NEWS.pre-2-6 Loading commit data...
NEWS.pre-2-8 Loading commit data...
README Loading commit data...
README.i18n Loading commit data...
acinclude.m4 Loading commit data...
authors.dtd Loading commit data...
authors.xml Loading commit data...
authors.xsl Loading commit data...
autogen.sh Loading commit data...
config.h.win32 Loading commit data...
configure.ac Loading commit data...
gimp-zip.in Loading commit data...
gimp.doap Loading commit data...
gimp.pc.in Loading commit data...
gimpthumb.pc.in Loading commit data...
gimpui.pc.in Loading commit data...