[mutter/wip/3-monitors-on-nvidia: 213/221] wip! renderer/native: generalize meta_renderer_native_create_surface_egl_device
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/3-monitors-on-nvidia: 213/221] wip! renderer/native: generalize meta_renderer_native_create_surface_egl_device
- Date: Tue, 27 Nov 2018 20:14:17 +0000 (UTC)
commit ceab3b11409cb8400f19a2b288f3e0f7c05517ae
Author: Ray Strode <rstrode redhat com>
Date: Thu Sep 13 07:31:27 2018 -0400
wip! renderer/native: generalize meta_renderer_native_create_surface_egl_device
Eventually we want to use meta_renderer_native_create_surface_egl_device
for secondary displays, but it currently implicitly uses the primary
display and egl context.
This commit changes the function to take a display and a context
as arguments.
src/backends/native/meta-renderer-native.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index e887449ea..62a7512a4 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -2217,6 +2217,8 @@ meta_renderer_native_create_surface_gbm (CoglOnscreen *onscreen,
static gboolean
meta_renderer_native_create_surface_egl_device (CoglOnscreen *onscreen,
MetaMonitor *monitor,
+ EGLDisplay egl_display,
+ EGLConfig egl_config,
int width,
int height,
EGLStreamKHR *out_egl_stream,
@@ -2226,16 +2228,13 @@ meta_renderer_native_create_surface_egl_device (CoglOnscreen *onscreen,
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *cogl_context = framebuffer->context;
CoglDisplay *cogl_display = cogl_context->display;
- CoglDisplayEGL *cogl_display_egl = cogl_display->winsys;
CoglRenderer *cogl_renderer = cogl_display->renderer;
CoglRendererEGL *cogl_renderer_egl = cogl_renderer->winsys;
MetaRendererNativeGpuData *renderer_gpu_data = cogl_renderer_egl->platform;
MetaEgl *egl =
meta_renderer_native_get_egl (renderer_gpu_data->renderer_native);
- EGLDisplay egl_display = renderer_gpu_data->egl_display;
MetaOutput *output;
MetaCrtc *crtc;
- EGLConfig egl_config;
EGLStreamKHR egl_stream;
EGLSurface egl_surface;
EGLint num_layers;
@@ -2289,7 +2288,6 @@ meta_renderer_native_create_surface_egl_device (CoglOnscreen *onscreen,
return FALSE;
}
- egl_config = cogl_display_egl->egl_config;
egl_surface = meta_egl_create_stream_producer_surface (egl,
egl_display,
egl_config,
@@ -2490,6 +2488,9 @@ meta_onscreen_native_allocate (CoglOnscreen *onscreen,
{
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglOnscreenEGL *onscreen_egl = onscreen->winsys;
+ CoglContext *cogl_context = framebuffer->context;
+ CoglDisplay *cogl_display = cogl_context->display;
+ CoglDisplayEGL *cogl_display_egl = cogl_display->winsys;
MetaOnscreenNative *onscreen_native = onscreen_egl->platform;
MetaRendererNativeGpuData *renderer_gpu_data;
struct gbm_surface *gbm_surface;
@@ -2552,6 +2553,8 @@ meta_onscreen_native_allocate (CoglOnscreen *onscreen,
if (!meta_renderer_native_create_surface_egl_device (onscreen,
monitor,
+ renderer_gpu_data->egl_display,
+ cogl_display_egl->egl_config,
width, height,
&egl_stream,
&egl_surface,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]