index ddb4c4ee2652a5a53f4cb374a9be910f510167cf..39c82daf6ed9ba5808f70514afd1b85b4c6efacc 100644 (file)
#include "display/nr-filter-utils.h"
#include "libnr/nr-pixblock.h"
+#include "libnr/nr-blit.h"
namespace NR {
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;
+ }
+
}
void scale_bicubic_alpha(NRPixBlock *to, NRPixBlock *from)