WindowSystems: Change checkForNewSurface function name to checkForNewSurfaceNativeContent
authorRahul Singhal <rasinghal@nvidia.com>
Tue, 20 Mar 2012 07:11:49 +0000 (12:41 +0530)
committerMichael Schuldt <michael.schuldt@bmw.de>
Fri, 23 Mar 2012 09:28:58 +0000 (10:28 +0100)
Since surface creation and the surface having associated native
content are now independent, this function now checks for a surface
having native content. Hence changed function name to reflect this
new behaviour.

Also removed extra setNativeContent() from NewWindow()

LayerManagerPlugins/Renderers/Graphic/include/WindowSystems/WaylandWindowSystem.h
LayerManagerPlugins/Renderers/Graphic/include/WindowSystems/X11WindowSystem.h
LayerManagerPlugins/Renderers/Graphic/src/WindowSystems/WaylandWindowSystem.cpp
LayerManagerPlugins/Renderers/Graphic/src/WindowSystems/X11WindowSystem.cpp

index e205371..ae221c6 100644 (file)
@@ -110,7 +110,7 @@ private:
     bool initCompositor();
     void shutdownCompositor();
     Surface* getSurfaceFromNativeSurface(struct native_surface* nativeSurface);
-    void checkForNewSurface();
+    void checkForNewSurfaceNativeContent();
     void printDebug();
     void* eventLoop();
 
index 24f13df..86e08b5 100644 (file)
@@ -106,7 +106,7 @@ private:
     void createSurfaceForWindow(Window w);
     void configureSurfaceWindow(Window w);
     Surface* getSurfaceForWindow(Window w);
-    void checkForNewSurface();
+    void checkForNewSurfaceNativeContent();
     void destroy_surface(Window w);
     void updateSurface(Surface* s, Window w, XPlatformSurface* x11surf);
     void MapWindow(Window w);
index dc598af..ca67453 100644 (file)
@@ -191,7 +191,7 @@ Surface* WaylandWindowSystem::getSurfaceFromNativeSurface(struct native_surface*
     return NULL;
 }
 
-void WaylandWindowSystem::checkForNewSurface()
+void WaylandWindowSystem::checkForNewSurfaceNativeContent()
 {
     m_pScene->lockScene();
     LayerList layers = m_pScene->getCurrentRenderOrder();
@@ -548,7 +548,7 @@ extern "C" void WaylandWindowSystem::surfaceIFFrame(struct wl_client *client,
     wl_client_add_resource(client, &cb->resource);
     wl_list_insert(windowSystem->m_listFrameCallback.prev, &cb->link);
 
-    windowSystem->checkForNewSurface();
+    windowSystem->checkForNewSurfaceNativeContent();
     idleEventRepaint(windowSystem);
 
     LOG_DEBUG("WaylandWindowSystem", "surfaceIFFrame OUT");
index d62e4ad..395ad4e 100644 (file)
@@ -201,7 +201,7 @@ Surface* X11WindowSystem::getSurfaceForWindow(Window w)
     return NULL;
 }
 
-void X11WindowSystem::checkForNewSurface()
+void X11WindowSystem::checkForNewSurfaceNativeContent()
 {
     m_pScene->lockScene();
     LayerList layers = m_pScene->getCurrentRenderOrder();
@@ -386,13 +386,12 @@ void X11WindowSystem::NewWindow(Surface* surface, Window window)
 
         LOG_DEBUG("X11WindowSystem", "Created native Surface for X11 Window id " << window);
 
-        surface->setNativeContent(window);
         surface->platform = platformSurface;
 
         int winWidth = att.width;
         int winHeight = att.height;
 
-        surface->OriginalSourceHeight =winHeight;
+        surface->OriginalSourceHeight = winHeight;
         surface->OriginalSourceWidth = winWidth;
 
         LOG_DEBUG("X11WindowSystem", "Original width " << surface->OriginalSourceWidth);
@@ -864,7 +863,7 @@ init_complete:
             }
             else
             {
-                this->checkForNewSurface();
+                this->checkForNewSurfaceNativeContent();
                 checkRedraw = true;
             }