mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-25 05:51:47 -08:00
Pack testing
This commit is contained in:
parent
8128542a1f
commit
0c85a6ee47
2 changed files with 19 additions and 16 deletions
|
|
@ -9,4 +9,4 @@ kapt.use.worker.api=true
|
|||
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
|
||||
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"
|
||||
}
|
||||
|
||||
ExecutorService executor = Executors.newFixedThreadPool(16)
|
||||
long ms = System.currentTimeMillis()
|
||||
//disabled until the elusive sprite packing bug is fixed
|
||||
if(false){
|
||||
ExecutorService executor = Executors.newFixedThreadPool(16)
|
||||
long ms = System.currentTimeMillis()
|
||||
|
||||
//antialias everything except UI elements
|
||||
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
|
||||
//antialias everything except UI elements
|
||||
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
|
||||
|
||||
executor.submit{
|
||||
//antialias(file.file)
|
||||
executor.submit{
|
||||
antialias(file.file)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
executor.shutdown()
|
||||
try{
|
||||
executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS)
|
||||
}catch(InterruptedException e){
|
||||
e.printStackTrace()
|
||||
}
|
||||
executor.shutdown()
|
||||
try{
|
||||
executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS)
|
||||
}catch(InterruptedException e){
|
||||
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")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue