mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-11-16 22:25:59 +01:00
log buffers
This commit is contained in:
parent
0a113cfd56
commit
abf3b03d70
1 changed files with 16 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue