@@ -12,6 +12,7 @@ import { TextureAtlas } from '../../../../browser/gpu/atlas/textureAtlas.js';
1212import { createCodeEditorServices } from '../../testCodeEditor.js' ;
1313import { assertIsValidGlyph } from './testUtil.js' ;
1414import { TextureAtlasSlabAllocator } from '../../../../browser/gpu/atlas/textureAtlasSlabAllocator.js' ;
15+ import { DecorationStyleCache } from '../../../../browser/gpu/css/decorationStyleCache.js' ;
1516
1617const blackInt = 0x000000FF ;
1718const nullCharMetadata = 0x0 ;
@@ -79,7 +80,7 @@ suite('TextureAtlas', () => {
7980
8081 setup ( ( ) => {
8182 instantiationService = createCodeEditorServices ( store ) ;
82- atlas = store . add ( instantiationService . createInstance ( TextureAtlas , 2 , undefined ) ) ;
83+ atlas = store . add ( instantiationService . createInstance ( TextureAtlas , 2 , undefined , new DecorationStyleCache ( ) ) ) ;
8384 glyphRasterizer = new TestGlyphRasterizer ( ) ;
8485 glyphRasterizer . nextGlyphDimensions = [ 1 , 1 ] ;
8586 glyphRasterizer . nextGlyphColor = [ 0 , 0 , 0 , 0xFF ] ;
@@ -90,7 +91,7 @@ suite('TextureAtlas', () => {
9091 } ) ;
9192
9293 test ( 'get multiple glyphs' , ( ) => {
93- atlas = store . add ( instantiationService . createInstance ( TextureAtlas , 32 , undefined ) ) ;
94+ atlas = store . add ( instantiationService . createInstance ( TextureAtlas , 32 , undefined , new DecorationStyleCache ( ) ) ) ;
9495 for ( let i = 0 ; i < 10 ; i ++ ) {
9596 assertIsValidGlyph ( atlas . getGlyph ( glyphRasterizer , ...getUniqueGlyphId ( ) ) , atlas ) ;
9697 }
@@ -119,14 +120,14 @@ suite('TextureAtlas', () => {
119120 glyphRasterizer . nextGlyphDimensions = [ 2 , 2 ] ;
120121 atlas = store . add ( instantiationService . createInstance ( TextureAtlas , 32 , {
121122 allocatorType : ( canvas , textureIndex ) => new TextureAtlasSlabAllocator ( canvas , textureIndex , { slabW : 1 , slabH : 1 } )
122- } ) ) ;
123+ } , new DecorationStyleCache ( ) ) ) ;
123124 assertIsValidGlyph ( atlas . getGlyph ( glyphRasterizer , ...getUniqueGlyphId ( ) ) , atlas ) ;
124125 } ) ;
125126
126127 test ( 'adding a non-first glyph larger than the standard slab size, causing an overflow to a new page' , ( ) => {
127128 atlas = store . add ( instantiationService . createInstance ( TextureAtlas , 2 , {
128129 allocatorType : ( canvas , textureIndex ) => new TextureAtlasSlabAllocator ( canvas , textureIndex , { slabW : 1 , slabH : 1 } )
129- } ) ) ;
130+ } , new DecorationStyleCache ( ) ) ) ;
130131 assertIsValidGlyph ( atlas . getGlyph ( glyphRasterizer , ...getUniqueGlyphId ( ) ) , atlas ) ;
131132 strictEqual ( atlas . pages . length , 1 ) ;
132133 glyphRasterizer . nextGlyphDimensions = [ 2 , 2 ] ;
0 commit comments