index ab9d2e68b9b800ca18510886fd171fada18a00c2..74ded2ae0bf24731cc6fe5ae92d525360d7bf9c2 100644 (file)
#include <glib.h>
#include <cmath>
-#if defined (SOLARIS_2_8)
+#if defined (SOLARIS) && (SOLARIS == 8)
#include "round.h"
using Inkscape::round;
#endif
#include "display/nr-filter-utils.h"
+#include "libnr/nr-blit.h"
#include "libnr/nr-pixblock.h"
#include "libnr/nr-matrix.h"
return;
}
+ bool free_from_on_exit = false;
+ if (from->mode != to->mode){
+ NRPixBlock *o_from = from;
+ from = new NRPixBlock;
+ nr_pixblock_setup_fast(from, to->mode, o_from->area.x0, o_from->area.y0, o_from->area.x1, o_from->area.y1, false);
+ nr_blit_pixblock_pixblock(from, o_from);
+ free_from_on_exit = true;
+ }
+
// Precalculate sizes of source and destination pixblocks
int from_width = from->area.x1 - from->area.x0;
int from_height = from->area.y1 - from->area.y0;
NR_PIXBLOCK_PX(to)[to_y * to->rs + to_x * 4 + 3] = result.a;
}
}
+ if (free_from_on_exit) {
+ nr_pixblock_release(from);
+ delete from;
+ }
}
/** Calculates cubically interpolated value of the four given pixel values.
return;
}
+ bool free_from_on_exit = false;
+ if (from->mode != to->mode){
+ NRPixBlock *o_from = from;
+ from = new NRPixBlock;
+ nr_pixblock_setup_fast(from, to->mode, o_from->area.x0, o_from->area.y0, o_from->area.x1, o_from->area.y1, false);
+ nr_blit_pixblock_pixblock(from, o_from);
+ free_from_on_exit = true;
+ }
+
// Precalculate sizes of source and destination pixblocks
int from_width = from->area.x1 - from->area.x0;
int from_height = from->area.y1 - from->area.y0;
}
}
}
+ if (free_from_on_exit) {
+ nr_pixblock_release(from);
+ delete from;
+ }
}
} /* namespace NR */