mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-20 12:47:37 +07:00
Pack testing
This commit is contained in:
@ -9,4 +9,4 @@ kapt.use.worker.api=true
|
|||||||
kapt.include.compile.classpath=false
|
kapt.include.compile.classpath=false
|
||||||
# I don't need to use the kotlin stdlib yet, so remove it to prevent extra bloat & method count issues
|
# I don't need to use the kotlin stdlib yet, so remove it to prevent extra bloat & method count issues
|
||||||
kotlin.stdlib.default.dependency=false
|
kotlin.stdlib.default.dependency=false
|
||||||
archash=b8f52056240e6779d5b2c13b71235778ade8346c
|
archash=94cb69e5eb799266de29f7b962597db63b9b0de9
|
||||||
|
@ -212,26 +212,29 @@ task pack(dependsOn: [classes, configurations.runtimeClasspath]){
|
|||||||
delete "../core/assets-raw/sprites_out/ui/icons"
|
delete "../core/assets-raw/sprites_out/ui/icons"
|
||||||
}
|
}
|
||||||
|
|
||||||
ExecutorService executor = Executors.newFixedThreadPool(16)
|
//disabled until the elusive sprite packing bug is fixed
|
||||||
long ms = System.currentTimeMillis()
|
if(false){
|
||||||
|
ExecutorService executor = Executors.newFixedThreadPool(16)
|
||||||
|
long ms = System.currentTimeMillis()
|
||||||
|
|
||||||
//antialias everything except UI elements
|
//antialias everything except UI elements
|
||||||
fileTree(dir: new File(rootDir, 'core/assets-raw/sprites_out/').absolutePath, include: "**/*.png").visit{ file ->
|
fileTree(dir: new File(rootDir, 'core/assets-raw/sprites_out/').absolutePath, include: "**/*.png").visit{ file ->
|
||||||
if(file.isDirectory() || (file.toString().replace("\\", "/").contains("/ui/") && file.toString().startsWith("icon-")) || file.toString().contains(".9.png")) return
|
if(file.isDirectory() || (file.toString().replace("\\", "/").contains("/ui/") && file.toString().startsWith("icon-")) || file.toString().contains(".9.png")) return
|
||||||
|
|
||||||
executor.submit{
|
executor.submit{
|
||||||
//antialias(file.file)
|
antialias(file.file)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
executor.shutdown()
|
executor.shutdown()
|
||||||
try{
|
try{
|
||||||
executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS)
|
executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS)
|
||||||
}catch(InterruptedException e){
|
}catch(InterruptedException e){
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
|
|
||||||
println "Time taken for AA: ${(System.currentTimeMillis() - ms) / 1000f}"
|
println "Time taken for AA: ${(System.currentTimeMillis() - ms) / 1000f}"
|
||||||
|
}
|
||||||
|
|
||||||
println("\n\nPacking normal 4096 sprites...\n\n")
|
println("\n\nPacking normal 4096 sprites...\n\n")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user