core-text: use cached-lines get-global.
							parent
							
								
									c880c28db3
								
							
						
					
					
						commit
						f05954c5a9
					
				| 
						 | 
					@ -164,6 +164,6 @@ M: line dispose* line>> CFRelease ;
 | 
				
			||||||
SYMBOL: cached-lines
 | 
					SYMBOL: cached-lines
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: cached-line ( font string -- line )
 | 
					: cached-line ( font string -- line )
 | 
				
			||||||
    cached-lines get [ <line> ] 2cache ;
 | 
					    cached-lines get-global [ <line> ] 2cache ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[ <cache-assoc> cached-lines set-global ] "core-text" add-startup-hook
 | 
					[ <cache-assoc> cached-lines set-global ] "core-text" add-startup-hook
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,7 @@ M: core-text-renderer string-dim
 | 
				
			||||||
    if-empty ;
 | 
					    if-empty ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M: core-text-renderer flush-layout-cache
 | 
					M: core-text-renderer flush-layout-cache
 | 
				
			||||||
    cached-lines get purge-cache ;
 | 
					    cached-lines get-global purge-cache ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M: core-text-renderer string>image ( font string -- image loc )
 | 
					M: core-text-renderer string>image ( font string -- image loc )
 | 
				
			||||||
    cached-line [ line>image ] [ loc>> ] bi ;
 | 
					    cached-line [ line>image ] [ loc>> ] bi ;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue