log buffers

This commit is contained in:
vaxerski 2022-07-03 10:07:43 +02:00
parent 0a113cfd56
commit abf3b03d70

View File

@ -104,6 +104,8 @@ SMonitor* CHyprpaper::getMonitorFromName(const std::string& monname) {
}
void CHyprpaper::ensurePoolBuffersPresent() {
bool anyNewBuffers = false;
for (auto&[file, wt] : m_mWallpaperTargets) {
for (auto& m : m_vMonitors) {
@ -121,9 +123,23 @@ void CHyprpaper::ensurePoolBuffersPresent() {
createBuffer(PBUFFER, m->size.x * m->scale, m->size.y * m->scale, WL_SHM_FORMAT_ARGB8888);
PBUFFER->pTarget = &wt;
Debug::log(LOG, "Buffer created, Shared Memory usage: %.1fMB", PBUFFER->size / 1000000.f);
anyNewBuffers = true;
}
}
}
if (anyNewBuffers) {
uint64_t bytesUsed = 0;
for (auto& bf : m_vBuffers) {
bytesUsed += bf->size;
}
Debug::log(LOG, "Total SM usage for all buffers: %.1fMB", bytesUsed / 1000000.f);
}
}
void CHyprpaper::clearWallpaperFromMonitor(const std::string& monname) {