mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 02:54:31 +03:00
GH-666 Refactor slightly
This commit is contained in:
parent
6bf0c568ff
commit
162f6827fb
@ -43,13 +43,21 @@ extension NvimView {
|
||||
#endif
|
||||
}
|
||||
|
||||
private func drawByParallelComputation(contentIn dirtyRects: [CGRect], `in` context: CGContext) {
|
||||
private func draw(
|
||||
defaultBackgroundIn dirtyRects: [CGRect], `in` context: CGContext
|
||||
) {
|
||||
context.setFillColor(
|
||||
ColorUtils.cgColorIgnoringAlpha(
|
||||
self.cellAttributesCollection.defaultAttributes.background
|
||||
)
|
||||
)
|
||||
context.fill(dirtyRects)
|
||||
}
|
||||
|
||||
private func drawByParallelComputation(
|
||||
contentIn dirtyRects: [CGRect], `in` context: CGContext
|
||||
) {
|
||||
self.draw(defaultBackgroundIn: dirtyRects, in: context)
|
||||
|
||||
let attrsRuns = self.runs(intersecting: dirtyRects)
|
||||
let runs = attrsRuns.parallelMap {
|
||||
@ -88,12 +96,7 @@ extension NvimView {
|
||||
}
|
||||
|
||||
private func draw(contentIn dirtyRects: [CGRect], `in` context: CGContext) {
|
||||
context.setFillColor(
|
||||
ColorUtils.cgColorIgnoringAlpha(
|
||||
self.cellAttributesCollection.defaultAttributes.background
|
||||
)
|
||||
)
|
||||
context.fill(dirtyRects)
|
||||
self.draw(defaultBackgroundIn: dirtyRects, in: context)
|
||||
|
||||
let attrsRuns = self.runs(intersecting: dirtyRects)
|
||||
let runs = attrsRuns.map { run -> [FontGlyphRun] in
|
||||
|
Loading…
Reference in New Issue
Block a user