equal
deleted
inserted
replaced
84 * \note |
84 * \note |
85 *//*-------------------------------------------------------------------*/ |
85 *//*-------------------------------------------------------------------*/ |
86 |
86 |
87 struct OSWindowContext |
87 struct OSWindowContext |
88 { |
88 { |
89 //RDrawableWindow* iDrawWindow; //added by Jose. |
89 //RDrawableWindow* iDrawWindow; |
90 TNativeWindowType iNativeWindowType; |
90 TNativeWindowType iNativeWindowType; |
91 //TNativeWindowType* iNativeWindowType; |
91 |
92 }; |
92 }; |
93 |
93 |
94 void* OSCreateWindowContext(EGLNativeWindowType window) |
94 void* OSCreateWindowContext(EGLNativeWindowType window) |
95 { |
95 { |
96 OSWindowContext* ctx = NULL; |
96 OSWindowContext* ctx = NULL; |
100 } |
100 } |
101 catch(std::bad_alloc) |
101 catch(std::bad_alloc) |
102 { |
102 { |
103 return NULL; |
103 return NULL; |
104 } |
104 } |
105 //ctx->iNativeWindowType = (TNativeWindowType*)window; //added by Jose |
105 //ctx->iNativeWindowType = (TNativeWindowType*)window; |
106 |
106 |
107 RDrawableWindow* drawbleWindow = (RDrawableWindow*)window; //added by Jose |
107 RDrawableWindow* drawbleWindow = (RDrawableWindow*)window; |
108 ctx->iNativeWindowType.iSize.iHeight = drawbleWindow->Size().iHeight;//added by Jose |
108 ctx->iNativeWindowType.iSize.iHeight = drawbleWindow->Size().iHeight; |
109 ctx->iNativeWindowType.iSize.iWidth = drawbleWindow->Size().iWidth; //added by Jose |
109 ctx->iNativeWindowType.iSize.iWidth = drawbleWindow->Size().iWidth; |
110 |
110 |
111 return ctx; |
111 return ctx; |
112 } |
112 } |
113 |
113 |
114 void OSDestroyWindowContext(void* context) |
114 void OSDestroyWindowContext(void* context) |
137 |
137 |
138 if(ctx) |
138 if(ctx) |
139 { |
139 { |
140 width=ctx->iNativeWindowType.iSize.iWidth; |
140 width=ctx->iNativeWindowType.iSize.iWidth; |
141 height=ctx->iNativeWindowType.iSize.iHeight; |
141 height=ctx->iNativeWindowType.iSize.iHeight; |
142 |
142 } |
143 RDebug::Printf(" $$$$$$$$$$$$$ In OSGetWindowSize,Thread Id %Lu $$$$$$$$$$$$$ ",(RThread().Id())); |
|
144 RDebug::Printf(" $$$$$$$$$$$$$ In OSGetWindowSize,Width is %d $$$$$$$$$$$$$ ",width); |
|
145 RDebug::Printf(" $$$$$$$$$$$$$ In OSGetWindowSize,Height is %d $$$$$$$$$$$$$ ",height); |
|
146 |
|
147 } |
|
148 else |
143 else |
149 { |
144 { |
150 width = 0; |
145 width = 0; |
151 height = 0; |
146 height = 0; |
152 } |
147 } |
160 } |
155 } |
161 |
156 |
162 |
157 |
163 void OSBlitToWindow(void* context, const Drawable* drawable) |
158 void OSBlitToWindow(void* context, const Drawable* drawable) |
164 { |
159 { |
165 |
160 TUint w = drawable->getWidth(); |
166 OSWindowContext* ctx = (OSWindowContext*)context; |
161 TUint h = drawable->getHeight(); |
|
162 |
|
163 OSWindowContext* ctx = (OSWindowContext*)context; |
167 //blit if either of iBitmap or iMaskBitmap exist |
164 //blit if either of iBitmap or iMaskBitmap exist |
168 if(ctx && ctx->iNativeWindowType.iBitmap) |
165 if(ctx && ctx->iNativeWindowType.iBitmap) |
169 { |
166 { |
170 TUint w = drawable->getWidth(); |
167 |
171 TUint h = drawable->getHeight(); |
|
172 |
|
173 RDebug::Printf("!!!!!!!!!!!!!!!!!!!!!!!!!! In OSBlitToWindow(),w is = %d\n", w); |
|
174 RDebug::Printf("!!!!!!!!!!!!!!!!!!!!!!!!!!!!In OSBlitToWindow,h is = %d\n", h); |
|
175 |
|
176 //these should be same as bitmap |
168 //these should be same as bitmap |
177 if(ctx->iNativeWindowType.iBitmap) |
169 if(ctx->iNativeWindowType.iBitmap) |
178 { |
170 { |
179 CFbsBitmap* bitmap = ctx->iNativeWindowType.iBitmap; |
171 CFbsBitmap* bitmap = ctx->iNativeWindowType.iBitmap; |
180 ReadPixelsToCFbsBitmap(*bitmap, w, h); |
172 ReadPixelsToCFbsBitmap(*bitmap, w, h); |
236 { |
228 { |
237 TSize size = ((CFbsBitmap*)pixmap)->SizeInPixels(); |
229 TSize size = ((CFbsBitmap*)pixmap)->SizeInPixels(); |
238 *width = size.iWidth; |
230 *width = size.iWidth; |
239 *height = size.iHeight; |
231 *height = size.iHeight; |
240 *stride = ((CFbsBitmap*)pixmap)->DataStride(); |
232 *stride = ((CFbsBitmap*)pixmap)->DataStride(); |
241 |
233 |
242 RDebug::Printf(" ---------------------------- In OSGetNativePixmapInfo width is %d ^^^^^^^^^^^^^^^^^ ",size.iWidth); |
|
243 RDebug::Printf(" ---------------------------- In OSGetNativePixmapInfo,height addr is %d ^^^^^^^^^^^^^^^^",size.iHeight); |
|
244 |
|
245 *data = (int*)(((CFbsBitmap*)pixmap)->DataAddress()); |
234 *data = (int*)(((CFbsBitmap*)pixmap)->DataAddress()); |
246 TDisplayMode mode = ((CFbsBitmap*)pixmap)->DisplayMode(); |
235 TDisplayMode mode = ((CFbsBitmap*)pixmap)->DisplayMode(); |
247 switch(mode) |
236 switch(mode) |
248 { |
237 { |
249 case EColor16MA: |
238 case EColor16MA: |