Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARRISEOS-41099] Repaint page after receiving wpe_compositor_refresh_… #202

Open
wants to merge 1 commit into
base: lgi-master
Choose a base branch
from

Conversation

jaroslaw-bojko-red
Copy link

…event

The entire page should be repainted after receiving wpe_compositor_refresh_event. This will make webbrowser repond to visibility change from awc_cli.

@jacek-skiba-red
Copy link

jacek-skiba-red commented Oct 27, 2022

Currently all our apps which use canvas (lightning or teletext) have this bug: even if apps are not repainting, they are pushing new frames to weston (eg. rdkcentral/Lightning#380)

Please create dummy apps based on 1) webgl 2) canvas API and check if visibility change also works there.

Additionally, please extend commit description with added flow (in general copy flow analyze from ARRISEOS-41099).

@jacek-skiba-red
Copy link

jacek-skiba-red commented Oct 27, 2022

We should also know why this fix is rather not upstremable, because it seems that everything is working on RPI build:

  • open thunder interface on port 9998
  • launch WebkitBrowser
  • launch BBC iPlayer URL
  • go to RDK Shell tab
  • switch visibility to On/Off

One of the differences it that our stack is using Weston compositor, and RDK stack is using Westeros.
Without that knowledge we cannot upstream this issue (FYI @rychem )

@jacek-skiba-red
Copy link

jacek-skiba-red commented Oct 27, 2022

Please create stability test to toggle visiblity to true/false on html5 and canvas app which is all the time generating amimations.
Let's check if forceUpdate is not causing any regression.

Test for each app should run for at least 1h.

@jaroslaw-bojko-red
Copy link
Author

jaroslaw-bojko-red commented Oct 27, 2022

Currently all our apps which use canvas (lightning or teletext) have this bug: even if apps are not repainting, they are pushing new frames to weston (eg. rdkcentral/Lightning#380)

Please create dummy apps based on 1) webgl 2) canvas API and check if visibility change also works there.

Additionally, please extend commit description with added flow (in general copy flow analyze from ARRISEOS-41099).

Canvas moving objects: canvas_bgra.html.txt
Canvas still: canvas_still.html.txt
Webgl moving objects: webgl_exmaple.html.txt
Webgl still: webgl_still.html.txt

Visibility changes successfully in all cases, webgl and canvas. For still tests, frames are rendered only when avc_cli hides/shows applications.

Event flow added to commit description.

@jaroslaw-bojko-red
Copy link
Author

Please create stability test to toggle visiblity to true/false on html5 and canvas app which is all the time generating amimations. Let's check if forceUpdate is not causing any regression.

Test for each app should run for at least 1h.

Please create stability test to toggle visiblity to true/false on html5 and canvas app which is all the time generating amimations. Let's check if forceUpdate is not causing any regression.

Test for each app should run for at least 1h.

Script: script.sh.txt

I wrote a script and ran two applications:
1 hour of canvas_bgra.html.txt
1 hour of https://interactive-examples.mdn.mozilla.net/pages/css/animation.html

Result: Visibility was changed every 1s for 1h for every app. After 2h the box behaves normally, no crashes or glitches. I run the euronews and site normally plays the video.

Memory footprint after 2 hours of tests:

Oct 27 14:53:19 E0B7B1-APLSTB-300000824809 WPEWebProcess[3236]: 221027-12:53:19.870917 [mod=MemoryPressure, lvl=INFO] [tid=16] Current memory footprint: 145 MB, peak: 179 MB
Oct 27 14:53:19 E0B7B1-APLSTB-300000824809 WPEWebProcess[3236]: 221027-12:53:19.872471 [mod=MemoryPressure, lvl=INFO] [tid=16] GFX memory usage 165MB/48%, peak memory 233MB/68%
Oct 27 14:53:19 E0B7B1-APLSTB-300000824809 WPEWebProcess[3236]: 221027-12:53:19.873818 [mod=MemoryPressure, lvl=INFO] [tid=16] CRR memory usage 42MB/44%, peak memory 44MB/46%

Footprint taken during video playback by euronews after 2h of testing (no restart after test)

…event

The entire page should be repainted after receiving
wpe_compositor_refresh_event. This will make webbrowser repond
to visibility change from awc_cli.

Event flow:
We receive an information about handle_configure method
execution in wpe-backend-rdk. Thanks to this execution we know
that the compositor change state and we need to repaint the
app.
As we get this info in network process thread we send it to the UI
thread in wpe-backend-rdk via
Wayland::EventDispatcher::singleton().sendEvent(). The wpe-browser
is attached to EventDispatcher so by IPC we get this info in
WPEView.cpp in wpe-webkit, wpe_view_backend_input_client callback.
This event is received in UI thread while WebPage is working on
network process thread. We send the event to the webpage by:
page.repaintAfterCompositorReconfigure(); When we receive event on
the proper thread, process and proper class we force the app to be
repainted. To this we execute: m_drawingArea->forceRepaint(true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants