Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Create dummy engine surface with correct background color until we get a onFirstContentfulPaint #6757

Closed
ekager opened this issue Apr 23, 2020 · 4 comments
Assignees
Labels
<engine-gecko> Component: browser-engine-gecko 🌟 feature New functionality and improvements

Comments

@ekager
Copy link
Contributor

ekager commented Apr 23, 2020

Currently opening a new page temporarily shows a pure white page before loading actual content regardless of the browser theme.

See Fenix issue: mozilla-mobile/fenix#6313

We can use CompositorController clearColor https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/CompositorController.html
mozilla-mobile/fenix#6313

After talking to the GV team, unfortunately the above solution likely does not work anymore with WebRender enabled. FxR uses a dummy surface with the correct color until they get a onFirstContentfulPaint and that's probably the direction we'd have to go as well to fix this.

┆Issue is synchronized with this Jira Task

@ekager ekager added 🌟 feature New functionality and improvements <engine-gecko> Component: browser-engine-gecko labels Apr 23, 2020
ekager added a commit to ekager/android-components that referenced this issue Apr 23, 2020
@ekager ekager changed the title Expose GeckoSession CompositorController clearColor Create dummy engine surface with correct background color until we get a onFirstContentfulPaint Apr 23, 2020
@ekager
Copy link
Contributor Author

ekager commented Apr 23, 2020

I filed this in AC because this is where the onFirstContentfulPaint callbacks live and I figure at the minimum we would need to expose those to Fenix in order to show/hide some dummy background view.

@pocmo
Copy link
Contributor

pocmo commented Apr 27, 2020

at the minimum we would need to expose those to Fenix in order to show/hide some dummy background view.

Would it also be an option to hide the geckoview until we get onFirstContentfulPaint() and just show the window background in the meantime?

@ekager
Copy link
Contributor Author

ekager commented May 1, 2020

That sounds way less complicated if that works 🙂

@pocmo
Copy link
Contributor

pocmo commented May 4, 2020

That sounds way less complicated if that works 🙂

I saw your PR and wonder if you tried this and if that works? If so then we could consider maybe adding this to GeckoEngineView. It already registers an EngineSession.Observer and could use that to hide/show the internal GeckoView. With that we wouldn't need to add anything to Session(State) and the app wouldn't need to do anything manually. :)

ekager added a commit to ekager/android-components that referenced this issue May 5, 2020
ekager added a commit to ekager/android-components that referenced this issue May 5, 2020
ekager added a commit to ekager/android-components that referenced this issue May 14, 2020
bors bot pushed a commit that referenced this issue May 14, 2020
6844: For #6757 - Adds firstContentfulPaint callback to SessionState r=pocmo a=ekager



Co-authored-by: ekager <ekager@mozilla.com>
@data-sync-user data-sync-user changed the title Create dummy engine surface with correct background color until we get a onFirstContentfulPaint FNX3-22690 ⁃ Create dummy engine surface with correct background color until we get a onFirstContentfulPaint Aug 4, 2020
@data-sync-user data-sync-user changed the title FNX3-22690 ⁃ Create dummy engine surface with correct background color until we get a onFirstContentfulPaint FNX2-17950 ⁃ Create dummy engine surface with correct background color until we get a onFirstContentfulPaint Aug 5, 2020
@st3fan st3fan changed the title FNX2-17950 ⁃ Create dummy engine surface with correct background color until we get a onFirstContentfulPaint Create dummy engine surface with correct background color until we get a onFirstContentfulPaint Aug 5, 2020
@ekager ekager closed this as completed Aug 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
<engine-gecko> Component: browser-engine-gecko 🌟 feature New functionality and improvements
Projects
None yet
Development

No branches or pull requests

2 participants