[mutter/wip/3-monitors-on-nvidia: 212/221] wip! renderer/native: pass MetaMonitor instead of MetaLogicalMonitor to meta_renderer_native_create_



commit ed1a4933f83c33dfaffcc236fd28247d41fbc896
Author: Ray Strode <rstrode redhat com>
Date:   Thu Sep 13 14:03:33 2018 -0400

    wip! renderer/native: pass MetaMonitor instead of MetaLogicalMonitor to 
meta_renderer_native_create_surface_egl_device

 src/backends/native/meta-renderer-native.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index 54ce51ef1..e887449ea 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -2216,7 +2216,7 @@ meta_renderer_native_create_surface_gbm (CoglOnscreen        *onscreen,
 #ifdef HAVE_EGL_DEVICE
 static gboolean
 meta_renderer_native_create_surface_egl_device (CoglOnscreen       *onscreen,
-                                                MetaLogicalMonitor *logical_monitor,
+                                                MetaMonitor        *monitor,
                                                 int                 width,
                                                 int                 height,
                                                 EGLStreamKHR       *out_egl_stream,
@@ -2233,7 +2233,6 @@ meta_renderer_native_create_surface_egl_device (CoglOnscreen       *onscreen,
   MetaEgl *egl =
     meta_renderer_native_get_egl (renderer_gpu_data->renderer_native);
   EGLDisplay egl_display = renderer_gpu_data->egl_display;
-  MetaMonitor *monitor;
   MetaOutput *output;
   MetaCrtc *crtc;
   EGLConfig egl_config;
@@ -2257,15 +2256,9 @@ meta_renderer_native_create_surface_egl_device (CoglOnscreen       *onscreen,
   if (egl_stream == EGL_NO_STREAM_KHR)
     return FALSE;
 
-  monitor = meta_logical_monitor_get_monitors (logical_monitor)->data;
   output = meta_monitor_get_main_output (monitor);
   crtc = meta_output_get_assigned_crtc (output);
 
-  /*
-   * An "logical_monitor" may have multiple outputs/crtcs in case its tiled,
-   * but as far as I can tell, EGL only allows you to pass one crtc_id, so
-   * lets pass the first one.
-   */
   output_attribs[0] = EGL_DRM_CRTC_EXT;
   output_attribs[1] = crtc->crtc_id;
   output_attribs[2] = EGL_NONE;
@@ -2506,6 +2499,7 @@ meta_onscreen_native_allocate (CoglOnscreen *onscreen,
 #ifdef HAVE_EGL_DEVICE
   MetaRendererView *view;
   MetaLogicalMonitor *logical_monitor;
+  MetaMonitor *monitor;
   EGLStreamKHR egl_stream;
 #endif
 
@@ -2548,8 +2542,16 @@ meta_onscreen_native_allocate (CoglOnscreen *onscreen,
 
       view = onscreen_native->view;
       logical_monitor = meta_renderer_view_get_logical_monitor (view);
+
+      /*
+       * An "logical_monitor" may have multiple outputs/crtcs in case its tiled,
+       * but as far as I can tell, EGL only allows you to pass one crtc_id, so
+       * lets pass the first one.
+       */
+      monitor = meta_logical_monitor_get_monitors (logical_monitor)->data;
+
       if (!meta_renderer_native_create_surface_egl_device (onscreen,
-                                                           logical_monitor,
+                                                           monitor,
                                                            width, height,
                                                            &egl_stream,
                                                            &egl_surface,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]