From a6b1f55546434b3476f00db66a4b3cbe13b6dbf6 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 12 Dec 2011 21:17:33 +0000 Subject: [PATCH] kms: Don't use egl_surface_width/height The egl_surface_width/height properties in CoglDisplayEGL were accidentally being conditionally defined depending on KMS support. They are not necessary because CoglDisplayKMS also already stores the width/height and this was just copied over to the EGL dipslay. Reviewed-by: Robert Bragg --- cogl/winsys/cogl-winsys-egl-kms.c | 8 ++------ cogl/winsys/cogl-winsys-egl-private.h | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/cogl/winsys/cogl-winsys-egl-kms.c b/cogl/winsys/cogl-winsys-egl-kms.c index bb9233f31..ec1d02bd9 100644 --- a/cogl/winsys/cogl-winsys-egl-kms.c +++ b/cogl/winsys/cogl-winsys-egl-kms.c @@ -261,7 +261,6 @@ _cogl_winsys_egl_try_create_context (CoglDisplay *display, CoglRenderer *renderer = display->renderer; CoglRendererEGL *egl_renderer = renderer->winsys; CoglDisplayEGL *egl_display = display->winsys; - CoglDisplayKMS *kms_display = egl_display->platform; egl_display->egl_context = eglCreateContext (egl_renderer->edpy, NULL, @@ -287,9 +286,6 @@ _cogl_winsys_egl_try_create_context (CoglDisplay *display, return FALSE; } - egl_display->egl_surface_width = kms_display->width; - egl_display->egl_surface_height = kms_display->height; - return TRUE; } @@ -457,8 +453,8 @@ _cogl_winsys_onscreen_init (CoglOnscreen *onscreen, _cogl_winsys_onscreen_swap_buffers (onscreen); _cogl_framebuffer_winsys_update_size (framebuffer, - egl_display->egl_surface_width, - egl_display->egl_surface_height); + kms_display->width, + kms_display->height); return TRUE; } diff --git a/cogl/winsys/cogl-winsys-egl-private.h b/cogl/winsys/cogl-winsys-egl-private.h index 9a0a64368..98caabf37 100644 --- a/cogl/winsys/cogl-winsys-egl-private.h +++ b/cogl/winsys/cogl-winsys-egl-private.h @@ -112,8 +112,7 @@ typedef struct _CoglDisplayEGL EGLSurface dummy_surface; #if defined (COGL_HAS_EGL_PLATFORM_POWERVR_NULL_SUPPORT) || \ defined (COGL_HAS_EGL_PLATFORM_GDL_SUPPORT) || \ - defined (COGL_HAS_EGL_PLATFORM_ANDROID_SUPPORT) || \ - defined (COGL_HAS_EGL_PLATFORM_KMS_SUPPORT) + defined (COGL_HAS_EGL_PLATFORM_ANDROID_SUPPORT) int egl_surface_width; int egl_surface_height; gboolean have_onscreen;