gl: Don't restore the viewport on function exit
authorMatthew Waters <matthew@centricular.com>
Tue, 5 Mar 2019 05:13:15 +0000 (16:13 +1100)
committerMatthew Waters <matthew@centricular.com>
Fri, 8 Mar 2019 06:49:05 +0000 (17:49 +1100)
commit6a37bf9bb91e329464a5c5349d2dd5e88bd95b54
tree0b29e831652d5eda518e3bfc42f2751cc19415bb
parent7bcd72f5b60fec45dbab141dfae3190c0370d2b7
gl: Don't restore the viewport on function exit

Doing so involves retrieving the current viewport from OpenGL which as
with any glGet operation, is expensive.

This means that the various sinks need to reset the viewport on draw.

In the process, fix resizing on cocoa.
ext/gl/gstglimagesink.c
gst-libs/gst/gl/cocoa/gstglcaopengllayer.m
gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m
gst-libs/gst/gl/gstglcolorconvert.c
gst-libs/gst/gl/gstglframebuffer.c
gst-libs/gst/gl/gstglviewconvert.c
gst-libs/gst/gl/gstglwindow.c
gst-libs/gst/gl/gstglwindow.h
gst-libs/gst/gl/viv-fb/gstglwindow_viv_fb_egl.c
gst-libs/gst/gl/viv-fb/gstglwindow_viv_fb_egl.h