mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-14 01:59:34 +01:00
AtlasGen: Separate pack and resolve steps
This commit is contained in:
1 parent
55d53bd29a
commit
915a88df60
4 files changed
+25
-11
No files matched your search
+6
-2
@@ -385,8 +385,12 @@ static bool GenerateUIAtlasImage(Atlas *atlas, float dpiScale, Image *dest, int
|
||||
int imageWidth = RoundToNextPowerOf2((int)sqrtf(area));
|
||||
|
||||
Instant bucketStart = Instant::Now();
|
||||
std::vector<Data> results = bucket.Resolve(imageWidth, dest);
|
||||
INFO_LOG(Log::G3D, " - Bucketed %zu images in %.2f ms (final image size: %dx%d)", results.size(), bucketStart.ElapsedMs(), dest->width(), dest->height());
|
||||
bucket.Pack(imageWidth);
|
||||
INFO_LOG(Log::G3D, " - Packed in %.2f ms (image size: %dx%d)", bucketStart.ElapsedMs(), bucket.w, bucket.h);
|
||||
|
||||
Instant resolveStart = Instant::Now();
|
||||
std::vector<Data> results = bucket.Resolve(dest);
|
||||
INFO_LOG(Log::G3D, " - Resolved %zu images in %.2f ms (final image size: %dx%d)", results.size(), resolveStart.ElapsedMs(), dest->width(), dest->height());
|
||||
|
||||
_dbg_assert_(!results.empty());
|
||||
// Fill out the atlas structure.
|
||||
|
||||
Reference in new issue
Block a user