X11WindowSystem: Fixing parameter assignment
authorMichael Schuldt <michael.schuldt@bmw.de>
Wed, 3 Jul 2013 14:10:59 +0000 (16:10 +0200)
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Fri, 5 Jul 2013 10:56:48 +0000 (12:56 +0200)
- the surface parameter should be directly assigned after
  the surface is available.

- it does not care if the client buffer is already available
  for the assignement.

- Fixes a timing issue if a resize is triggered directly after
  a surface creation

Signed-off-by: Michael Schuldt <michael.schuldt@bmw.de>
LayerManagerPlugins/Renderers/Graphic/src/WindowSystems/X11WindowSystem.cpp
RELEASE_NOTES.txt

index 63d36d4..451a6f1 100644 (file)
@@ -263,7 +263,8 @@ void X11WindowSystem::configureSurfaceWindow(Window window)
 {
     if (isWindowValid(window))
     {
-        LOG_DEBUG("X11WindowSystem", "Updating window " << window);
+        LOG_INFO("X11WindowSystem", "Configure surface window " << window);
+
         XWindowAttributes att;
         XGetWindowAttributes(x11Display, window, &att);
         int winWidth = att.width;
@@ -275,16 +276,11 @@ void X11WindowSystem::configureSurfaceWindow(Window window)
             LOG_WARNING("X11WindowSystem", "Could not find surface for window " << window);
             return;
         }
-        if (!surface->platform)
-        {
-            LOG_WARNING("X11WindowSystem", "Platform surface not available for window " << window);
-            return;
-        }
-
-        LOG_DEBUG("X11WindowSystem", "Updating surface " << surface->getID());
+        LOG_INFO("X11WindowSystem", "Configure surface dimension " << surface->getID());
 
         if (surface->OriginalSourceHeight != winHeight || surface->OriginalSourceWidth != winWidth)
         {
+            LOG_INFO("X11WindowSystem","Surface dimension differs from creation dimension");
             unsigned int layerid = surface->getContainingLayerId();
             surface->OriginalSourceHeight = winHeight;
             surface->OriginalSourceWidth = winWidth;
@@ -305,12 +301,20 @@ void X11WindowSystem::configureSurfaceWindow(Window window)
             }
             surface->damaged = false; // Waiting for damage event to get updated content
             surface->m_surfaceResized = true;
+            LOG_INFO("X11WindowSystem", "Dimension  : " << surface->OriginalSourceWidth << ", " << surface->OriginalSourceHeight);
+            LOG_INFO("X11WindowSystem", "SourceDim  : " << surface->getSourceRegion().width << ", " << surface->getSourceRegion().height);
+            LOG_INFO("X11WindowSystem", "DestDim    : " << surface->getDestinationRegion().width << ", " << surface->getDestinationRegion().height);
+        }
+                
+        if (!surface->platform)
+        {
+            LOG_WARNING("X11WindowSystem", "Platform surface not available for window " << window);
+            return;
         }
 
         UnMapWindow(window);
-        MapWindow(window);
-
-        LOG_DEBUG("X11WindowSystem", "Done Updating window " << window);
+        MapWindow(window);        
+        LOG_INFO("X11WindowSystem", "Done configure surface " << surface->getID() << " for window " << window);
     }
 }
 
@@ -423,7 +427,7 @@ void X11WindowSystem::NewWindow(Surface* surface, Window window)
 {
     if (isWindowValid(window))
     {
-        LOG_DEBUG("X11WindowSystem", "Creating Surface for new window " << window);
+        LOG_INFO("X11WindowSystem", "Creating Surface for new window " << window);
         // get the windows attributes
         XWindowAttributes att;
         int status = XGetWindowAttributes(x11Display, window, &att);
@@ -478,7 +482,7 @@ void X11WindowSystem::NewWindow(Surface* surface, Window window)
     {
         LOG_DEBUG("X11WindowSystem", "skipping window");
     }
-    LOG_DEBUG("X11WindowSystem", "created the new surface");
+    LOG_INFO("X11WindowSystem", "created the new surface");
 }
 
 void X11WindowSystem::DestroyWindow(Window window)
index 9ea8f28..ff6d061 100644 (file)
@@ -8,6 +8,7 @@ Bugfixes:
 - X11WindowSystem: fixed resize handling
 - X11EglImage: fixing a issue which causes memory leak in XServer
 - dbusIpcModule: DBUS Interspection result corrected
+- Fixing a timing issue during parameter assignment
 
 Improvements:
 - Improved watchdog plug-in monitoring, to detect possible