Flutter macOS Embedder
FlutterVSyncWaiter.mm File Reference
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterVSyncWaiter.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterDisplayLink.h"
#include "flutter/fml/logging.h"
#include <optional>
#include <vector>
#include <OSLog/OSLog.h>

Go to the source code of this file.

Macros

#define VSYNC_TRACING_ENABLED   1
 
#define TRACE_VSYNC(event_type, baton)
 

Variables

static const CFTimeInterval kTimerLatencyCompensation = 0.001
 
FlutterDisplayLink_displayLink
 
void(^ _block )(CFTimeInterval, CFTimeInterval, uintptr_t)
 
NSRunLoop * _runLoop
 
CFTimeInterval _lastTargetTimestamp
 
BOOL _warmUpFrame
 

Macro Definition Documentation

◆ TRACE_VSYNC

#define TRACE_VSYNC (   event_type,
  baton 
)
Value:
do { \
os_log_t log = os_log_create("FlutterVSync", "PointsOfInterest"); \
os_signpost_event_emit(log, OS_SIGNPOST_ID_EXCLUSIVE, event_type, "baton %lx", baton); \
} while (0)

Definition at line 18 of file FlutterVSyncWaiter.mm.

◆ VSYNC_TRACING_ENABLED

#define VSYNC_TRACING_ENABLED   1

Definition at line 10 of file FlutterVSyncWaiter.mm.

Variable Documentation

◆ _block

void(^ _block) (CFTimeInterval, CFTimeInterval, uintptr_t)

◆ _displayLink

FlutterDisplayLink* _displayLink
Initial value:
{
std::optional<std::uintptr_t> _pendingBaton

Definition at line 36 of file FlutterVSyncWaiter.mm.

Referenced by FlutterVSyncWaiter::initWithDisplayLink:block:, and FlutterVSyncWaiter::waitForVSync:.

◆ _lastTargetTimestamp

CFTimeInterval _lastTargetTimestamp

Definition at line 41 of file FlutterVSyncWaiter.mm.

Referenced by FlutterVSyncWaiter::waitForVSync:.

◆ _runLoop

NSRunLoop* _runLoop

Definition at line 40 of file FlutterVSyncWaiter.mm.

Referenced by FlutterVSyncWaiter::waitForVSync:.

◆ _warmUpFrame

BOOL _warmUpFrame

◆ kTimerLatencyCompensation

const CFTimeInterval kTimerLatencyCompensation = 0.001
static

Definition at line 34 of file FlutterVSyncWaiter.mm.

Referenced by FlutterVSyncWaiter::waitForVSync:.