Make OpenGL 2D rendering working again.

Change-Id: I29101aee77ac37f5a8e1b929793d7554bc425b26
Reviewed-on: https://gerrit.libreoffice.org/10075
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
(cherry picked from commit d72d80aa8393c9416423602779cb63b22141033a)
Reviewed-on: https://gerrit.libreoffice.org/10089
Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>