<commit_before>package openfl._internal.renderer.dom;


import openfl._internal.renderer.canvas.CanvasTilemap;
import openfl.display.DOMRenderer;
import openfl.display.Tilemap;
import openfl.geom.Matrix;

#if (js && html5)
import js.Browser;
#end

@:access(openfl.display.TileGroup)
@:access(openfl.display.Tilemap)
@:access(openfl.geom.Matrix)


class DOMTilemap {
	
	
	public static function clear (tilemap:Tilemap, renderer:DOMRenderer):Void {
		
		#if (js && html5)
		if (tilemap.__canvas != null) {
			
			renderer.element.removeChild (tilemap.__canvas);
			tilemap.__canvas = null;
			tilemap.__style = null;
			
		}
		#end
		
	}
	
	
	public static inline function render (tilemap:Tilemap, renderer:DOMRenderer):Void {
		
		// TODO: Support GL-based Tilemap?
		
		#if (js && html5)
		if (tilemap.stage != null && tilemap.__worldVisible && tilemap.__renderable && tilemap.__group.__tiles.length > 0) {
			
			if (tilemap.__canvas == null) {
				
				tilemap.__canvas = cast Browser.document.createElement ("canvas");
				tilemap.__context = tilemap.__canvas.getContext ("2d");
				renderer.__initializeElement (tilemap, tilemap.__canvas, renderer);
				
			}
			
			tilemap.__canvas.width = tilemap.__width;
			tilemap.__canvas.height = tilemap.__height;
			
			renderer.__canvasRenderer.context = tilemap.__context;
			
			CanvasTilemap.render (tilemap, renderer.__canvasRenderer);
			
			renderer.__canvasRenderer.context = null;
			
			renderer.__updateClip (tilemap);
			renderer.__applyStyle (tilemap, true, false, true);
			
		} else {
			
			clear (tilemap, renderer);
			
		}
		#end
		
	}
	
	
	
}<commit_msg>Compile fix<commit_after>package openfl._internal.renderer.dom;


import openfl._internal.renderer.canvas.CanvasTilemap;
import openfl.display.DOMRenderer;
import openfl.display.Tilemap;
import openfl.geom.Matrix;

#if (js && html5)
import js.Browser;
#end

@:access(openfl.display.TileGroup)
@:access(openfl.display.Tilemap)
@:access(openfl.geom.Matrix)


class DOMTilemap {
	
	
	public static function clear (tilemap:Tilemap, renderer:DOMRenderer):Void {
		
		#if (js && html5)
		if (tilemap.__canvas != null) {
			
			renderer.element.removeChild (tilemap.__canvas);
			tilemap.__canvas = null;
			tilemap.__style = null;
			
		}
		#end
		
	}
	
	
	public static inline function render (tilemap:Tilemap, renderer:DOMRenderer):Void {
		
		// TODO: Support GL-based Tilemap?
		
		#if (js && html5)
		if (tilemap.stage != null && tilemap.__worldVisible && tilemap.__renderable && tilemap.__group.__tiles.length > 0) {
			
			if (tilemap.__canvas == null) {
				
				tilemap.__canvas = cast Browser.document.createElement ("canvas");
				tilemap.__context = tilemap.__canvas.getContext ("2d");
				renderer.__initializeElement (tilemap, tilemap.__canvas);
				
			}
			
			tilemap.__canvas.width = tilemap.__width;
			tilemap.__canvas.height = tilemap.__height;
			
			renderer.__canvasRenderer.context = tilemap.__context;
			
			CanvasTilemap.render (tilemap, renderer.__canvasRenderer);
			
			renderer.__canvasRenderer.context = null;
			
			renderer.__updateClip (tilemap);
			renderer.__applyStyle (tilemap, true, false, true);
			
		} else {
			
			clear (tilemap, renderer);
			
		}
		#end
		
	}
	
	
	
}
{'fraction_non_alphanumeric': 0.11981424148606812, 'fraction_numerical': 0.0030959752321981426, 'mean_word_length': 3.57001414427157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6194679', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1029, 'n_words': 196}