mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Drop use of GPU tiles for lines and line numbers
At the cost of a very minimal reduction in layout performance, we gain reliable rendering at all line heights and don't have to worry about characters that extend above/below the footprint of a line. Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
committed by
Nathan Sobo
parent
f41be89d5e
commit
7267c5d269
@@ -3167,15 +3167,12 @@ class LineNumberGutterComponent {
|
||||
children[i] = $.div({
|
||||
key: rootComponent.idsByTileStartRow.get(tileStartRow),
|
||||
style: {
|
||||
contain: 'strict',
|
||||
overflow: 'hidden',
|
||||
contain: 'layout style',
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
height: ceilToPhysicalPixelBoundary(tileHeight) + 'px',
|
||||
width: ceilToPhysicalPixelBoundary(width) + 'px',
|
||||
willChange: 'transform',
|
||||
transform: `translateY(${roundToPhysicalPixelBoundary(tileTop)}px)`,
|
||||
backgroundColor: 'inherit'
|
||||
height: tileHeight + 'px',
|
||||
width: width + 'px',
|
||||
transform: `translateY(${tileTop}px)`
|
||||
}
|
||||
}, ...tileChildren)
|
||||
}
|
||||
@@ -3546,13 +3543,11 @@ class LinesTileComponent {
|
||||
return $.div(
|
||||
{
|
||||
style: {
|
||||
contain: 'strict',
|
||||
contain: 'layout style',
|
||||
position: 'absolute',
|
||||
height: ceilToPhysicalPixelBoundary(height) + 'px',
|
||||
width: ceilToPhysicalPixelBoundary(width) + 'px',
|
||||
willChange: 'transform',
|
||||
transform: `translateY(${roundToPhysicalPixelBoundary(top)}px)`,
|
||||
backgroundColor: 'inherit'
|
||||
height: height + 'px',
|
||||
width: width + 'px',
|
||||
transform: `translateY(${top}px)`
|
||||
}
|
||||
},
|
||||
$.div({
|
||||
|
||||
Reference in New Issue
Block a user