Closed Bug 1511951 Opened 2 years ago Closed 2 years ago

[Wayland] OpenGL & HiDPI is an unusable combo

Categories

(Core :: Graphics, defect, P2)

62 Branch
Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Enabling Wayland/OpenGL on HiDPI does not work, I see only blank screen.
Summary: [Wayland] OpenGL & HiDPI is unusable combo → [Wayland] OpenGL & HiDPI is an unusable combo
- Wayland - Set proper scale to wl_egl_window when it's created and resized
- Wayland - Remove unused gtk_widget_set_app_paintable()
Thanks a lot! This is better than the previously suggested patch https://gist.github.com/IShashkin/ad33a8fd55290065fabfcf174db3ebd5 — looks like the main windows are now always correctly scaled :) YAY!

Popovers are still somewhat buggy. It is possible to click on an extension and *sometimes* get oversized contents. Also just discovered: after moving the window from the HiDPI to the low DPI screen, the popovers don't appear on the low DPI screen, sometimes they appear on the big screen or they're not visible at all.
Oh wait, no. I was actually running without GL. I removed https://bugzilla.mozilla.org/attachment.cgi?id=8963005 from my build — actually starting Firefox with GL would hang in SendFlushRendering because of that.

With this patch, I get the same multi-monitor (mixed DPI) bugs as with that one.
(In reply to Martin Stránský [:stransky] from comment #1)
> Created attachment 9029412 [details]
> Bug 1511951 - [Wayland/EGL] HiDPI - Set scale to EGL window, r=jhorak
> 
> - Wayland - Set proper scale to wl_egl_window when it's created and resized
> - Wayland - Remove unused gtk_widget_set_app_paintable()

My two cents on your patch. In addition to setup scale factor on initialization, we also need to react to changing of scale factor (change surface scale factor or maybe something else). It can happen if a user change it directly in DE settings or for example the window moved from LowDPI screen to HiDPI screen (as greg mentioned). To subscribe scale factor changing, we can connect to signal "notify::scale-factor" of MozContainer. I hope that helps.
Depends on: 1489902
Keywords: checkin-needed
Thanks for the feedback. Please file a follow up bugs as this one landed as this one is about basic functionality of Wayland/HiDPI/EGL.
Pushed by ebalazs@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/32b8595b7c20
[Wayland/EGL] HiDPI - Set scale to EGL window, r=jhorak
Keywords: checkin-needed
(In reply to gashish4all from comment #4)
> (In reply to Martin Stránský [:stransky] from comment #1)
> > Created attachment 9029412 [details]
> > Bug 1511951 - [Wayland/EGL] HiDPI - Set scale to EGL window, r=jhorak
> > 
> > - Wayland - Set proper scale to wl_egl_window when it's created and resized
> > - Wayland - Remove unused gtk_widget_set_app_paintable()
> 
> My two cents on your patch. In addition to setup scale factor on
> initialization, we also need to react to changing of scale factor (change
> surface scale factor or maybe something else). It can happen if a user
> change it directly in DE settings or for example the window moved from
> LowDPI screen to HiDPI screen (as greg mentioned). To subscribe scale factor
> changing, we can connect to signal "notify::scale-factor" of MozContainer. I
> hope that helps.

I can see it now, filed as Bug 1512416. Thanks.
https://hg.mozilla.org/mozilla-central/rev/32b8595b7c20
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.