Beispiel #1
0
int main(int argc, char *argv[])
{
  QApplication app(argc, argv);

  if (argc != 2) {
    fprintf(stderr, "Usage: runcible-view-pdf <file:url>\n");
    return 1;
  }

  QUrl path(argv[1]);

  RWindow window;

  PdfView widget;
  QObject::connect(&widget, SIGNAL(morePages(int)), &window, SLOT(showTimeline(int)));
  QObject::connect(&widget, SIGNAL(pageChanged(int)), &window, SLOT(updateTimeline(int)));
  window.layout()->addWidget(&widget);

  widget.setDocument(path.path());
  if (path.hasFragment()) {
    QString fragment = path.fragment();
    if (fragment.startsWith("page:")) {
      widget.goToPage(fragment.right(fragment.size() - 5).toInt());
    }
  }

  QObject::connect(&window, SIGNAL(back()), &app, SLOT(quit()));

  window.showMaximized();
  return app.exec();
}
void S60VideoPlayerSession::MvpuoPrepareComplete(TInt aError)
{
    setError(aError); // if we have some playback errors, handle them

    if (m_displayWindow) {
        m_player->RemoveDisplayWindow(*m_displayWindow);
        m_displayWindow = NULL;
    }

    RWindow *window = static_cast<RWindow *>(m_window);
    if (window) {
        /* Get the window size */
        TRect rect;
        if (m_videoOutput && m_videoOutput->inherits("S60VideoWidgetControl")) {
            S60VideoWidgetControl* widgetControl = qobject_cast<S60VideoWidgetControl *>(m_videoOutput);
            const QSize size = widgetControl->videoWidgetSize();
            rect.SetSize(TSize(size.width(), size.height()));
        }
        else if (m_videoOutput && m_videoOutput->inherits("S60VideoOverlay")) {
            S60VideoOverlay* videoOverlay = qobject_cast<S60VideoOverlay *>(m_videoOutput);
            const QSize size = videoOverlay->displayRect().size();
            rect.SetSize(TSize(size.width(), size.height()));
        }
        m_rect = rect;

        window->SetBackgroundColor(TRgb(0, 0, 0, 255));
        TRAPD(error,
            m_player->AddDisplayWindowL(m_wsSession, m_screenDevice, *window, m_rect, m_rect);)
        setError(error); // if we can't add window it an error at this point
        TSize originalSize;
        TRAP_IGNORE(
            m_player->VideoFrameSizeL(originalSize);
            m_originalSize = QSize(originalSize.iWidth, originalSize.iHeight);
            m_player->SetScaleFactorL(*window, scaleFactor().first, scaleFactor().second);)
Beispiel #3
0
int main(int argc, char *argv[]) {
    QApplication app(argc, argv);

    QString filename("unknown");
    if (argc == 2) {
        filename = argv[1];
    }

    RWindow window;
    QBoxLayout *layout = qobject_cast<QBoxLayout *>(window.layout());

    QLabel heading("Could not open file.");
    heading.setFont(QFont("Liberation Serif", 30));
    layout->addWidget(&heading);

    layout->addStrut(8);

    QLabel detail(
        QString("The file %1 is of an unrecognized type and cannot be opened.")
        .arg(runcible::quote(filename)));
    detail.setFont(QFont("Liberation Serif", 12));
    detail.setWordWrap(true);
    layout->addWidget(&detail);

    layout->addStretch(1);

    QObject::connect(&window, SIGNAL(back()), &app, SLOT(quit()));

    window.showMessage("How unfortunate.");
    window.showMaximized();

    return app.exec();
}
void CWsGceCscBase::SetCompositionMode(RWindow& aWindow, TDisplayMode aMode)
	{
		iDisplayMode = (TDisplayMode)aWindow.SetRequiredDisplayMode(aMode);
		aWindow.Invalidate();
		aWindow.BeginRedraw();
		aWindow.EndRedraw();
	}
void CMultipleSurfacesAppUi::BringToFront()
	{
	RWindow window = iAppView->Window();
	RWsSession wsSession = iAppView->ControlEnv()->WsSession();
	wsSession.SetWindowGroupOrdinalPosition(window.WindowGroupId(), 0);
	wsSession.Flush();
	wsSession.Finish();		
	}
void CWsGceCscBase::SetBackgroundColorWindow(RWindow& aWindow, const TRgb& aColor)
	{
	aWindow.Invalidate();
	aWindow.SetBackgroundColor(aColor);
	aWindow.BeginRedraw();
	iGc->Activate(aWindow);
	iGc->Deactivate();
	aWindow.EndRedraw();
	}
/**
BitBlts a bitmap to the windows GC.

@param aSession is the windows server session
@param aWindow is a reference to the window
@param aGc is the graphics context of the window
@param aImage is the bitmap to bitblt
*/		
void CAlphaBlendTest::BitBlt(RWsSession& aSession, RWindow& aWindow, CWindowGc* aGc, CFbsBitmap& aImage)
	{
	aWindow.Invalidate();
	aWindow.BeginRedraw();
	aGc->Activate(aWindow);
	aGc->BitBlt(TPoint(0,0), &aImage);
	aGc->Deactivate();
	aWindow.EndRedraw();	
	aSession.Flush();	
	}
Beispiel #8
0
EXPORT_C CSDL::~CSDL()
    {
    RWindow* win = EpocSdlEnv::Window();
    if(win != NULL)
        win->FreePointerMoveBuffer();
    gEpocEnv->Free();
   	gEpocEnv->Delete();
   	
    User::Free(gEpocEnv);
    gEpocEnv = NULL;
    }
/**
Clears the window to a colour

@param aSession is the windows server session
@param aWindow is a reference to the window
@param aGc is the graphics context of the window
@param aColor is the colour to clear the window with
*/
void CAlphaBlendTest::ClearWindow(RWsSession& aSession, RWindow& aWindow, CWindowGc* aGc, TRgb aColor)
{
	// clear so we can see bitmap version has completed
	aWindow.Invalidate();
	aWindow.BeginRedraw();
	aGc->Activate(aWindow);
	aGc->SetBrushColor(aColor);
	aGc->Clear();
	aGc->Deactivate();
	aWindow.EndRedraw();
	aSession.Flush();
}
Beispiel #10
0
LOCAL_C TInt PointerBufferReadyEvent(_THIS/*, const TTime& aEventTime*/)
    {
    // Own threaded is not supported - it is fair easy to do, but needs some work so I would implemented
    // it only upon request :-) 
    
    /*
    TTime time;
    time.UniversalTime();
    TTimeIntervalMicroSeconds d = time.MicroSecondsFrom(aEventTime);
    
    TInt skipcount  = 1;
    
    if(d < TTimeIntervalMicroSeconds(5000))
        skipcount = -1;
    else if (d < TTimeIntervalMicroSeconds(50000))
        {
        skipcount = (50000 - d.Int64()) / 5000;
        }
    
    RDebug::Print(_L("skipCount %d"), skipcount);
    
    TInt skip = skipcount;
    */
    RWindow* win = EnvUtils::IsOwnThreaded() ? NULL : EpocSdlEnv::Window();
    TInt posted = 0;
    if(win != NULL)
        {
        TPoint points[KPointerBufferSize];
        TPckg<TPoint[KPointerBufferSize]> buf(points);
        User::LeaveIfError(win->RetrievePointerMoveBuffer(buf));
        const TInt count = buf.Length() / sizeof(TPoint);
        
        
        for(TInt i = 0; i < count; i++)
            {
      /*      --skip;
            if(!skip)
                {
                skip = skipcount;
                }
            else
                {*/
                const TPoint point = points[i] - Private->iScreenPos; 
                const TPoint mousePos = EpocSdlEnv::WindowCoordinates(point);
                if(mousePos.iX >= 0 && mousePos.iY >= 0 && mousePos.iX < _this->screen->w && mousePos.iY < _this->screen->h)
                    {
                    posted += SDL_PrivateMouseMotion(0, 0, mousePos.iX, mousePos.iY); /* Absolute position on screen */
                    }
                //}
            }
        }
    return posted;
    }
Beispiel #11
0
int main(int argc, char *argv[]) {
  QApplication app(argc, argv);

  if (argc != 2) {
    fprintf(stderr, "Usage: runcible-open-ext-txt <file>");
    return 1;
  }

  QString filename(argv[1]);
  QFile file(filename);
  QString suffix(QFileInfo(file).suffix());

  qDebug() << "Loading" << filename;
  QString text;
  if (file.open(QIODevice::ReadOnly)) {
    qDebug() << "Opened";
    text = file.readAll();
    qDebug() << "Loaded";
  }


  RWindow window;
  PageView display;
  window.layout()->addWidget(&display);
  qDebug() << "Added display.";

  QObject::connect(&display, SIGNAL(pageCountChanged(int)), &window, SLOT(showTimeline(int)));
  QObject::connect(&display, SIGNAL(pageChanged(int)), &window, SLOT(updateTimeline(int)));

  window.showMaximized();

  QTextDocument doc;
  doc.setDefaultTextOption(QTextOption(Qt::AlignJustify));
  doc.setMetaInformation(QTextDocument::DocumentUrl, QUrl::fromLocalFile(filename).toString());
  if (suffix == "html") {
    doc.setHtml(text);
  } else {
    text.replace(QRegExp("([^\\r\\n])(\\r)?\\n([^\\n\\r])"), "\\1  \\3");
    doc.setPlainText(text);
  }
  qDebug() << "Created doc.";
  display.setDocument(filename, &doc);
  qDebug() << "Set doc.";

  QObject::connect(&window, SIGNAL(back()), &app, SLOT(quit()));

  window.showMessage(doc.metaInformation(QTextDocument::DocumentTitle));

  return app.exec();
}
void CTestContainer::ConstructL()
	{
	iColor = KRgbBlack;
	CreateWindowL();
	RWindow window = Window();
	window.SetTransparencyAlphaChannel();
	window.SetBackgroundColor(TRgb(150,150,150,150));
	iAnimationsArray=new(ELeave) CArrayPtrFlat<CAnimation>(KArrayGranularity);
	
	//Set the background of the container window to the default. 
	iBackgroundType = EBackgroundBlackRedGreenYellowStripes;
	ActivateL();

	//Construct a window that can be used in test cases.
	iCoveringWindowControl = new (ELeave) CTestWindowControl;	
	iCoveringWindowControl->ConstructL();
	}
/**
Draws a stretched bitmap with or without a mask.

@param aUseMask set to ETrue to use a alpha mask. Normally used for 16MU display modes that do not store the alpha.
@param aSrcMode is the source display mode
@param aDstMode is the destination display mode
@param aSession is the windows server session
@param aWindow is a reference to the window
@param aGc is the graphics context of the window
@param aNumIterations is the number of iterations to run the test
*/
void CAlphaBlendTest::DoDrawBitmapL(TBool aUseMask, TDisplayMode aSrcMode, TDisplayMode aDstMode, RWsSession& aSession, RWindow& aWindow, CWindowGc* aGc, TInt aNumIterations)
	{		
	const TSize bitmapSize = aWindow.Size();
	
	// Construct target bitmap.
	CFbsBitmap* bitmapTarget = CreateSoftwareBitmapLC(bitmapSize, aDstMode);
	CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(bitmapTarget);
	CleanupStack::PushL(bitmapDevice);
	
	// Construct GC.
	CFbsBitGc* bitmapGc = NULL;
	User::LeaveIfError(bitmapDevice->CreateContext(bitmapGc));
	CleanupStack::PushL(bitmapGc);
	
	// Construct source bitmap.	
	TSize smallerSize(bitmapSize.iWidth/2,  bitmapSize.iHeight/2);
	CFbsBitmap* source = CreateSoftwareBitmapLC(smallerSize, aSrcMode);
	VerticalGradientAlphaL(source, TRgb(0x00000000), TRgb(0xffffffff));	
	CFbsBitmap* sourceAlpha = CreateSoftwareBitmapLC(smallerSize, EGray256);	// match size to src
	VerticalGradientAlphaL(sourceAlpha, TRgb(0x01010101), TRgb(0xfefefefe));
		
	bitmapGc->SetBrushStyle(CGraphicsContext::ENullBrush);
	bitmapGc->SetBrushColor(TRANSPARENT_BLACK);
	bitmapGc->Clear();
	bitmapGc->SetDrawMode(CGraphicsContext::EDrawModePEN);
	aGc->Activate(aWindow);
	TPoint point(0,0);
	bitmapGc->BitBlt(point, bitmapTarget);
	aGc->Deactivate();
	aSession.Flush();

	TBuf <20> testName;
	if (!aUseMask)
		{
		testName=_L("DrawBitmap");
		iProfiler->InitResults();
		for(int i=0; i<aNumIterations; i++)
			{
			bitmapGc->DrawBitmap(TRect(point, bitmapSize), source);
			iProfiler->MarkResultSetL();
			}
		}
	else
		{
		testName=_L("DrawBitmapMasked");
		iProfiler->InitResults();
		for(int i=0; i<aNumIterations; i++)
			{
			bitmapGc->DrawBitmapMasked(TRect(point, bitmapSize), source,TRect(point, smallerSize), sourceAlpha, EFalse);
			iProfiler->MarkResultSetL();
			}
		}
	INFO_PRINTF4(_L("%S(Stretched) with src = %S, dst = %S"), &testName, &ColorModeName(aSrcMode), &ColorModeName(aDstMode));
	iProfiler->ResultsAnalysis(testName, 0, aSrcMode, aDstMode, aNumIterations);
	// copy up to screen for sanity check
	BitBlt(aSession, aWindow, aGc, *bitmapTarget);
	CleanupStack::PopAndDestroy(5, bitmapTarget);
	}
Beispiel #14
0
void XAPlaySessionImpl::MvpuoPrepareComplete(TInt aError)
{
    TRACE_FUNCTION_ENTRY;
    m_VPError = aError;
    if (mActiveSchedulerWait->IsStarted())
        mActiveSchedulerWait->AsyncStop();

    RWindow* window = (RWindow*)mNativeDisplay.hWindow;
    RWsSession* wssession = (RWsSession*)mNativeDisplay.hDisplay;

    if (window) {
        TRect videoExtent = TRect(window->Size());
        TRect clipRect = TRect(window->Size());
        TRAP_IGNORE(mVideoPlayUtil->AddDisplayWindowL(*wssession, *(CCoeEnv::Static()->ScreenDevice()), *window, videoExtent, clipRect));
        TRAP_IGNORE(mVideoPlayUtil->SetAutoScaleL(*window, EAutoScaleBestFit));
    }
    TRACE_FUNCTION_EXIT;
}
Beispiel #15
0
EXPORT_C void CSDL::SetContainerWindowL(RWindow& aWindow, RWsSession& aSession, CWsScreenDevice& aDevice)
    {
    if(gEpocEnv->iDsa == NULL)
    	gEpocEnv->iDsa = CDsa::CreateL(aSession);
    
     
    aWindow.DisablePointerMoveBuffer();
    aWindow.FreePointerMoveBuffer();
    
    aWindow.PointerFilter(EPointerFilterDrag,0);
    if(!EnvUtils::IsOwnThreaded())
        {
        aWindow.AllocPointerMoveBuffer(KPointerBufferSize, 0);
        aWindow.EnablePointerMoveBuffer();
        }
    
    gEpocEnv->iDsa->ConstructL(aWindow, aDevice);
    }
void CWsGraphicShareBase::DoTestDrawGraphicCompareL(TPtrC aShare)
	{
	// UID of the shared graphic
	TUid uid1 = {0x12000021};
	TWsGraphicId twsGraphicId1(uid1);

	_LIT8(KTestData,"HelloWorld");
	
	CFbsBitmap bitmap1;
	CFbsBitmap mask1;
	
	TSize screenSize = iScreen->SizeInPixels();
	User::LeaveIfError(bitmap1.Load(MY_TEST_BITMAP,0));
	mask1.Create(bitmap1.SizeInPixels(),iScreen->DisplayMode());
	
		CWsGraphicBitmap* bTest = CWsGraphicBitmap::NewL(&bitmap1,&mask1);
	
	// divide the screen into two equal rectangles
	TRect position1(0,0,screenSize.iWidth/2,screenSize.iHeight);
	TRect position2(screenSize.iWidth/2,0,screenSize.iWidth,screenSize.iHeight);
	
	// draw the new graphic and attempt to draw the shared graphic
	iGc->Activate(*iWin);
	iWin->Invalidate();
	iWin->BeginRedraw();
	iGc->Clear(position1);
	iGc->Clear(position2);

	iGc->DrawWsGraphic(bTest->Id(),position1,KTestData);
	iGc->DrawWsGraphic(twsGraphicId1.Uid(),position2,KTestData);

	iGc->Deactivate();	
	iWin->EndRedraw();
	
	iWs.Flush();
	iWs.Finish();
	// compare the graphic in both positions
	if (aShare==_L("false"))
		Test(!iScreen->RectCompare(position1,position2));
	else
		Test(iScreen->RectCompare(position1,position2));	
		
	delete bTest;
	}
/**
Draw an ellipse to the window and fade the window.
@param aWin The window object
*/
void CT_WServGenericpluginStepLoad::DrawShape(RWindow& aWin)
	{
	TUint8 white = 255;
	TUint8 black = 128;
	
	aWin.BeginRedraw(KEllipseRect);
	iGc->Activate(aWin);
	iGc->SetBrushStyle(CGraphicsContext::ESolidBrush);
	iGc->SetBrushColor(KRgbWhite);
	iGc->DrawEllipse(KEllipseRect);
	aWin.EndRedraw();
	iWsSession.Flush();	
	User::After(KDelay);
	
	aWin.SetFaded(ETrue,RWindowTreeNode::EFadeWindowOnly,black,white);
	iWsSession.Flush();	
	User::After(KDelay);

	iGc->Deactivate();
	}
/**
Alpha blends two bitmaps together

@param aDisplayMode1 is the source display mode
@param aDisplayMode2 is the destination display mode
@param aSession is the windows server session
@param aWindow is a reference to the window
@param aGc is the graphics context of the window
@param aNumIterations is the number of iterations to run the test
*/	
void CAlphaBlendTest::DoAlphaBlendBitmapsBitmapTestL(TDisplayMode aSrcMode, TDisplayMode aDstMode, RWsSession& aSession, RWindow& aWindow, CWindowGc* aGc, TInt aNumIterations)
	{
	const TSize bitmapSize = aWindow.Size();	

	CFbsBitmap* bitmapTarget = CreateSoftwareBitmapLC(bitmapSize, aDstMode);
	CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(bitmapTarget);
	CleanupStack::PushL(bitmapDevice);
	
	CFbsBitGc* bitmapGc=NULL;
	User::LeaveIfError(bitmapDevice->CreateContext(bitmapGc));	
	CleanupStack::PushL(bitmapGc);
		
	CFbsBitmap* sourceUnder  = CreateSoftwareBitmapLC(bitmapSize, aDstMode);
	CFbsBitmap* sourceOver   = CreateSoftwareBitmapLC(bitmapSize, aSrcMode);
	CFbsBitmap* sourceAlpha  = CreateSoftwareBitmapLC(bitmapSize, EGray256);

	VerticalGradientAlphaL(sourceAlpha, TRgb(0x01010101), TRgb(0xfefefefe));
	VerticalGradientAlphaL(sourceUnder, TRgb(0xff000000), TRgb(0x00ffffff));
	VerticalGradientAlphaL(sourceOver, TRgb(0x00ffffff), TRgb(0xff000000));
	RDebug::Printf("DABBBT 2");

	TPoint point(0,0);
	TRect  rect(bitmapSize);
	
	bitmapGc->SetBrushStyle(CGraphicsContext::ENullBrush);
	bitmapGc->SetBrushColor(TRANSPARENT_BLACK);

	bitmapGc->SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
	bitmapGc->Clear();
	bitmapGc->SetDrawMode(CGraphicsContext::EDrawModePEN);
	bitmapGc->AlphaBlendBitmaps(point, sourceUnder, sourceOver, rect, point, sourceAlpha, point);		

	aGc->Activate(aWindow);
	aGc->BitBlt(point, bitmapTarget);
	aGc->Deactivate();
	aSession.Flush();

	iProfiler->InitResults();
	// blend sourceUnder with sourceOver using alpha mask
	for(TInt i=0; i<aNumIterations; i++)
	{
		bitmapGc->SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
		bitmapGc->Clear();
		bitmapGc->SetDrawMode(CGraphicsContext::EDrawModePEN);
		bitmapGc->AlphaBlendBitmaps(point, sourceUnder, sourceOver, rect, point, sourceAlpha, point);
		iProfiler->MarkResultSetL();
	}
	iProfiler->ResultsAnalysis(_L("DoAlphaBlendBitmapsBitmapTestL"), 0, aSrcMode, aDstMode, aNumIterations);
	
	// copy up to screen for sanity check
	BitBlt(aSession, aWindow, aGc, *bitmapTarget);	
	CleanupStack::PopAndDestroy(6, bitmapTarget); // sourceAlpha, sourceOver, sourceUnder, bitmapGc, bitmapDevice, bitmapTarget
	}	
void CWsGceCscBase::ConstructOpaqueSurfacedWindowL(RWindow& aWindow,
		                                           const TRgb& aColor, 
		                                           TInt aPos,
		                                           const TPoint& aPoint, 
		                                           const TSize& aSize,
		                                           const TSurfaceId& aSurfaceID)
	{
	ASSERT_EQUALS_X(aWindow.Construct(iGroup, ++iWindowHandle), KErrNone);
	aWindow.SetRequiredDisplayMode(iDisplayMode);
	aWindow.SetExtent(aPoint, aSize);
	aWindow.SetBackgroundColor(aColor);
	aWindow.SetOrdinalPosition(aPos);	
	ASSERT_EQUALS_X(aWindow.SetBackgroundSurface(aSurfaceID), KErrNone);
	aWindow.Activate();
	aWindow.BeginRedraw();
	iGc->Activate(aWindow);
	iGc->Deactivate();
	aWindow.EndRedraw();
	}
void CWsGceCscBase::ConstructOpaqueWindowLC(RWindow& aWindow, 
		                                    const TRgb& aColor, 
		                                    TInt aPos,
		                                    const TPoint &aPoint, 
		                                    const TSize &aSize)
	{
	ASSERT_EQUALS_X(aWindow.Construct(iGroup, ++iWindowHandle), KErrNone);
	CleanupClosePushL(aWindow);
	aWindow.SetRequiredDisplayMode(iDisplayMode);
	aWindow.SetExtent(aPoint, aSize);
	aWindow.SetBackgroundColor(aColor);
	aWindow.SetOrdinalPosition(aPos);
	aWindow.SetVisible(ETrue);
	aWindow.Activate();
	aWindow.BeginRedraw();
	iGc->Activate(aWindow);
	iGc->Clear();
	iGc->Deactivate();
	aWindow.EndRedraw();
	}
/**
Creates a RWindow
@param aWinGroup The window group object
@param aWin	The window object
@param aPos	The Position of the window
@param aBkgdColor The background color of the window
@param aSize The size of the window
@param aHandle The handle of the window
*/
void CT_WServGenericpluginStepLoad::CreateRWindowL(const RWindowGroup& aWinGroup, 
												   RWindow& aWin, 
												   const TPoint& aPos, 
												   const TRgb& aBkgdColor, 
												   const TSize& aWinSize,
												   const TUint32 aHandle)
	{
	aWin = RWindow( iWsSession );
	CleanupClosePushL( aWin );
	User::LeaveIfError( aWin.Construct( aWinGroup, aHandle ) );
	CleanupStack::Pop(&aWin);
	aWin.SetRequiredDisplayMode(iDisplayMode);
	aWin.SetExtent(aPos, aWinSize);
	aWin.SetBackgroundColor( aBkgdColor );
	aWin.Activate();
	aWin.SetVisible( ETrue );
	}
void CWsGraphicShareBase::ConstructL()
	{
	User::LeaveIfError(iWs.Connect());
	iScreen=new(ELeave) CWsScreenDevice(iWs);
	User::LeaveIfError(iScreen->Construct(iScreenNumber));
	iGc=new(ELeave) CWindowGc(iScreen);
	User::LeaveIfError(iGc->Construct());
	iGroupWin=new(ELeave) RWindowGroup(iWs);
	iGroupWin->Construct(1);
		
	iWin=new(ELeave) RWindow(iWs);
	iWin->Construct(*iGroupWin,ENullWsHandle);
	iWin->SetRequiredDisplayMode(EColor256);
	iWin->SetExtent(TPoint(0,0),iScreen->SizeInPixels());
	iWin->Activate();
	iWin->BeginRedraw();
	iWin->EndRedraw();
	iWs.Flush();
	}	
/**
Override of base class pure virtual
Our implementation only gets called if the base class doTestStepPreambleL() did
not leave. That being the case, the current test result value will be EPass.

@return - TVerdict code
*/
TVerdict CAlphaBlendTest::doTestStepL(TBool aIType)
	{	
	RWsSession wsSession;
	User::LeaveIfError(wsSession.Connect());
	CleanupClosePushL(wsSession);

	//
	// Uncomment to debug WSERV redraw problems.
	// wsSession.SetAutoFlush(ETrue); 
	
	CWsScreenDevice* windowDevice = new (ELeave) CWsScreenDevice(wsSession);
	CleanupStack::PushL(windowDevice);
	User::LeaveIfError(windowDevice->Construct());
	CWindowGc* windowGc=NULL;	
	User::LeaveIfError(windowDevice->CreateContext(windowGc)); // create graphics context	
	CleanupStack::PushL(windowGc);	
	
	RWindowGroup group;	
	group  = RWindowGroup(wsSession);
	CleanupClosePushL(group);
	User::LeaveIfError(group.Construct(1, EFalse));
	
	RWindow background;
	background = RWindow(wsSession);
	CleanupClosePushL(background);
	User::LeaveIfError(background.Construct(group, 2));
	
	RWindow window;
	window = RWindow(wsSession);
	CleanupClosePushL(window);
	User::LeaveIfError(window.Construct(group, 3));

	TSize        windowSize = windowDevice->SizeInPixels();
	TDisplayMode windowMode = windowDevice->DisplayMode();

	background.Activate();
	background.Invalidate();

	ClearWindow(wsSession, background, windowGc, BLACK_SEMI_TRANSPARENT);	
	ClearWindow(wsSession, window, windowGc, BLACK_SEMI_TRANSPARENT);
	
	window.SetTransparencyAlphaChannel();	
	window.Activate();
	window.Invalidate();
	if (aIType)
		{
		if (CheckMonoTypeInstalledL())
			DoDrawBlendedTestsL(EBlendTestDrawTextIType,wsSession, KDrawVertTextIterationsToTest);
		else
			{
			INFO_PRINTF1(_L("Monotype fonts not installed, skipping test"));
			}
		}
	else
		{
/*
Test speed of blended draw rects on all modes supporting alpha blending
*/	
		DoDrawBlendedTestsL(EBlendTestDrawRect,wsSession, KDrawRectIterationsToTest);
/*
Test speed of blended draw vertical line calls on all modes supporting alpha blending
*/	
		DoDrawBlendedTestsL(EBlendTestVerticalLine,wsSession, KDrawVertLineIterationsToTest);
/*
Test speed of blended draw text calls on all modes supporting alpha blending
*/	
		DoDrawBlendedTestsL(EBlendTestDrawText,wsSession, KDrawTextIterationsToTest);
		DoDrawBlendedTestsL(EBlendTestDrawTextAntiAliased,wsSession, KDrawVertTextIterationsToTest);
		DoDrawBlendedTestsL(EBlendTestDrawVerticalText,wsSession, KDrawVertTextIterationsToTest);
/**
   @SYMTestCaseID
   GRAPHICS-UI-BENCH-0022

   @SYMTestCaseDesc
   Alphablend test BITBLT with EColor16MA source and EColor16MU destination.

   @SYMTestActions
   Compare the results over time

   @SYMTestExpectedResults
*/
		RDebug::Printf("Alpha Tests: EColor16MU, EColor16MA");
		RDebug::Printf("Alpha Blend");	
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0022"));
		DoAlphaBlendBitmapsBitmapTestL(EColor16MA, EColor16MU, wsSession, window, windowGc, KIterationsToTest);	
		RecordTestResultL();

/**
   @SYMTestCaseID
   GRAPHICS-UI-BENCH-0023

   @SYMTestCaseDesc
   Test BITBLT with EColor16MA source and EColor16MU destination.

   @SYMTestActions
   Compare the results over time

   @SYMTestExpectedResults
*/
		RDebug::Printf("BitBlt Alpha");
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0023"));
		DoBitBltAlphaBitmapTestL(EColor16MA, EColor16MU, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();
	
/**
   @SYMTestCaseID
   GRAPHICS-UI-BENCH-0024

   @SYMTestCaseDesc
   Alpha blend test BITBLT with EColor16MA source and EColor16MA destination.

   @SYMTestActions
   Compare the results over time

   @SYMTestExpectedResults
*/
		RDebug::Printf("Alpha Tests: EColor16MA, EColor16MA");
		RDebug::Printf("Alpha Blend");	
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0024"));
		DoAlphaBlendBitmapsBitmapTestL(EColor16MA,EColor16MA, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();

/**
   @SYMTestCaseID
   GRAPHICS-UI-BENCH-0025

   @SYMTestCaseDesc
   Test BITBLT with EColor16MA source and EColor16MA destination.

   @SYMTestActions
   Compare the results over time

   @SYMTestExpectedResults
*/
		RDebug::Printf("BitBlt Alpha");
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0025"));
		DoBitBltAlphaBitmapTestL(EColor16MA, EColor16MA, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();
/**
	@SYMTestCaseID
	GRAPHICS-UI-BENCH-0063
	
	@SYMTestCaseDesc
	Test BITBLT with EColor16MAP source and EColor16MAP destination.
	
	@SYMTestActions
	Compare the results over several iterations over time.
	
	@SYMTestExpectedResults
*/
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0063"));
		DoNormalBitBltL(EFalse, EColor16MAP,EColor16MAP, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();
	
/**
	@SYMTestCaseID
	GRAPHICS-UI-BENCH-0064
	
	@SYMTestCaseDesc
	Test BITBLT with EColor16MA source and EColor16MA destination.
	
	@SYMTestActions
	Compare the results over several iterations over time.
	
	@SYMTestExpectedResults
*/
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0064"));
		DoNormalBitBltL(EFalse, EColor16MA,EColor16MA, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();
	
/**
	@SYMTestCaseID
	GRAPHICS-UI-BENCH-0065
	
	@SYMTestCaseDesc
	Test BITBLT with EColor16MAP source and EColor16MA destination.
	
	@SYMTestActions
	Compare the results over several iterations over time.
	
	@SYMTestExpectedResults
*/
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0065"));
		DoNormalBitBltL(EFalse, EColor16MAP,EColor16MA, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();
	
/**
	@SYMTestCaseID
	GRAPHICS-UI-BENCH-0066
	
	@SYMTestCaseDesc
	Test BITBLT with EColor16MA source and EColor16MAP destination.
	
	@SYMTestActions
	Compare the results over several iterations over time.
	
	@SYMTestExpectedResults
*/
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0066"));
		DoNormalBitBltL(EFalse, EColor16MA,EColor16MAP, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();
	
/**
	@SYMTestCaseID
	GRAPHICS-UI-BENCH-0067
	
	@SYMTestCaseDesc
	Test BITBLT with EColor16MU source and EColor16MU destination.
	
	@SYMTestActions
	Compare the results over several iterations over time.
	
	@SYMTestExpectedResults
*/
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0067"));
		DoNormalBitBltL(EFalse, EColor16MU,EColor16MU, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();
	
/**
	@SYMTestCaseID
	GRAPHICS-UI-BENCH-0068
	
	@SYMTestCaseDesc
	Test BITBLT with EColor16MAP source and EColor16MU destination.
	
	@SYMTestActions
	Compare the results over several iterations over time.
	
	@SYMTestExpectedResults
*/
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0068"));
		DoNormalBitBltL(EFalse, EColor16MAP,EColor16MU, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();
	
/**
	@SYMTestCaseID
	GRAPHICS-UI-BENCH-0069
	
	@SYMTestCaseDesc
	Test BITBLT with EColor16MU source and EColor16MAP destination.
	
	@SYMTestActions
	Compare the results over several iterations over time.
	
	@SYMTestExpectedResults
*/
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0069"));
		DoNormalBitBltL(EFalse, EColor16MU,EColor16MAP, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();
	
/**
	@SYMTestCaseID
	GRAPHICS-UI-BENCH-0070
	
	@SYMTestCaseDesc
	Test BITBLT with EColor64K source and EColor16MU destination.
	
	@SYMTestActions
	Compare the results over several iterations over time.
	
	@SYMTestExpectedResults
*/
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0070"));
		DoNormalBitBltL(ETrue, EColor64K,EColor16MU, wsSession, window, windowGc, KIterationsToTest);
		
		RecordTestResultL();
/**
	@SYMTestCaseID
	GRAPHICS-UI-BENCH-0071
	
	@SYMTestCaseDesc
	Test DrawBitmap with different sizes (STRETCHED) with EColor16MAP source and EColor16MAP destination.
	
	@SYMTestActions
	Compare the results over several iterations over time.
	
	@SYMTestExpectedResults
*/
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0071"));
		DoDrawBitmapL(EFalse, EColor16MAP, EColor16MAP, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();
	
/**
	@SYMTestCaseID
	GRAPHICS-UI-BENCH-0072
	
	@SYMTestCaseDesc
	Test DrawBitmap with different sizes (STRETCHED) with EColor16MA source and EColor16MA destination.
	
	@SYMTestActions
	Compare the results over several iterations over time.
	
	@SYMTestExpectedResults
*/
	
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0072"));
		DoDrawBitmapL(EFalse, EColor16MA, EColor16MA, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();
	
/**
	@SYMTestCaseID
	GRAPHICS-UI-BENCH-0073
	
	@SYMTestCaseDesc
	Test DrawBitmap (using alpha mask) with different sizes (STRETCHED) with EColor16MU source and EColor16MU destination.
	
	@SYMTestActions
	Compare the results over several iterations over time.
	
	@SYMTestExpectedResults
*/	
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0073"));
		DoDrawBitmapL(ETrue, EColor16MU, EColor16MU, wsSession, window, windowGc, KIterationsToTest);
		RecordTestResultL();
	
/**
	@SYMTestCaseID
	GRAPHICS-UI-BENCH-0057
	
	@SYMTestCaseDesc
	Test DrawBitmap (using alpha mask) with different sizes (STRETCHED) with EColor16MAP source and EColor16MAP destination.
	
	@SYMTestActions
	Compare the results over several iterations over time.
	
	@SYMTestExpectedResults
*/
		SetTestStepID(_L("GRAPHICS-UI-BENCH-0057"));
		DoDrawBitmapL(ETrue, EColor16MAP, EColor16MAP, wsSession, window, windowGc, KIterationsToTest);	
		RecordTestResultL();
		}
	CleanupStack::PopAndDestroy(6, &wsSession);
	return TestStepResult();
	}