mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-23 22:01:49 +03:00
Add framerate measurement
This commit is contained in:
parent
3725da6923
commit
e5d33ec107
@ -8,6 +8,9 @@ import NvimView
|
||||
import os
|
||||
import PureLayout
|
||||
import RxSwift
|
||||
#if FRAMERATE
|
||||
import SpriteKit
|
||||
#endif
|
||||
import Tabs
|
||||
import Workspace
|
||||
|
||||
@ -216,6 +219,16 @@ class MainWindow: NSObject,
|
||||
self.window.makeFirstResponder(self.neoVimView)
|
||||
|
||||
self.openInitialUrlsAndGoToLine(urlsToOpen: state.urlsToOpen)
|
||||
|
||||
// Framerate measurement; from https://stackoverflow.com/a/34039775
|
||||
#if FRAMERATE
|
||||
let sk = SKView(forAutoLayout: ())
|
||||
sk.showsFPS = true
|
||||
self.neoVimView.addSubview(sk)
|
||||
sk.autoPinEdge(toSuperviewEdge: .top, withInset: 10)
|
||||
sk.autoPinEdge(toSuperviewEdge: .right, withInset: 10)
|
||||
sk.autoSetDimensions(to: CGSize(width: 60, height: 15))
|
||||
#endif
|
||||
}
|
||||
|
||||
func uuidAction(for action: Action) -> UuidAction<Action> {
|
||||
|
Loading…
Reference in New Issue
Block a user