- compile clean for gcc

git-svn-id: http://moon:8086/svn/software/trunk/projects/mpsk_rx_gui@11 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2014-07-19 13:02:37 +00:00
parent 00ecb0a6c1
commit 18b4fa3b5c
15 changed files with 143 additions and 113 deletions
@@ -145,6 +145,11 @@ public:
{
ScopedPointer<MessageManagerLock> mmLock;
const Rectangle<int> screenBounds (component.getTopLevelComponent()->getScreenBounds());
if (lastScreenBounds != screenBounds)
updateViewportSize (false);
const bool isUpdating = needsUpdate.compareAndSetBool (0, 1);
if (context.renderComponents && isUpdating)
@@ -156,8 +161,6 @@ public:
mmLock = new MessageManagerLock (this); // need to acquire this before locking the context.
if (! mmLock->lockWasGained())
return false;
updateViewportSize (false);
}
if (! context.makeActive())
@@ -216,19 +219,13 @@ public:
}
}
void checkViewportBounds()
{
const Rectangle<int> screenBounds (component.getTopLevelComponent()->getScreenBounds());
if (lastScreenBounds != screenBounds)
updateViewportSize (true);
}
void paintComponent()
{
// you mustn't set your own cached image object when attaching a GL context!
jassert (get (component) == this);
updateViewportSize (false);
if (! ensureFrameBufferSize())
return;
@@ -466,8 +463,7 @@ void OpenGLContext::NativeContext::renderCallback()
#endif
//==============================================================================
class OpenGLContext::Attachment : public ComponentMovementWatcher,
private Timer
class OpenGLContext::Attachment : public ComponentMovementWatcher
{
public:
Attachment (OpenGLContext& c, Component& comp)
@@ -568,14 +564,10 @@ private:
comp.setCachedComponentImage (newCachedImage);
newCachedImage->start(); // (must wait until this is attached before starting its thread)
newCachedImage->updateViewportSize (true);
startTimer (400);
}
void detach()
{
stopTimer();
Component& comp = *getComponent();
#if JUCE_MAC
@@ -588,12 +580,6 @@ private:
comp.setCachedComponentImage (nullptr);
context.nativeContext = nullptr;
}
void timerCallback() override
{
if (CachedImage* const cachedImage = CachedImage::get (*getComponent()))
cachedImage->checkViewportBounds();
}
};
//==============================================================================