1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-15 00:24:19 +00:00

Big rewrite of the LowLevelGraphicsSoftwareRenderer class, adding internal support for complex clipping regions - this will temporarily make font rendering quite slow, until it gets re-optimised for this new design. Changed the Image class to remove the lockPixelData methods, and replaced these with an object Image::BitmapData, which is easier to use.

This commit is contained in:
Julian Storer 2009-11-26 21:36:45 +00:00
parent 9fc4b6d822
commit 6fdde63a63
25 changed files with 3542 additions and 4458 deletions

View file

@ -595,17 +595,16 @@ public:
const uint32 bShiftL = jmax (0, getShiftNeeded (bMask));
const uint32 bShiftR = jmax (0, -getShiftNeeded (bMask));
int ls, ps;
const uint8* const pixels = lockPixelDataReadOnly (0, 0, getWidth(), getHeight(), ls, ps);
const Image::BitmapData srcData (*this, 0, 0, getWidth(), getHeight());
for (int y = sy; y < sy + dh; ++y)
{
const uint8* p = pixels + y * ls + sx * ps;
const uint8* p = srcData.getPixelPointer (sx, y);
for (int x = sx; x < sx + dw; ++x)
{
const PixelRGB* const pixel = (const PixelRGB*) p;
p += ps;
p += srcData.pixelStride;
XPutPixel (xImage, x, y,
(((((uint32) pixel->getRed()) << rShiftL) >> rShiftR) & rMask)
@ -613,8 +612,6 @@ public:
| (((((uint32) pixel->getBlue()) << bShiftL) >> bShiftR) & bMask));
}
}
releasePixelDataReadOnly (pixels);
}
// blit results to screen.