mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-29 03:05:05 +00:00
wayland/screencopy: use linear texture filtering over nearest
Fixes pixelated views at scaled resolutions.
This commit is contained in:
4 files changed
+7
No files matched your search
@@ -64,6 +64,7 @@ set shell id.
|
||||
- Fixed partial socket reads in greetd and hyprland on slow machines.
|
||||
- Worked around Qt bug causing crashes when plugging and unplugging monitors.
|
||||
- Fixed HyprlandFocusGrab crashing if windows were destroyed after being passed to it.
|
||||
- Fixed ScreencopyView pixelation when scaled.
|
||||
|
||||
## Packaging Changes
|
||||
|
||||
|
||||
@@ -123,6 +123,10 @@ void WlBufferQSGDisplayNode::setRect(const QRectF& rect) {
|
||||
this->setMatrix(matrix);
|
||||
}
|
||||
|
||||
void WlBufferQSGDisplayNode::setFiltering(QSGTexture::Filtering filtering) {
|
||||
this->imageNode->setFiltering(filtering);
|
||||
}
|
||||
|
||||
void WlBufferQSGDisplayNode::syncSwapchain(const WlBufferSwapchain& swapchain) {
|
||||
auto* buffer = swapchain.frontbuffer();
|
||||
auto& texture = swapchain.presentSecondBuffer ? this->buffer2 : this->buffer1;
|
||||
|
||||
@@ -33,6 +33,7 @@ public:
|
||||
|
||||
void syncSwapchain(const WlBufferSwapchain& swapchain);
|
||||
void setRect(const QRectF& rect);
|
||||
void setFiltering(QSGTexture::Filtering filtering);
|
||||
|
||||
private:
|
||||
QQuickWindow* window;
|
||||
|
||||
@@ -167,6 +167,7 @@ QSGNode* ScreencopyView::updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData*
|
||||
auto& swapchain = this->context->swapchain();
|
||||
node->syncSwapchain(swapchain);
|
||||
node->setRect(this->boundingRect());
|
||||
node->setFiltering(QSGTexture::Linear); // NOLINT (misc-include-cleaner)
|
||||
|
||||
if (this->mLive) this->context->captureFrame();
|
||||
return node;
|
||||
|
||||
Reference in new issue
Block a user