fix(capture): use buffer pixel size for capture constraints and damage on fractional scales - #1224
fix(capture): use buffer pixel size for capture constraints and damage on fractional scales#1224glyvut wants to merge 1 commit into
Conversation
constraints and damage on fractional scales Use wlr_surface buffer_width/buffer_height instead of logical width/height for initial buffer_size constraints and per-frame damage regions. Fixes truncated capture output on fractional-scale (e.g. 1.25x) screens where logical and buffer pixel sizes differ. 在分数倍缩放屏幕(如1.25x)上,使用buffer像素尺寸 而非逻辑尺寸设置捕获约束和damage区域,修复画面 被截断为逻辑尺寸的问题。 Log: 修复分数倍缩放下窗口捕获画面截断 Influence: 分数倍缩放屏幕上的窗口捕获现在返回完整 画面,不再出现黑边截断。
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: glyvut The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR switches image capture sizing and damage calculations from logical surface dimensions to buffer pixel dimensions to fix truncated captures on fractional-scale displays. Sequence diagram for buffer-based damage calculation in handleRenderEndsequenceDiagram
participant WExtImageCaptureSourceV1Impl
participant WSurfaceContent
participant WSurface
participant WSurfaceHandle
participant wlr_surface
participant WPixmanRegion
participant FrameSignal
WExtImageCaptureSourceV1Impl->>WSurfaceContent: surface()
WSurfaceContent-->>WExtImageCaptureSourceV1Impl: WSurface
WExtImageCaptureSourceV1Impl->>WSurface: handle()
WSurface-->>WExtImageCaptureSourceV1Impl: WSurfaceHandle
WExtImageCaptureSourceV1Impl->>WSurfaceHandle: handle()
WSurfaceHandle-->>WExtImageCaptureSourceV1Impl: wlr_surface
WExtImageCaptureSourceV1Impl->>wlr_surface: read current.buffer_width
WExtImageCaptureSourceV1Impl->>wlr_surface: read current.buffer_height
alt [bufferWidth <= 0 or bufferHeight <= 0]
WExtImageCaptureSourceV1Impl->>WExtImageCaptureSourceV1Impl: qCWarning(lcWlImageCapture)
WExtImageCaptureSourceV1Impl-->>WExtImageCaptureSourceV1Impl: return
else [valid buffer size]
WExtImageCaptureSourceV1Impl->>WPixmanRegion: WPixmanRegion(0,0,bufferWidth,bufferHeight)
WExtImageCaptureSourceV1Impl->>FrameSignal: wl_signal_emit_mutable(events.frame,event)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
TAG Bot New tag: 0.8.17 |
|
可能会有一个大重写,直接带着这个问题一次性都解掉 |
|
TAG Bot New tag: 0.8.18 |
Use wlr_surface buffer_width/buffer_height instead of logical width/height for initial buffer_size constraints and per-frame damage regions. Fixes truncated capture output on fractional-scale (e.g. 1.25x) screens where logical and buffer pixel sizes differ.
在分数倍缩放屏幕(如1.25x)上,使用buffer像素尺寸
而非逻辑尺寸设置捕获约束和damage区域,修复画面
被截断为逻辑尺寸的问题。
Log: 修复分数倍缩放下窗口捕获画面截断
Influence: 分数倍缩放屏幕上的窗口捕获现在返回完整
画面,不再出现黑边截断。
Summary by Sourcery
Bug Fixes: