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

Fixes to allow OpenGL contexts to be attached to a top-level component.

This commit is contained in:
jules 2012-04-03 13:31:27 +01:00
parent d1f841b1ec
commit 074a8c05dd
2 changed files with 10 additions and 9 deletions

View file

@ -1810,6 +1810,14 @@ void Component::internalRepaintUnchecked (const Rectangle<int>& area, const bool
{
if (flags.visibleFlag)
{
if (cachedImage != nullptr)
{
if (isEntireComponent)
cachedImage->invalidateAll();
else
cachedImage->invalidate (area);
}
if (flags.hasHeavyweightPeerFlag)
{
// if component methods are being called from threads other than the message
@ -1823,14 +1831,6 @@ void Component::internalRepaintUnchecked (const Rectangle<int>& area, const bool
}
else
{
if (cachedImage != nullptr)
{
if (isEntireComponent)
cachedImage->invalidateAll();
else
cachedImage->invalidate (area);
}
if (parentComponent != nullptr)
parentComponent->internalRepaint (ComponentHelpers::convertToParentSpace (*this, area));
}