[Webkit-unassigned] [Bug 185764] [WPE] Rendering on a HiDPI display looks scaled up instead of rendered at 2x

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 6 07:50:55 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=185764

--- Comment #13 from Adrian Perez <aperez at igalia.com> ---
(In reply to Ryan Walklin from comment #12)
> I have been working on this and think I have a solution, largely based on
> the current patch. I've added a libwpe function to set the WPE view's
> intrinsic scale factor
> (https://github.com/WebPlatformForEmbedded/libwpe/pull/44) and a patch to
> WPEView.cpp in WebKit largely derived from Adrian's patch: 
> 
> diff --git a/Source/WebKit/UIProcess/API/wpe/WPEView.cpp
> b/Source/WebKit/UIProcess/API/wpe/WPEView.cpp
> index 0bc7cb8d7..c90df3cc8 100644
> --- a/Source/WebKit/UIProcess/API/wpe/WPEView.cpp
> +++ b/Source/WebKit/UIProcess/API/wpe/WPEView.cpp
> @@ -100,8 +100,13 @@ View::View(struct wpe_view_backend* backend, const
> API::PageConfiguration& baseC
>                  flags.add(WebCore::ActivityState::IsInWindow);
>              view.setViewState(flags);
>          },
> -        // padding
> -        nullptr,
> +        // device scale changed
> +        [](void* data, float scale)
> +        {
> +            auto& view = *reinterpret_cast<View*>(data);
> +            view.page().setIntrinsicDeviceScaleFactor(scale);
> +        },
> +        // padding,
>          nullptr,
>          nullptr
>      };
> 
> This is enough to enable HiDPI support for me. IMHO the wl_output tracking
> should be done by the client, and it's enough to set the appropriate scale
> factor when a wl_surface enters an output, as this will only be set once on
> entry. It can be reset if the window moves to another output which doesn't
> support HiDPI or vice versa.

Hi Ryan! Thanks *a lot* for chiming in: after taking a quick look
around the WebKit code and Carlos' patch, I think you are correct
and that this change you suggest is what is missing.

I don't know whether Carlos Eduardo has time to finish... If he
doesn't, would you be interested to complete his WIP patch? I could
also finish it myself crediting you both.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190506/81b35f7c/attachment.html>


More information about the webkit-unassigned mailing list