CN: CR:[RESEND] Fix to get the correct windowforblitting for Unix
"Lovish Dhawan" <[email protected]>
| Newsgroups | gmane.comp.multimedia.helix.devel |
|---|---|
| Message-ID | <009801c8bbde$0b6d37a0$8001a8c0@dhawan> |
Thanks Eric, Changes are checked into HEAD and Atlas 310 incorporating your suggestions. Please find the diffs attached. Thanks & Regards, Lovish ----- Original Message ----- From: "Eric Hyche" <[email protected]> To: "'Lovish Dhawan'" <[email protected]>; <[email protected]>; <[email protected]> Sent: Thursday, May 22, 2008 3:30 AM Subject: RE: [Helix-client-dev] CR:[RESEND] Fix to get the correct windowforblitting for Unix > > Lovish, > > I think the change looks good, but I'm a little nervous about > this affecting non-Moblin builds (like RP11 for Linux). Perhaps > we can just put > > #if defined(HELIX_CONFIG_MOBLIN) > > around the changes and add HELIX_CONFIG_MOBLIN to > helix-client-moblin.pf. > > Eric > > ============================================= > Eric Hyche ([email protected]) > Technical Lead > RealNetworks, Inc. > >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On >> Behalf Of Lovish Dhawan >> Sent: Wednesday, May 21, 2008 9:47 AM >> To: [email protected]; [email protected] >> Subject: [Helix-client-dev] CR:[RESEND] Fix to get the >> correct window forblitting for Unix >> >> >> ----- Original Message ----- >> From: Lovish Dhawan <mailto:[email protected]> >> To: [email protected] >> Cc: [email protected] >> Sent: Monday, May 19, 2008 2:23 PM >> Subject: CR:Fix to get the correct window for blitting >> >> Synopsis: >> Changes to fix to get the correct window for blitting. >> >> Overview: >> When we go to fullscreen then we create a new window and this >> is passed for blitting. We were not attaching the new window. >> Now that we dont have the new (fullscreen window) right away >> so schedule a callback for the same with 100 ms >> This fixes the issue and we dont have to update the m_window >> >> Files Added: >> None >> >> Files Modified: >> /cvsroot/video/sitelib/platform/unix/unixsite.cpp >> /cvsroot/video/sitelib/pub/platform/unix/unixsite.h >> >> Image Size and Heap Use impact (Client -Only): >> None. >> >> Platforms and Profiles Affected: >> None >> >> Distribution Libraries Affected: >> None >> >> Distribution library impact and planned action: >> None >> >> Platforms and Profiles Build Verified: >> BIF branch -> wombat >> Target(s) -> LitePlayerWombat >> Profile -> helix-client-all-defines >> SYSTEM_ID -> linux-2.2-libc6-gcc32-i586 >> >> Branch: >> hxclient_3_1_0_atlas, HEAD >> >> Files Attached: >> video_sitelib.diff.txt >> > > > _______________________________________________ > Helix-client-dev mailing list > [email protected] > http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev > > > -- > No virus found in this incoming message. > Checked by AVG. > Version: 7.5.524 / Virus Database: 269.23.21/1457 - Release Date: > 5/20/2008 4:45 PM > > _______________________________________________ Helix-client-dev mailing list [email protected] http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev
video_sitelib.diff.txt
(text/plain, 3.5 KB)
Index: platform/unix/unixsite.cpp
===================================================================
RCS file: /cvsroot/video/sitelib/platform/unix/unixsite.cpp,v
retrieving revision 1.18.2.3
diff -u -r1.18.2.3 unixsite.cpp
--- platform/unix/unixsite.cpp 7 May 2008 07:05:44 -0000 1.18.2.3
+++ platform/unix/unixsite.cpp 22 May 2008 07:09:12 -0000
@@ -126,6 +126,9 @@
, m_bDamaged(FALSE)
, m_bIgnoreFocusOutInFS(FALSE)
, m_bReparent(FALSE)
+#if defined(HELIX_CONFIG_MOBLIN)
+ , m_pAttachWindowCallback(NULL)
+#endif
{
m_ptScrollVertPosT.x = m_ptScrollVertPosT.y = 0;
m_ptScrollVertPosB.x = m_ptScrollVertPosB.y = 0;
@@ -150,6 +153,10 @@
CHXUnixSite::~CHXUnixSite()
{
+#if defined(HELIX_CONFIG_MOBLIN)
+ RemovePendingCallback(m_pAttachWindowCallback);
+ HX_RELEASE(m_pAttachWindowCallback);
+#endif
void* pDummy;
if (z_mapSiteToWindow.Lookup((void*)this, pDummy))
{
@@ -2407,11 +2414,46 @@
m_pStatusText->ParentChangedSize();
m_pStatusText->Show();
}
+#if defined(HELIX_CONFIG_MOBLIN)
+ if(!m_pAttachWindowCallback)
+ {
+ m_pAttachWindowCallback = new CHXGenericCallback((void*)this, (fGenericCBFunc)AttachWindowCallback);
+ m_pAttachWindowCallback->AddRef();
+ }
+ // schedule callback for Attaching Window
+ if(m_pAttachWindowCallback)
+ {
+ m_pAttachWindowCallback->CallbackScheduled(m_pScheduler->RelativeEnter(m_pAttachWindowCallback, 100));
+ }
+#endif
return HXR_OK;
}
-
+
+#if defined(HELIX_CONFIG_MOBLIN)
+void CHXUnixSite::AttachWindowCallback(void* pParam)
+{
+ CHXUnixSite* pObj = (CHXUnixSite*)pParam;
+ if (pObj)
+ {
+ pObj->_AttachWindow();
+ }
+}
+
+void CHXUnixSite::RemovePendingCallback(CHXGenericCallback* pCB)
+{
+ if (pCB &&
+ pCB->GetPendingCallback() &&
+ m_pScheduler)
+ {
+ m_pScheduler->Remove(pCB->GetPendingCallback());
+ pCB->CallbackCanceled();
+ }
+}
+#endif
+
HX_RESULT CHXUnixSite::_EnterFullScreenExt(HXxWindow* pWindow, IHXValues* pValues)
{
m_bReparent = FALSE;
@@ -2441,6 +2483,13 @@
HX_RESULT CHXUnixSite::_ExitFullScreenExt()
{
HX_RESULT res = _ExitFullScreen();
+#if defined(HELIX_CONFIG_MOBLIN)
+ // schedule callback for attaching window
+ if(m_pAttachWindowCallback)
+ {
+ m_pAttachWindowCallback->CallbackScheduled(m_pScheduler->RelativeEnter(m_pAttachWindowCallback, 100));
+ }
+#endif
CHXBaseSite::FullScreenExited(res);
return res;
Index: pub/platform/unix/unixsite.h
===================================================================
RCS file: /cvsroot/video/sitelib/pub/platform/unix/unixsite.h,v
retrieving revision 1.10.2.1
diff -u -r1.10.2.1 unixsite.h
--- pub/platform/unix/unixsite.h 7 May 2008 07:11:48 -0000 1.10.2.1
+++ pub/platform/unix/unixsite.h 22 May 2008 07:09:12 -0000
@@ -61,6 +61,7 @@
#endif
#include "basesite.h"
+#include "hxcbobj.h"
class CHXUnixSite : public CHXBaseSite
{
@@ -216,9 +217,13 @@
const char* pszStatusText );
virtual HX_RESULT _EnterFullScreenExt(HXxWindow* pWindow, IHXValues* pValues);
virtual HX_RESULT _ExitFullScreenExt();
-
-
- HXBOOL m_bReparent;
+#if defined(HELIX_CONFIG_MOBLIN)
+ static void AttachWindowCallback(void *pParam);
+ void RemovePendingCallback(CHXGenericCallback* pCB);
+
+ CHXGenericCallback* m_pAttachWindowCallback;
+#endif
+ HXBOOL m_bReparent;
private:
helix-client-moblin_pf.diff.txt
(text/plain, 654 B)
Index: helix-client-moblin.pf
===================================================================
RCS file: /cvsroot/ribosome/build/umakepf/helix-client-moblin.pf,v
retrieving revision 1.7
diff -u -r1.7 helix-client-moblin.pf
--- helix-client-moblin.pf 20 May 2008 21:30:21 -0000 1.7
+++ helix-client-moblin.pf 22 May 2008 07:30:28 -0000
@@ -75,6 +75,7 @@
#project.AddDefines('HELIX_CONFIG_RTTI')
# LitePlayer will temporarily not use hw-accel renderers
#project.AddDefines('HELIX_FEATURE_MID_LITEPLAYER_USE_HW_ACCEL')
+project.AddDefines('HELIX_CONFIG_MOBLIN')
# Remove features currently not supported
project.RemoveDefines('HELIX_FEATURE_PAC')