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 765194 - caopengllayersink: renders blurry content on HiDPI screens because contentsScale is ignored
caopengllayersink: renders blurry content on HiDPI screens because contentsSc...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Mac OS
: Normal normal
: 1.8.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-18 06:59 UTC by Heinrich Fink
Modified: 2016-04-18 07:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gl/caopengllayer: Apply layer.contentsScale to viewport (1.17 KB, patch)
2016-04-18 06:59 UTC, Heinrich Fink
committed Details | Review
gl/caopengllayersink: Actually unset caps_change flag (966 bytes, patch)
2016-04-18 07:00 UTC, Heinrich Fink
committed Details | Review

Description Heinrich Fink 2016-04-18 06:59:31 UTC
Created attachment 326218 [details] [review]
gl/caopengllayer: Apply layer.contentsScale to viewport

On HiDPI screens, using caopengllayersink results in blurry content. The reason for this is that we ignore the layer's contentsScale property. Quote from Apple docs: 

"The contentsScale property of the CALayer class defines the mapping between the coordinate space of the layer (measured in points) and the backing store (measured in pixels). You can change this value as needed to indicate to Core Animation that the bitmap of the backing layer needs to be bigger or smaller."

Attached is (1) a patch that adds the contentScale to be respected in the layer's OpenGL viewport dimensions, and (2) a small bugfix that prevents the caopengllayersink to unnecessarily reset its viewport for each frame that I discovered while working on the first patch.
Comment 1 Heinrich Fink 2016-04-18 07:00:21 UTC
Created attachment 326219 [details] [review]
gl/caopengllayersink: Actually unset caps_change flag
Comment 2 Sebastian Dröge (slomo) 2016-04-18 07:32:46 UTC
commit 44ec245b48cec3800c7dcd66fd623304d5b0494f
Author: Heinrich Fink <hfink@toolsonair.com>
Date:   Sun Apr 17 15:45:41 2016 +0100

    gl/caopengllayersink: Actually unset caps_change flag after resize
    
    Otherwise, the sink would execute "on_resize" for each frame.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765194

commit ef12e05a59d152f04ba6e27a63d4a69d4696dcf4
Author: Heinrich Fink <hfink@toolsonair.com>
Date:   Sun Apr 17 15:43:20 2016 +0100

    gl/caopengllayer: Apply layer.contentsScale to viewport dims
    
    Fixes blurry content on HiDPI screens
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765194