gsk/gl: support non-standard default framebuffer
authorChristian Hergert <christian@hergert.me>
Fri, 11 Feb 2022 05:51:15 +0000 (21:51 -0800)
committerChristian Hergert <christian@hergert.me>
Tue, 22 Feb 2022 20:01:24 +0000 (12:01 -0800)
commitf9268e813778edf6d2d15655686aa5bcd9a0dfb8
tree69789465cb0061eeec105064ba57c55882382432
parentb4b282dc81641de12fdd276e6dc9bb4dedb5b114
gsk/gl: support non-standard default framebuffer

There are situations where our "default framebuffer" is not actually
zero, yet we still want to apply a scissor rect.

Generally, 0 is the default framebuffer. But on platforms where we need
to bind a platform-specific feature to a GL_FRAMEBUFFER, we might have a
default that is not 0. For example, on macOS we bind an IOSurfaceRef to
a GL_TEXTURE_RECTANGLE which then is assigned as the backing store for a
framebuffer. This is different than using gsk_gl_renderer_render_texture()
in that we don't want to incur an extra copy to the destination surface
nor do we even have a way to pass a texture_id into render_texture().
gdk/gdkglcontext.c
gdk/gdkglcontextprivate.h
gsk/gl/gskglcommandqueue.c
gsk/gl/gskglcommandqueueprivate.h
gsk/gl/gskglrenderjob.c