- October 24, 2011
- 261
- 207
- 44
Hey guys,
I worked on a feature that enhanced the OSD to show some of the comskip markers and I had a question about the gui performance.
It seems like the whole OSD gets redrawn on a timer. Is there a way to make it so that only the components that have changed get updated. Like maybe creating event handlers so the positions or sized of some of the textures get updated instead of redrawing the whole thing?
It is almost as if the whole class gets started up and shutdown over and over agian. Because the comskip markers and the background image for the progress bar do not change as long as you are on the same recording, it kind of seems like a waste of resources to draw them over and over again.
Here is a sample from my log. You can see I went ahead and logged the finalizConstruction method and the Render Method. Perhaps the key would be to move the rendering of the background into a Pre-render method that only gets called once.
Thanks,
Matt
I worked on a feature that enhanced the OSD to show some of the comskip markers and I had a question about the gui performance.
It seems like the whole OSD gets redrawn on a timer. Is there a way to make it so that only the components that have changed get updated. Like maybe creating event handlers so the positions or sized of some of the textures get updated instead of redrawing the whole thing?
It is almost as if the whole class gets started up and shutdown over and over agian. Because the comskip markers and the background image for the progress bar do not change as long as you are on the same recording, it kind of seems like a waste of resources to draw them over and over again.
Here is a sample from my log. You can see I went ahead and logged the finalizConstruction method and the Render Method. Perhaps the key would be to move the rendering of the background into a Pre-render method that only gets called once.
Code:
2012-02-29 04:00:51.483768 [Info.][PoolThread14(14)]: RecordedTV: No thumbnail created for - The First 48 - S11E16 - Final Call; Fatal Fury.ts
2012-02-29 04:00:53.288871 [Debug][MPMain(1)]: OSD:ON
2012-02-29 04:00:53.303872 [Debug][MPMain(1)]: GUITVComskipProgressControl.FinalizeConstruction()
2012-02-29 04:00:53.321873 [Info.][MPMain(1)]: xml:C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Default\tvOSD.xml image id:350 width:0 height:0 gfx:-
2012-02-29 04:00:53.326873 [Warn.][MPMain(1)]: GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Default\tvOSD.xml' is missing control id 10 (window property: imgTvChannelLogo)
2012-02-29 04:00:53.326873 [Warn.][MPMain(1)]: GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Default\tvOSD.xml' is missing control id 35 (window property: lblCurrentChannel)
2012-02-29 04:00:53.326873 [Warn.][MPMain(1)]: GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Default\tvOSD.xml' is missing control id 39 (window property: imgRecIcon)
2012-02-29 04:00:53.326873 [Warn.][MPMain(1)]: GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Default\tvOSD.xml' is missing control id 100 (window property: lblCurrentTime)
2012-02-29 04:00:53.335874 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.368876 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.401878 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.434880 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.468882 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.501883 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.534885 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.568887 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.601889 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.634891 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.668893 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.701895 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.734897 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.768899 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.802901 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.834903 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.867904 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.901906 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.934908 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:53.967910 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:54.001912 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:54.034914 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:54.067916 [Debug][(24)]: GUITVComskipProgressControl.Render()
2012-02-29 04:00:54.101918 [Debug][(24)]: GUITVComskipProgressControl.Render()
Thanks,
Matt