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

Rendering optimisation when filling off-screen paths

This commit is contained in:
jules 2015-12-22 10:26:03 +00:00
parent beee911a6d
commit 6f092d602d

View file

@ -2266,7 +2266,13 @@ public:
void fillPath (const Path& path, const AffineTransform& t)
{
if (clip != nullptr)
fillShape (new EdgeTableRegionType (clip->getClipBounds(), path, transform.getTransformWith (t)), false);
{
const AffineTransform trans (transform.getTransformWith (t));
const Rectangle<int> clipRect (clip->getClipBounds());
if (path.getBoundsTransformed (trans).getSmallestIntegerContainer().intersects (clipRect))
fillShape (new EdgeTableRegionType (clipRect, path, trans), false);
}
}
void fillEdgeTable (const EdgeTable& edgeTable, const float x, const int y)