From: johncoswell Date: Fri, 18 Apr 2008 01:31:11 +0000 (+0000) Subject: Small Paint Bucket optimization for creating GrayMap X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4412e32218c73f3f6637e40417f7823ab96ecdb5;p=inkscape.git Small Paint Bucket optimization for creating GrayMap --- diff --git a/src/flood-context.cpp b/src/flood-context.cpp index f58ab0830..ee7f1b0da 100644 --- a/src/flood-context.cpp +++ b/src/flood-context.cpp @@ -410,9 +410,12 @@ static void do_trace(bitmap_coords_info bci, guchar *trace_px, SPDesktop *deskto GrayMap *gray_map = GrayMapCreate(bci.width, bci.height); for (unsigned int y = 0; y < bci.height ; y++) { + unsigned long *gray_map_t = gray_map->rows[y]; + trace_t = get_pixel(trace_px, 0, y, bci.width); for (unsigned int x = 0; x < bci.width ; x++) { - gray_map->setPixel(gray_map, x, y, is_pixel_colored(trace_t) ? GRAYMAP_BLACK : GRAYMAP_WHITE); + *gray_map_t = is_pixel_colored(trace_t) ? GRAYMAP_BLACK : GRAYMAP_WHITE; + gray_map_t++; trace_t += 4; } }