GNOME Bugzilla – Bug 765194
caopengllayersink: renders blurry content on HiDPI screens because contentsScale is ignored
Last modified: 2016-04-18 07:33:43 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.
Created attachment 326219 [details] [review] gl/caopengllayersink: Actually unset caps_change flag
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