浏览代码

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

Nicolas Cannasse 4 年之前
父节点
当前提交
9d3e0aad53
共有 1 个文件被更改,包括 1 次插入1 次删除
  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.
 		// 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
 		// Let's make sure to force the upload before starting while we are still
 		// syncing our 2d scene.
 		// syncing our 2d scene.
-		content.flush();
+		if( visible ) content.flush();
 	}
 	}
 
 
 	/**
 	/**