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

ComponentPeer::VBlankListener: Add timestamp parameter to the vblank callback

This commit is contained in:
attila 2024-10-03 10:58:51 +02:00
parent 4bc2952419
commit d9a3efd3cb
11 changed files with 88 additions and 33 deletions

View file

@ -420,7 +420,7 @@ public:
void setIcon (const Image& newIcon) override;
StringArray getAvailableRenderingEngines() override { return StringArray ("CoreGraphics Renderer"); }
void displayLinkCallback();
void displayLinkCallback (double timestampSec);
void drawRect (CGRect);
void drawRectWithContext (CGContextRef, CGRect);
@ -768,7 +768,7 @@ MultiTouchMapper<UITouch*> UIViewComponentPeer::currentTouches;
- (void) displayLinkCallback: (CADisplayLink*) dl
{
if (owner != nullptr)
owner->displayLinkCallback();
owner->displayLinkCallback (dl.targetTimestamp);
}
#if JUCE_COREGRAPHICS_RENDER_WITH_MULTIPLE_PAINT_CALLS
@ -2160,9 +2160,9 @@ void UIViewComponentPeer::dismissPendingTextInput()
}
//==============================================================================
void UIViewComponentPeer::displayLinkCallback()
void UIViewComponentPeer::displayLinkCallback (double timestampSec)
{
vBlankListeners.call ([] (auto& l) { l.onVBlank(); });
callVBlankListeners (timestampSec);
if (deferredRepaints.isEmpty())
return;