svgtopt/SVG/SVGEngine/src/SVGEngineImpl.cpp
branchRCL_3
changeset 39 1902ade171ab
parent 38 db5c883ad1c5
--- a/svgtopt/SVG/SVGEngine/src/SVGEngineImpl.cpp	Tue Aug 31 16:06:58 2010 +0300
+++ b/svgtopt/SVG/SVGEngine/src/SVGEngineImpl.cpp	Wed Sep 01 12:20:46 2010 +0100
@@ -59,7 +59,6 @@
 #include "SVGTimeContainer.h"
 #include "SVGMediaAnimationElementImpl.h"
 
-#include <svgtbitmap.h>
 // Constants
 // length of </text>
 const TInt KClosingTextTagLength = 7;
@@ -749,24 +748,9 @@
 
         // Get the redering result onto CFbsBitmap.
         if(iFrameBufferSize.iWidth > 0)
-            {
-            if(iIsTargetRenderingEnabled) 
-                { // M2G
-                iGfxContext->UpdateFramebufferL( iTargetBitmapBuffer, iTargetMaskBuffer,iFrameBufferSize,
-                        iTargetBitmapBuffer->DisplayMode(),iTargetMaskBuffer->DisplayMode());
-                }
-            else 
-                iGfxContext->UpdateFramebufferL( iFrameBuffer, iMask,iFrameBufferSize,iRenderDspMode,
-                        iMaskDspMode );
-            }
+            iGfxContext->UpdateFramebufferL( iFrameBuffer, iMask,iFrameBufferSize,iRenderDspMode,iMaskDspMode );    
         else
-            {
-            if(iIsTargetRenderingEnabled)  //M2G
-                iGfxContext->UpdateFramebufferL( iTargetBitmapBuffer, iTargetMaskBuffer );
-            else
-                iGfxContext->UpdateFramebufferL( iFrameBuffer, iMask );
-
-            }
+         iGfxContext->UpdateFramebufferL( iFrameBuffer, iMask );
 
         if ( !iIgnoreUpdateScreen && iRequestObserver != NULL )
             {
@@ -1275,13 +1259,6 @@
         }
     }
 
-void CSvgEngineImpl::GenerateMask(CSvgtBitmap* aMask)
-    {
-    if ( iGfxContext )
-        {
-        iGfxContext->GenerateMask( aMask );
-        }
-    }
 //
 // ---------------------------------------------------------------------------
 // set background color
@@ -1395,38 +1372,7 @@
         iGfxContext->ChangeBufferSizeL( TSize( 0,0 ) );
         }
     }
-//----------------------------------------------------------------------------------------------
-//M2G: SetGdiContextL() is overloaded to accept CSvgtBitmap to enable rendering on target buffer.
-//-----------------------------------------------------------------------------------------------
-void CSvgEngineImpl::SetGdiContextL(CSvgtBitmap* aCurrentBitmap, CSvgtBitmap* aMask)
-    {
-
-    // Handle for both Non-NULL and NULL parameter
-    iTargetBitmapBuffer = aCurrentBitmap;
-    iTargetMaskBuffer = aMask;
-
-    if ( aCurrentBitmap )
-        {
-        if ( !iGfxContext )
-            {
-                iGfxContext = CGfx2dGcOpenVG::NewL( iTargetBitmapBuffer->SizeInPixels(), iBitmapFontSpec, iSvgBitmapFontProvider, EFalse );
-                
-                // The API is called Only in case of JSR226. Incase if the midlet developer
-                // has changed the RedenderQuality of the midlet.ByDefualt the value of 
-                // iRenderQuality is 2 i.e. VG_RENDERING_QUALITY_BETTER.
-                iGfxContext->SetAntialiasingMode( iRenderQuality );
-            }
-        else
-            {
-            iGfxContext->ChangeBufferSizeL( iTargetBitmapBuffer->SizeInPixels() );
-            }
-        }
-    else if ( iGfxContext )
-        {
-        iGfxContext->ChangeBufferSizeL( TSize( 0,0 ) );
-        }
-        
-    }
+
 // ---------------------------------------------------------------------------
 // void CSvgEngineImpl::StartEngine(CSvgErrorImpl* aError)
 // ---------------------------------------------------------------------------
@@ -1514,24 +1460,12 @@
 // ---------------------------------------------------------------------------
 void CSvgEngineImpl::RenderFrame( TUint aCurrentTime )
     {
-    if(iIsTargetRenderingEnabled) //M2G: If target rendering is enabled
+    if ( !iFrameBuffer || !iSvgDocument ||
+         iFrameBuffer->SizeInPixels().iWidth == 0 || iFrameBuffer->SizeInPixels().iHeight == 0 )
         {
-        if ( !iTargetBitmapBuffer || !iSvgDocument ||
-              iTargetBitmapBuffer->SizeInPixels().iWidth == 0 || 
-              iTargetBitmapBuffer->SizeInPixels().iHeight == 0 )
-            {
-            return;
-            }
+        return;
         }
-    else
-        {
-        if (!iFrameBuffer || !iSvgDocument
-            || iFrameBuffer->SizeInPixels().iWidth == 0
-            || iFrameBuffer->SizeInPixels().iHeight == 0)
-            {
-            return;
-            }
-        }
+
     if ( aCurrentTime == 0 )
         {
         SeekEngine( 0 );
@@ -3219,21 +3153,6 @@
         ((CGfx2dGcOpenVG *)iGfxContext)->SetBitmapHeader(aHeaderData);
         }
     }
-//---------------------------------------------------------------
-// M2G: Enable rendering on target buffer.
-//----------------------------------------------------------------
-void CSvgEngineImpl::EnableTargetRendering(TBool aTargetRendering )
-    {
-    iIsTargetRenderingEnabled = aTargetRendering; 
-    }
-
-//---------------------------------------------------------------
-// M2G: TBool CSvgEngineImpl::IsTargetRenderingEnabled() const 
-//----------------------------------------------------------------
-TBool CSvgEngineImpl::IsTargetRenderingEnabled() const 
-    {
-    return iIsTargetRenderingEnabled; 
-    }
 //NGA
 // ---------------------------------------------------------------------------
 // SetGdiContext File