We have a Silverlight Embedded application running on WEC7 that has been widely used for a number of years.
We have recently upgraded from an OS based on the WEC7 v1.1 beta 4 BSP to the v2.3 BSP and have started to see occasional rendering issues.
If we change the visibility of controls on the Silverlight display whilst the device is busy sometimes part of the display is rendered incorrectly. This was mostly seen just after the device was first booted or when rapidly changing between different “pages” (Silverlight user control containing different controls)
For instance instead of showing:
[upload|IF3wAcH2roaOapGKr3Q+3aSe5DQ=]
It might show something like this just after booting (ignore the different number and the size of the blue gradient)
[upload|CEYwqBu6znihwCX5l6zEKGPCf6U=]
Or when rapidly changing between “pages” it would show (the green rectangle with the yellow border was the control previously shown):
[upload|GQWHPt1Tz/RM8YKL5CS/X153vfE=]
It only happened rarely - perhaps 1 in 20 times with a heavily loaded device…
We narrowed it down to the OpenGL rendering and starting from the public code for the OpenGL XAML renderer plugin (xrrendereropengl.dll which is renamed xamlrenderplugin.dll) we believe we have identified the issue. In the OpenGL Surface class (public\common\oak\XamlRenderPlugin\OpenGL\openglsurface.cpp) the AddDirty method does not check to see if the surface has already been marked as dirty, and so overrides the existing dirty area (m_rcDirty) rather than setting the dirty area to a rectangle that includes both dirty areas.
As the Silverlight core in the OS seems to combine the XAML elements on to a smaller number of OpenGL surfaces, we’d often get the “page” background element combined with some XAML elements from other smaller controls on a single OpenGL surface. This could result in the page background’s “mark as dirty”, being replaced by the small control’s “mark as dirty” which meant only the small control’s area was rendered to the surface with the rest being whatever was previously in the surface’s pixel buffer (either uninitialized memory or whatever was previously shown).
It would only occur when the device was busy because it would only happen if the UI thread had updated a second element on the same surface before the rendering thread had rendered the first one.
We wanted to ask if you had made any changes to the version of the OpenGL XAML renderer that you supply as part of the Silverlight installer for WEC7 compared with the public WEC7 code?
If you hadn’t made any other functional changes we can use the version of the DLL we have created based off the public WEC7 code, but obviously don’t want to do that if you’ve made other changes to the DLL you supply.