[wpe-webkit] Screen size
Adrian Perez de Castro
aperez at igalia.com
Mon Sep 2 13:37:07 PDT 2019
Hi Andy,
On Tue, 27 Aug 2019 13:05:16 +0000, Andy Pont <andy.pont at sdcsystems.com> wrote:
> As per the previous email, I am using Cog + WPE WebKit on an i.MX6
> reference platform using wpebackend-rdk for the i.MX6 Vivante GPU.
>
> The screen has a physical resolution of 1024x768 and this is reflected
> in the Linux system configuration seen through the sysfs:
>
> # cat /sys/class/graphics/fb0/mode
> U:1024x768p-60
>
> I have a simple html page that I am displaying that outputs the
> Javascript screen.width and screen.height values. These are being
> reported as 1920x1080. Where does WebKit determine these values from
> and how do I control them?
I did some quick grepping on the RDK backend source, and it looks like
the WPE_INIT_VIEW_WIDTH and WPE_INIT_VIEW_HEIGHT environment variables
can be set before launching Cog to define the initial size of the web
view.
It looks to me like the code could pass zero as width/height to the
“fbCreateWindow()” function [1] to make the driver guess the framebuffer
size automatically but maybe there is some reason why it does not.
Anyway, I hope the environment variables work for you :)
Cheers,
—Adrián
---
[1] https://github.com/WebPlatformForEmbedded/WPEBackend-rdk/blob/master/src/viv-imx6/renderer-backend.cpp#L130
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-wpe/attachments/20190902/a3e872e9/attachment.bin>
More information about the webkit-wpe
mailing list