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


import openfl._internal.renderer.RenderSession;
import openfl.display.Bitmap;

@:access(openfl.display.Bitmap)


class GLBitmap {
	
	
	public static inline function render (bitmap:Bitmap, renderSession:RenderSession):Void {
		
		if (!bitmap.__renderable || bitmap.__worldAlpha <= 0) return;
		/*if (!__renderable || __worldAlpha <= 0) return;
		
		var gl = renderSession.gl;
		
		var texture = bitmapData.getTexture (gl);
		var buffer = bitmapData.getBuffer (gl);
		
		//__glMatrix = new lime.geom.Matrix4 ();
		__glMatrix.identity ();
		__glMatrix[0] = __worldTransform.a;
		__glMatrix[1] = __worldTransform.b;
		__glMatrix[4] = __worldTransform.c;
		__glMatrix[5] = __worldTransform.d;
		__glMatrix[12] = __worldTransform.tx;
		__glMatrix[13] = __worldTransform.ty;
		__glMatrix.append (renderSession.projectionMatrix);
		
		gl.activeTexture (gl.TEXTURE0);
		gl.bindTexture (gl.TEXTURE_2D, texture);
		
		#if desktop
		gl.enable (gl.TEXTURE_2D);
		#end
		
		gl.uniform1f (renderSession.glProgram.alphaUniform, __worldAlpha);
		gl.uniformMatrix4fv (renderSession.glProgram.matrixUniform, false, __glMatrix);
		gl.uniform1i (renderSession.glProgram.imageUniform, 0);
		
		gl.bindBuffer (gl.ARRAY_BUFFER, buffer);
		gl.vertexAttribPointer (renderSession.glProgram.vertexAttribute, 3, gl.FLOAT, false, 5 * Float32Array.BYTES_PER_ELEMENT, 0);<commit_msg>Return if bitmapData is null<commit_after>package openfl._internal.renderer.opengl;


import openfl._internal.renderer.RenderSession;
import openfl.display.Bitmap;

@:access(openfl.display.Bitmap)


class GLBitmap {
	
	
	public static inline function render (bitmap:Bitmap, renderSession:RenderSession):Void {
		
		if (!bitmap.__renderable || bitmap.__worldAlpha <= 0 || bitmap.bitmapData == null) return;
		/*if (!__renderable || __worldAlpha <= 0) return;
		
		var gl = renderSession.gl;
		
		var texture = bitmapData.getTexture (gl);
		var buffer = bitmapData.getBuffer (gl);
		
		//__glMatrix = new lime.geom.Matrix4 ();
		__glMatrix.identity ();
		__glMatrix[0] = __worldTransform.a;
		__glMatrix[1] = __worldTransform.b;
		__glMatrix[4] = __worldTransform.c;
		__glMatrix[5] = __worldTransform.d;
		__glMatrix[12] = __worldTransform.tx;
		__glMatrix[13] = __worldTransform.ty;
		__glMatrix.append (renderSession.projectionMatrix);
		
		gl.activeTexture (gl.TEXTURE0);
		gl.bindTexture (gl.TEXTURE_2D, texture);
		
		#if desktop
		gl.enable (gl.TEXTURE_2D);
		#end
		
		gl.uniform1f (renderSession.glProgram.alphaUniform, __worldAlpha);
		gl.uniformMatrix4fv (renderSession.glProgram.matrixUniform, false, __glMatrix);
		gl.uniform1i (renderSession.glProgram.imageUniform, 0);
		
		gl.bindBuffer (gl.ARRAY_BUFFER, buffer);
		gl.vertexAttribPointer (renderSession.glProgram.vertexAttribute, 3, gl.FLOAT, false, 5 * Float32Array.BYTES_PER_ELEMENT, 0);
{'fraction_non_alphanumeric': 0.11906424581005587, 'fraction_numerical': 0.01606145251396648, 'mean_word_length': 4.919421487603306, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '7381776', 'n_tokens_mistral': 1051, 'n_tokens_neox': 929, 'n_words': 177}