gl/caopengllayer: Apply layer.contentsScale to viewport dims

Fixes blurry content on HiDPI screens

https://bugzilla.gnome.org/show_bug.cgi?id=765194
This commit is contained in:
Heinrich Fink 2016-04-17 15:43:20 +01:00 committed by Tim-Philipp Müller
parent 614f80cbcf
commit caa9ad59e6

View file

@ -192,8 +192,9 @@ _context_ready (gpointer data)
if (self->queue_resize || self->last_bounds.size.width != self.bounds.size.width
|| self->last_bounds.size.height != self.bounds.size.height) {
if (self->resize_cb) {
self->resize_cb (self->resize_data, self.bounds.size.width,
self.bounds.size.height);
self->resize_cb (self->resize_data,
self.bounds.size.width*self.contentsScale,
self.bounds.size.height*self.contentsScale);
gl->GetIntegerv (GL_VIEWPORT, self->expected_dims);
} else {