--- poppler-git-02feb11-level1bug-prof/splash/Splash.cc- 2011-02-02 06:40:53.000000000 +0100 +++ poppler-git-02feb11-level1bug-prof/splash/Splash.cc 2011-02-04 23:16:46.840761941 +0100 @@ -758,8 +758,39 @@ pipeSetXY(pipe, x0, y); if (noClip) { - for (x = x0; x <= x1; ++x) { - pipeRun(pipe); + if (bitmap->mode == splashModeRGB8 && !pipe->pattern && + pipe->noTransparency && !state->blendFunc && !state->softMask && !pipe->usesShape) { + for (x = x0; x <= x1; ++x) { + // pipeRun(pipe); + *pipe->destColorPtr++ = pipe->cSrc[0]; + *pipe->destColorPtr++ = pipe->cSrc[1]; + *pipe->destColorPtr++ = pipe->cSrc[2]; + if (pipe->destAlphaPtr) { + *pipe->destAlphaPtr++ = 255; + } + ++pipe->x; + } + } else +#if SPLASH_CMYK + if (bitmap->mode == splashModeCMYK8 && !pipe->pattern && + pipe->noTransparency && !state->blendFunc && !state->softMask && !pipe->usesShape) { + for (x = x0; x <= x1; ++x) { + // pipeRun(pipe); + *pipe->destColorPtr++ = pipe->cSrc[0]; + *pipe->destColorPtr++ = pipe->cSrc[1]; + *pipe->destColorPtr++ = pipe->cSrc[2]; + *pipe->destColorPtr++ = pipe->cSrc[3]; + if (pipe->destAlphaPtr) { + *pipe->destAlphaPtr++ = 255; + } + ++pipe->x; + } + } else +#endif + { + for (x = x0; x <= x1; ++x) { + pipeRun(pipe); + } } updateModX(x0); updateModX(x1); @@ -3546,10 +3577,10 @@ case splashModeMono1: for (y = 0; y < h; ++y) { p = &bitmap->data[(yDest + y) * bitmap->rowSize + (xDest >> 3)]; + sp = &src->data[(ySrc + y) * bitmap->rowSize + (xSrc >> 3)]; mask = 0x80 >> (xDest & 7); for (x = 0; x < w; ++x) { - src->getPixel(xSrc + x, ySrc + y, pixel); - if (pixel[0]) { + if (sp[0] & (0x80 >> (x & 7))) { *p |= mask; } else { *p &= ~mask; @@ -3557,6 +3588,7 @@ if (!(mask >>= 1)) { mask = 0x80; ++p; + ++sp; } } } @@ -3564,9 +3596,9 @@ case splashModeMono8: for (y = 0; y < h; ++y) { p = &bitmap->data[(yDest + y) * bitmap->rowSize + xDest]; + sp = &src->data[(ySrc + y) * bitmap->rowSize + xSrc]; for (x = 0; x < w; ++x) { - src->getPixel(xSrc + x, ySrc + y, pixel); - *p++ = pixel[0]; + *p++ = *sp++; } } break; @@ -3599,12 +3631,12 @@ case splashModeCMYK8: for (y = 0; y < h; ++y) { p = &bitmap->data[(yDest + y) * bitmap->rowSize + 4 * xDest]; + sp = &src->data[(ySrc + y) * bitmap->rowSize + 4 * xSrc]; for (x = 0; x < w; ++x) { - src->getPixel(xSrc + x, ySrc + y, pixel); - *p++ = pixel[0]; - *p++ = pixel[1]; - *p++ = pixel[2]; - *p++ = pixel[3]; + *p++ = *sp++; + *p++ = *sp++; + *p++ = *sp++; + *p++ = *sp++; } } break;