openvg/openvgrefimplementation/sfopenvg/sfopenvg/symbian/riEGLOS.cpp
branchEGL_MERGE
changeset 180 f767bd5f4cfc
parent 118 6aeef2faff80
child 212 a8e55d78eb52
--- a/openvg/openvgrefimplementation/sfopenvg/sfopenvg/symbian/riEGLOS.cpp	Fri Jul 16 18:54:03 2010 +0100
+++ b/openvg/openvgrefimplementation/sfopenvg/sfopenvg/symbian/riEGLOS.cpp	Fri Sep 17 09:40:01 2010 +0100
@@ -86,7 +86,7 @@
 
 struct OSWindowContext
 {
-	TNativeWindowType*  iNativeWindowType;   
+	TNativeWindowType   iNativeWindowType;
 };
 
 void* OSCreateWindowContext(EGLNativeWindowType window)
@@ -100,11 +100,9 @@
 	{
 		return NULL;
 	}
-    ctx->iNativeWindowType = (TNativeWindowType*)window;
-    RWindow* win = (RWindow*) window;
-    TSize size = TSize(win->Size());
-    ctx->iNativeWindowType->iSize.iWidth = size.iWidth;
-    ctx->iNativeWindowType->iSize.iHeight = size.iHeight;
+	RDrawableWindow* drawableWindow = (RDrawableWindow*)window;
+	ctx->iNativeWindowType.iSize.iHeight = drawableWindow->Size().iHeight;
+	ctx->iNativeWindowType.iSize.iWidth = drawableWindow->Size().iWidth;
     return ctx;
 }
 
@@ -132,14 +130,8 @@
     OSWindowContext* ctx = (OSWindowContext*)context;
     if(ctx)
     {
-        if ( ctx->iNativeWindowType->iSize.iWidth < 360 )
-    	    ctx->iNativeWindowType->iSize.iWidth;
-        else
-          width= 360;//ctx->iNativeWindowType->iSize.iWidth;
-        if ( ctx->iNativeWindowType->iSize.iHeight < 640 )
-          ctx->iNativeWindowType->iSize.iHeight;
-		    else
-          height= 640; //ctx->iNativeWindowType->iSize.iHeight; 
+    	width=ctx->iNativeWindowType.iSize.iWidth;
+		height=ctx->iNativeWindowType.iSize.iHeight; 
     }
     else
     {
@@ -160,15 +152,15 @@
 {
     OSWindowContext* ctx = (OSWindowContext*)context;
     //blit if either of iBitmap or iMaskBitmap exist
-    if(ctx && ctx->iNativeWindowType->iBitmap)
+    if(ctx && ctx->iNativeWindowType.iBitmap)
     {
         TUint w = drawable->getWidth();
         TUint h = drawable->getHeight();
         
         //these should be same as bitmap
-        if(ctx->iNativeWindowType->iBitmap)
+        if(ctx->iNativeWindowType.iBitmap)
         	{
-        	CFbsBitmap* bitmap = ctx->iNativeWindowType->iBitmap;        	
+        	CFbsBitmap* bitmap = ctx->iNativeWindowType.iBitmap;        	
         	ReadPixelsToCFbsBitmap(*bitmap, w, h);        	
         	}
     }