From: Michael Schuldt Date: Mon, 5 Dec 2011 15:05:27 +0000 (+0100) Subject: Allocate platform surface corrected. X-Git-Tag: ivi-layer-management_version_0_9_5_rc~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af9753b4d6d44212e354a7501ecd7693e2737801;p=profile%2Fivi%2Flayer-management.git Allocate platform surface corrected. Due to the fact that now logical surface without native content are available. This check must be included to handle the correct native content with the corresponding surface. --- diff --git a/LayerManagerPlugins/Renderers/Graphic/src/WindowSystems/X11WindowSystem.cpp b/LayerManagerPlugins/Renderers/Graphic/src/WindowSystems/X11WindowSystem.cpp index b140e81..d0cca77 100644 --- a/LayerManagerPlugins/Renderers/Graphic/src/WindowSystems/X11WindowSystem.cpp +++ b/LayerManagerPlugins/Renderers/Graphic/src/WindowSystems/X11WindowSystem.cpp @@ -209,7 +209,10 @@ void X11WindowSystem::checkForNewSurface() SurfaceList surfaces = (*current)->getAllSurfaces(); for(SurfaceListConstIterator currentS = surfaces.begin(); currentS != surfaces.end(); currentS++) { - allocatePlatformSurface(*currentS); + if (currentS->hasNativeContent()) + { + allocatePlatformSurface(*currentS); + } } } m_pScene->unlockScene(); @@ -339,8 +342,6 @@ void X11WindowSystem::UnMapWindow(Window window) if (x11surf->pixmap) { int result = XFreePixmap(x11Display, x11surf->pixmap); - delete surface->platform; - surface->platform = NULL; LOG_DEBUG("X11WindowSystem", "XFreePixmap() returned " << result); } } @@ -419,6 +420,8 @@ void X11WindowSystem::DestroyWindow(Window window) UnMapWindow(window); LOG_DEBUG("X11WindowSystem", "Remove Native Content from Surface " << surface->getID()); surface->removeNativeContent(); + delete surface->platform; + surface->platform = NULL; } } @@ -607,7 +610,7 @@ void X11WindowSystem::Screenshot() } graphicSystem->saveScreenShotOfFramebuffer(screenShotFile); -// graphicSystem->swapBuffers(); +// graphicSystem->swapBuffers(); takeScreenshot = ScreenShotNone; LOG_DEBUG("X11WindowSystem", "Done taking screenshot"); @@ -979,6 +982,7 @@ void X11WindowSystem::stop() void X11WindowSystem::allocatePlatformSurface(Surface* surface) { + LOG_DEBUG("X11WindowSystem","allocatePlatformSurface begin"); XPlatformSurface* nativeSurface = (XPlatformSurface*)surface->platform; if (!nativeSurface) { @@ -987,6 +991,7 @@ void X11WindowSystem::allocatePlatformSurface(Surface* surface) NewWindow(surface, surface->getNativeContent()); MapWindow(surface->getNativeContent()); } + LOG_DEBUG("X11WindowSystem","allocatePlatformSurface end"); } void X11WindowSystem::doScreenShot(std::string fileName)