Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - OpenKODE: Flash app and OpenVG drawing together - Comple screen goes black except the OPenVG part : (5 Items)
   
OpenKODE: Flash app and OpenVG drawing together - Comple screen goes black except the OPenVG part  
Hello,

Here is the environment:
Hardware: ARM/IMX35
OS: QNX6.4.0 and OpenVG1.1

The application consists of Flash Application in the complete screen; however OpenVG drawing window is around 1/3rd part
 of the whole screen. I am using OpenKODE for integrating these two.

High level API callings are:
-----------------------------------------------------------------------------
kd_win = kdCreateWindow(egl_disp, egl_conf, KD_NULL);
......
///setting properties of kd_win like class, position, size etc.
......
kdRealizeWindow(kd_win, &egl_win);
egl_surf = eglCreateWindowSurface(egl_disp, egl_conf, egl_win, NULL);
eglSurfaceAttrib(egl_disp, egl_surf, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
eglMakeCurrent(egl_disp, egl_surf, egl_surf, egl_ctx);
eglSwapInterval(egl_disp, interval);
....
m_warpImage = vgCreateImage(m_imageFormat, m_display_width, m_display_height, VG_IMAGE_QUALITY_BETTER);

m_displayPixelRect = (unsigned char*)malloc(m_display_height * m_display_width);
	   memset(m_displayPixelRect, 0, m_display_height * m_display_width);
	   
	   VGfloat mat[9];
	   vguComputeWarpQuadToQuad(0, 0, (VGfloat)m_display_width, 0.0f, (VGfloat)m_display_width * 0.8f, 
(VGfloat)m_display_height * 0.5f, (VGfloat)m_display_width * 0.2f, (VGfloat)m_display_height * 0.5f,
	                              0, 0, (VGfloat)m_display_width, 0, (VGfloat)m_display_width, (VGfloat)m_display_height, 0
.0f, (VGfloat)m_display_height, mat);

....
memcpy(m_warpMatrix, mat, sizeof(VGfloat)*9);

----------------------------------------------------------------------------------

The Flash app is up all the time and it allows me to create and draw an OpenVG map into the specific area Flash has 
decided. Everything works fine until the OpenVG map drawing starts. As soon as Map comes up in the front, the whole 
screen goes back except the OpenVG map window. After few seconds (around 3-4 seconds) the Flash app comes up and the 
whole integrated Flash and OpenVG apps work together properly. This problem comes up again if I resize the OpenVG map 
area for which I need to create a different size OpenVG window (egl_surface) again.

Can someone please let me know what is the cause of the problem? I hope I have given the sufficient information. Please 
let me know if you want more decryption.  

Thanks a lot.
Shivendra


Re: OpenKODE: Flash app and OpenVG drawing together - Comple screen goes black except the OPenVG part  
As a start if you could provide the winmgr.conf file you're using, as well as an io-winmgr dump (e.g. io-winmgr -d/tmp/
windump) during both states you described (desired results vs "blank screen"). This information should help get us on 
the same page.
Re: OpenKODE: Flash app and OpenVG drawing together - Comple screen goes black except the OPenVG part  
Hi Joel,

Thank you so much for your reply. I'm sorry for the delay in providing more information.

Here are the attached winmgr.conf, and the dump files at both the states:

1. Only Flash app is running and 
2. Both Flash and OpenVG apps are running.

I'm sorry, I was not aware of these debugging stuff; therefore please excuse me if you find something trivial after the 
analysis of these logs and conf files.

Thanks a lot.

-Shivendra



Attachment: Compressed file winmgr_conf and dump files.zip 12.93 KB
Re: OpenKODE: Flash app and OpenVG drawing together - Comple screen goes black except the OPenVG part  
My observation of the dumps:

windump_before_OPenVG_app_running.txt

Things appear to be normal for the most part with the exception that there appears to be a second openvg window in 
realize state, and is being created with the MapDisplay class.

When this dump was taken, I assume you see a full screen flash HMI window?


windump_after_running_OpenVG_app.txt

Based on this dump, it appears the second window, mentioned above was eventually destroyed some point after having 
created a third openvg window with no class.

When this dump was taken, I assume you see just the VG map window surrounded by black?



Other then the additional window being created and destroyed between creation of the flash window and final third window
 (map?) things appear to be alright. It is however possible you're running into a known bug in which there can be bit of
 hicup during a transition from autonomous to non-autonomous which could vary in length depending on the frequency of 
you're applications posts. To work around this issue, you can remove the "wfd-pipeline = 1" line from you're winmgr.conf
 to avoid running in autonomous mode.

You could also try playing with the order in which you're applications are started, in particular starting the openvg 
application prior to flash, may help ensure flash stays on top, however you'll need to enable source-alpha for the flash
 window if you intend to punch a hole in the flash window to display content beneath it.

If either of those suggestions don't work out, do you have any additional details about this apparent third window?



Re: OpenKODE: Flash app and OpenVG drawing together - Comple screen goes black except the OPenVG part  
I made wfd-pipeline = 1 in winmgr.conf, and it doesn't display anything on the screen. The Flash application doesn't 
show up. 

Regarding multiple OpenVG windows: The app has to re-size and changes the zoom levels of the map in particular events, 
therefore the the OpenVG app destroys its original map window and then creates a new window with the new window 
properties. 

I tried NOT resizing the map though, but the black border still persists.  

Please advise.

-Shivendra