After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758937 - Blurry widgets on hidpi displays
Blurry widgets on hidpi displays
Status: RESOLVED FIXED
Product: clutter-gtk
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-gtk maintainer(s)
clutter-gtk maintainer(s)
Depends on: 758936
Blocks: 758876
 
 
Reported: 2015-12-02 02:06 UTC by Lionel Landwerlin
Modified: 2015-12-03 23:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
actor: fix incorrect allocation logic (5.58 KB, patch)
2015-12-02 02:06 UTC, Lionel Landwerlin
none Details | Review
actor: propagate scale factor from embedder to embedded (3.49 KB, patch)
2015-12-02 02:06 UTC, Lionel Landwerlin
committed Details | Review
actor: fix incorrect allocation logic (5.68 KB, patch)
2015-12-03 16:17 UTC, Lionel Landwerlin
committed Details | Review

Description Lionel Landwerlin 2015-12-02 02:06:34 UTC
It seems we're missing the propagation of the scale factor and it ends up
drawing 1x scale widgets into a 2x scaled. That looks blurry :(
Comment 1 Lionel Landwerlin 2015-12-02 02:06:37 UTC
Created attachment 316641 [details] [review]
actor: fix incorrect allocation logic

Using a pointer comparison to prevent resetting the size of the canvas/actor
is incorrect on Wayland. Let's make that logic X11 only.
Comment 2 Lionel Landwerlin 2015-12-02 02:06:42 UTC
Created attachment 316642 [details] [review]
actor: propagate scale factor from embedder to embedded

We need to set the scale factor correctly on the embedded Gtk+ widgets to
avoid blurry widgets on hidpi displays.
Comment 3 Emmanuele Bassi (:ebassi) 2015-12-03 16:02:31 UTC
Review of attachment 316641 [details] [review]:

::: clutter-gtk/gtk-clutter-actor.c
@@ +343,2 @@
+          if (pixmap != priv->pixmap)
+            clutter_x11_texture_pixmap_set_pixmap (CLUTTER_X11_TEXTURE_PIXMAP (priv->texture), pixmap);

Shouldn't the priv->pixmap be replaced here? The original code stored the surface pointer.
Comment 4 Emmanuele Bassi (:ebassi) 2015-12-03 16:04:41 UTC
Review of attachment 316642 [details] [review]:

::: clutter-gtk/gtk-clutter-actor.c
@@ +329,3 @@
+   * code know the size to allocate?
+   */
+  gtk_widget_get_preferred_width (priv->widget, &dummy, NULL);

I guess we could change the behaviour so that we could honour the content-gravity, and use the preferred size of the widget, instead of allocating the size of the actor. But that's for another commit.
Comment 5 Lionel Landwerlin 2015-12-03 16:17:28 UTC
Created attachment 316726 [details] [review]
actor: fix incorrect allocation logic

Using a pointer comparison to prevent resetting the size of the canvas/actor
is incorrect on Wayland. Let's make that logic X11 only.
Comment 6 Lionel Landwerlin 2015-12-03 16:18:55 UTC
Review of attachment 316641 [details] [review]:

::: clutter-gtk/gtk-clutter-actor.c
@@ +343,2 @@
+          if (pixmap != priv->pixmap)
+            clutter_x11_texture_pixmap_set_pixmap (CLUTTER_X11_TEXTURE_PIXMAP (priv->texture), pixmap);

Thanks, updated that!
Comment 7 Emmanuele Bassi (:ebassi) 2015-12-03 16:29:30 UTC
Review of attachment 316642 [details] [review]:

Okay.
Comment 8 Emmanuele Bassi (:ebassi) 2015-12-03 16:29:56 UTC
Review of attachment 316726 [details] [review]:

Okay.
Comment 9 Lionel Landwerlin 2015-12-03 16:31:10 UTC
Just adding that this needs the GTK+ patch (from the blocker bug) to land first.
Comment 10 Lionel Landwerlin 2015-12-03 23:24:31 UTC
Review of attachment 316642 [details] [review]:

Pushed to master.
Comment 11 Lionel Landwerlin 2015-12-03 23:24:51 UTC
Review of attachment 316726 [details] [review]:

Pushed to master.