This patch series is the groundwork for moving the compositor's EGL and GL 
state into gles2-renderer.c.

The biggest change is the extension of the gles2-renderer API which the 
backends use.
This is API is added for 3 reasons:
 - To allow the EGL state to be moved to gles2-renderer 
 - To give gles2-renderer enough events so that it can manage per-output state.
 - To remove duplicate EGL code in the backends.

A gles2_renderer_init_without_config call followed by a 
gles2_renderer_select_config call is a
replacement for the gles2_renderer_init function. This allows backends to 
select their own EGL config
which currently the Android backend does (which looks like a hack to select a 
display).

gles2_renderer_use_rgba_shader is used in the wayland backend to select a 
shader suitable to draw
a border. This could perhaps be replaced with a function which draws the entire 
border.

It also addes 3 new function pointers to weston_renderer:
 - read_pixels: Used for screenshooting and recording to read from the current 
framebuffer of a output.
 - create_surface: Used in conjunction with destroy_surface to create and 
destroy per-surface renderer state.
 - surface_set_color: Used to set a surface to output a solid color.

I'd like to hold off on moving all the EGL and GL state until these patches are 
merged and Kristian gives
me a freeze on the gles2-renderer.c file since doing that would pretty much 
touch the entire file.

John Kåre Alsaker (9):
  gles2-renderer: Provide an API for backends to use.
  gles2-renderer: Adds function to select the RGBA shader for the
    wayland backend.
  compositor: Add a create_surface callback to weston_renderer.
  compositor: Add per output and per surface renderer state.
  compositor: Change API to better handle mode switches. Also moves
    EGLSurface into gles2-renderer.
  gles2-renderer: Adds an utility function which calls eglMakeCurrent.
  compositor: Add a renderer function to read out pixels and remove the
    GL calls from screenshooter.
  compositor: Move arrays used by wayland backend rendering into the
    wayland backend.
  compositor: Add a function to set surface color in weston_renderer
    and move color state to gles2-renderer.

 src/compositor-android.c |  72 ++++-------
 src/compositor-drm.c     |  87 ++++---------
 src/compositor-wayland.c |  88 ++++---------
 src/compositor-x11.c     |  71 ++---------
 src/compositor.c         |  12 +-
 src/compositor.h         |  39 +++++-
 src/gles2-renderer.c     | 323 ++++++++++++++++++++++++++++++++++++++++++-----
 src/screenshooter.c      |  27 ++--
 8 files changed, 427 insertions(+), 292 deletions(-)

-- 
1.7.12

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to