core: minor log cleanups

This commit is contained in:
Vaxry 2024-08-06 17:01:36 +02:00
parent c36676ad0c
commit 2da9a6071e

View file

@ -121,8 +121,6 @@ SPoolBuffer* CHyprpicker::getBufferForLS(CLayerSurface* pLS) {
if (!returns) if (!returns)
return nullptr; return nullptr;
returns->busy = true;
return returns; return returns;
} }
@ -327,8 +325,10 @@ void* CHyprpicker::convert24To32Buffer(SPoolBuffer* pBuffer) {
void CHyprpicker::renderSurface(CLayerSurface* pSurface, bool forceInactive) { void CHyprpicker::renderSurface(CLayerSurface* pSurface, bool forceInactive) {
const auto PBUFFER = getBufferForLS(pSurface); const auto PBUFFER = getBufferForLS(pSurface);
if (!PBUFFER || !pSurface->screenBuffer.buffer) if (!PBUFFER || !pSurface->screenBuffer.buffer) {
Debug::log(ERR, PBUFFER ? "renderSurface: pSurface->screenBuffer.buffer null" : "renderSurface: PBUFFER null");
return; return;
}
PBUFFER->surface = cairo_image_surface_create_for_data((unsigned char*)PBUFFER->data, CAIRO_FORMAT_ARGB32, pSurface->m_pMonitor->size.x * pSurface->m_pMonitor->scale, PBUFFER->surface = cairo_image_surface_create_for_data((unsigned char*)PBUFFER->data, CAIRO_FORMAT_ARGB32, pSurface->m_pMonitor->size.x * pSurface->m_pMonitor->scale,
pSurface->m_pMonitor->size.y * pSurface->m_pMonitor->scale, PBUFFER->pixelSize.x * 4); pSurface->m_pMonitor->size.y * pSurface->m_pMonitor->scale, PBUFFER->pixelSize.x * 4);
@ -438,6 +438,7 @@ void CHyprpicker::renderSurface(CLayerSurface* pSurface, bool forceInactive) {
cairo_destroy(PCAIRO); cairo_destroy(PCAIRO);
cairo_surface_destroy(PBUFFER->surface); cairo_surface_destroy(PBUFFER->surface);
PBUFFER->busy = true;
PBUFFER->cairo = nullptr; PBUFFER->cairo = nullptr;
PBUFFER->surface = nullptr; PBUFFER->surface = nullptr;