mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-28 02:30:05 +00:00
Rewrite of software renderer to improve vertical line drawing speed.
This commit is contained in:
parent
266494a1b9
commit
9a55b0291e
12 changed files with 2602 additions and 1502 deletions
|
|
@ -1888,26 +1888,20 @@ private:
|
|||
|
||||
startTimer (repaintTimerPeriod);
|
||||
|
||||
LowLevelGraphicsSoftwareRenderer context (*image);
|
||||
RectangleList adjustedList (originalRepaintRegion);
|
||||
adjustedList.offsetAll (-totalArea.getX(), -totalArea.getY());
|
||||
LowLevelGraphicsSoftwareRenderer context (*image, -totalArea.getX(), -totalArea.getY(), adjustedList);
|
||||
|
||||
context.setOrigin (-totalArea.getX(), -totalArea.getY());
|
||||
|
||||
if (context.clipToRectangleList (originalRepaintRegion))
|
||||
if (peer->depth == 32)
|
||||
{
|
||||
if (peer->depth == 32)
|
||||
{
|
||||
RectangleList::Iterator i (originalRepaintRegion);
|
||||
RectangleList::Iterator i (originalRepaintRegion);
|
||||
|
||||
while (i.next())
|
||||
{
|
||||
const Rectangle<int>& r = *i.getRectangle();
|
||||
image->clear (r.getX() - totalArea.getX(), r.getY() - totalArea.getY(), r.getWidth(), r.getHeight());
|
||||
}
|
||||
}
|
||||
|
||||
peer->handlePaint (context);
|
||||
while (i.next())
|
||||
image->clear (*i.getRectangle() - totalArea.getPosition());
|
||||
}
|
||||
|
||||
peer->handlePaint (context);
|
||||
|
||||
if (! peer->maskedRegion.isEmpty())
|
||||
originalRepaintRegion.subtract (peer->maskedRegion);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue