Parcourir la source

minor opti : don't flush invisible tilegroup (text)

Nicolas Cannasse il y a 4 ans
Parent
commit
9d3e0aad53
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      h2d/TileGroup.hx

+ 1 - 1
h2d/TileGroup.hx

@@ -686,7 +686,7 @@ class TileGroup extends Drawable {
 		// On some mobile GPU, uploading while rendering does create a lot of stall.
 		// Let's make sure to force the upload before starting while we are still
 		// syncing our 2d scene.
-		content.flush();
+		if( visible ) content.flush();
 	}
 
 	/**