[thanos] Added debug logging to effect capture and render pipeline.

This commit is contained in:
23rd
2026-04-02 16:50:51 +03:00
parent 4ad8a3e854
commit c93b638ac0
3 changed files with 18 additions and 3 deletions
@@ -4208,11 +4208,17 @@ void HistoryInner::captureViewForThanosEffect(
auto context = preparePaintContext(clip);
context.clip = clip;
context.outbg = view->hasOutLayout();
context.translate(0, -top);
p.translate(0, top);
view->draw(p, context);
}
LOG(("ThanosEffect: captured view %1x%2, screenTop=%3, "
"image null=%4, allTransparent=%5")
.arg(viewWidth)
.arg(viewHeight)
.arg(screenTop)
.arg(image.isNull())
.arg(image.pixelColor(viewWidth / 2, viewHeight / 2).alpha() == 0));
if (!_thanosEffect) {
_thanosEffect = std::make_unique<Ui::ThanosEffect>(
_scroll.get());
@@ -71,10 +71,15 @@ void ThanosEffect::ensureSurface() {
void ThanosEffect::showSurface() {
if (const auto w = _surface ? _surface->rpWidget() : nullptr) {
w->setGeometry(_parent->rect());
const auto r = _parent->rect();
LOG(("ThanosEffect: showSurface, parent rect=%1,%2 %3x%4")
.arg(r.x()).arg(r.y()).arg(r.width()).arg(r.height()));
w->setGeometry(r);
w->show();
w->raise();
startUpdateTimer();
} else {
LOG(("ThanosEffect: showSurface FAILED, no widget"));
}
}
@@ -257,6 +257,10 @@ void ThanosEffectRenderer::render(
return;
}
LOG(("ThanosEffect render: %1 items, phase=%2")
.arg(_items.size())
.arg(_items.front().phase));
const auto pixelSize = rt->pixelSize();
const auto factor = style::DevicePixelRatio();
const auto viewW = float(pixelSize.width()) / factor;