--- a/photosgallery/viewframework/tvout/src/glxhdmicontroller.cpp Wed Apr 14 15:57:24 2010 +0300
+++ b/photosgallery/viewframework/tvout/src/glxhdmicontroller.cpp Tue Apr 27 16:37:53 2010 +0300
@@ -49,6 +49,11 @@
DestroyContainer();
delete iStoredImagePath;
iStoredImagePath = NULL;
+ if (iFsBitmap)
+ {
+ delete iFsBitmap;
+ iFsBitmap = NULL;
+ }
if(iGlxTvOut)
{
delete iGlxTvOut;
@@ -58,18 +63,17 @@
// -----------------------------------------------------------------------------
// Setting an Image Path
// -----------------------------------------------------------------------------
-EXPORT_C void CGlxHdmiController::SetImageL(const TDesC& aImageFile,
+EXPORT_C void CGlxHdmiController::SetImageL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap,
TBool aStore)
{
TRACER("CGlxHdmiController::SetImageL()");
if (aStore)
{
iIsImageSupported = ETrue;
- StoreImageInfoL(aImageFile);
+ StoreImageInfoL( aImageFile, aFsBitmap );
}
if (iGlxTvOut->IsHDMIConnected())
{
- iIsPostingMode = ETrue;
GLX_LOG_INFO("CGlxHdmiController::SetImageL() - 2");
// do not close the surface , use the same surface instead.
// Call a function to pass imagefile
@@ -86,7 +90,7 @@
else
{
GLX_LOG_INFO("CGlxHdmiController::SetImageL() - 3");
- iSurfaceUpdater->UpdateNewImageL(aImageFile);
+ iSurfaceUpdater->UpdateNewImageL(aImageFile, aFsBitmap);
}
iHdmiContainer->DrawNow();
}
@@ -136,7 +140,6 @@
EXPORT_C void CGlxHdmiController::ShiftToCloningMode()
{
TRACER("CGlxHdmiController::ShiftToCloningMode()");
- iIsPostingMode = EFalse;
if (iGlxTvOut->IsHDMIConnected() && iSurfaceUpdater)
{
iSurfaceUpdater->ShiftToCloningMode();
@@ -149,7 +152,6 @@
EXPORT_C void CGlxHdmiController::ShiftToPostingMode()
{
TRACER("CGlxHdmiController::ShiftToPostingMode()");
- iIsPostingMode = ETrue;
if (iGlxTvOut->IsHDMIConnected() && iSurfaceUpdater)
{
iSurfaceUpdater->ShiftToPostingMode();
@@ -160,7 +162,7 @@
// Constructor
// -----------------------------------------------------------------------------
CGlxHdmiController::CGlxHdmiController():
- iIsPostingMode(EFalse)
+ iFsBitmap(NULL)
{
TRACER("CGlxHdmiController::CGlxHdmiController()");
// Implement nothing here
@@ -220,7 +222,7 @@
{
TRACER("CGlxHdmiController::CreateSurfaceUpdater()");
RWindow* window = iHdmiContainer->GetWindow();
- iSurfaceUpdater = CGlxHdmiSurfaceUpdater::NewL(window, aImageFile,
+ iSurfaceUpdater = CGlxHdmiSurfaceUpdater::NewL(window, aImageFile, iFsBitmap,
iHdmiContainer);
iHdmiContainer->DrawNow();
}
@@ -228,7 +230,7 @@
// -----------------------------------------------------------------------------
// StoreImageInfoL
// -----------------------------------------------------------------------------
-void CGlxHdmiController::StoreImageInfoL(const TDesC& aImageFile)
+void CGlxHdmiController::StoreImageInfoL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap)
{
TRACER("CGlxHdmiController::StoreImageInfoL()");
if(iStoredImagePath)
@@ -236,7 +238,14 @@
delete iStoredImagePath;
iStoredImagePath = NULL;
}
+ if (iFsBitmap)
+ {
+ delete iFsBitmap;
+ iFsBitmap = NULL;
+ }
iStoredImagePath = aImageFile.AllocL();
+ iFsBitmap = new (ELeave) CFbsBitmap;
+ iFsBitmap->Duplicate(aFsBitmap->Handle());
}
// -----------------------------------------------------------------------------
@@ -247,14 +256,16 @@
TRACER("CGlxHdmiController::HandleTvStatusChangedL()");
if ( aChangeType == ETvConnectionChanged )
{
- if ( iGlxTvOut->IsHDMIConnected() && iIsImageSupported && iIsPostingMode)
+ if ( iGlxTvOut->IsHDMIConnected() && iIsImageSupported )
{
GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI Connected");
// Calling SetImageL() with appropriate parameters
- SetImageL(iStoredImagePath->Des(), EFalse);
+ SetImageL(iStoredImagePath->Des(), iFsBitmap, EFalse);
}
else
{
+ GLX_LOG_INFO2("CGlxHdmiController::HandleTvStatusChangedL() iIsImageSupported=%d, iGlxTvOut->IsHDMIConnected()=%d",
+ iIsImageSupported,iGlxTvOut->IsHDMIConnected());
// if it gets disconnected, destroy the surface
GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI Not Connected");
DestroySurfaceUpdater();