X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdisplay%2Fnr-filter.cpp;h=07c2649289b128fa9b9657ab3cd171ce4b390251;hb=daa122e632b9c06a0b6fb8971a41b2886d0e99cc;hp=f00a1ef6b3c922183250b0d911be3f33388a40f5;hpb=6a438bf9ac749132f14198330626ef408d62cbeb;p=inkscape.git diff --git a/src/display/nr-filter.cpp b/src/display/nr-filter.cpp index f00a1ef6b..07c264928 100644 --- a/src/display/nr-filter.cpp +++ b/src/display/nr-filter.cpp @@ -29,6 +29,10 @@ #include "libnr/nr-scale.h" #include "svg/svg-length.h" #include "sp-filter-units.h" +#if defined (SOLARIS_2_8) +#include "round.h" +using Inkscape::round; +#endif //#include "display/nr-arena-shape.h" @@ -161,7 +165,7 @@ int Filter::render(NRArenaItem const *item, NRPixBlock *pb) nr_pixblock_setup_fast(in, pb->mode, min_x, min_y, max_x, max_y, true); - if (in->data.px == NULL) // memory allocation failed + if (in->size != NR_PIXBLOCK_SIZE_TINY && in->data.px == NULL) // memory allocation failed return 0; transform_nearest(in, pb, itrans); } else if (_x_pixels >= 0) { @@ -191,7 +195,7 @@ int Filter::render(NRArenaItem const *item, NRPixBlock *pb) } if (y_len < 1) y_len = 1; nr_pixblock_setup_fast(in, pb->mode, 0, 0, x_len, y_len, true); - if (in->data.px == NULL) // memory allocation failed + if (in->size != NR_PIXBLOCK_SIZE_TINY && in->data.px == NULL) // memory allocation failed return 0; scale_bicubic(in, pb); scale res_scaling(x_len / (double)(pb->area.x1 - pb->area.x0), @@ -202,7 +206,7 @@ int Filter::render(NRArenaItem const *item, NRPixBlock *pb) nr_pixblock_setup_fast(in, pb->mode, pb->area.x0, pb->area.y0, pb->area.x1, pb->area.y1, true); - if (in->data.px == NULL) // memory allocation failed + if (in->size != NR_PIXBLOCK_SIZE_TINY && in->data.px == NULL) // memory allocation failed return 0; nr_blit_pixblock_pixblock(in, pb); }