45 } |
45 } |
46 |
46 |
47 void EGLAPIWrapper::SetProcessInformation( TUint32 aProcess, TUint32 aThread ) |
47 void EGLAPIWrapper::SetProcessInformation( TUint32 aProcess, TUint32 aThread ) |
48 { |
48 { |
49 TRACE("EGLAPIWrapper::SetProcessInformation()\n"); |
49 TRACE("EGLAPIWrapper::SetProcessInformation()\n"); |
50 ::eglPlatsimSetProcessInformation( aProcess, aThread ); |
50 ::eglSimulatorSetProcessInformation( aProcess, aThread ); |
51 } |
51 } |
52 |
52 |
53 void EGLAPIWrapper::Cleanup( TUint32 aProcess, TUint32 aThread ) |
53 void EGLAPIWrapper::Cleanup( TUint32 aProcess, TUint32 aThread ) |
54 { |
54 { |
55 TRACE("EGLAPIWrapper::Cleanup()\n"); |
55 TRACE("EGLAPIWrapper::Cleanup()\n"); |
56 ::eglPlatsimSetProcessInformation( aProcess, aThread ); |
56 ::eglSimulatorSetProcessInformation( aProcess, aThread ); |
57 ::eglReleaseThread(); |
57 ::eglReleaseThread(); |
58 } |
58 } |
59 |
59 |
60 int EGLAPIWrapper::WriteReply() |
60 int EGLAPIWrapper::WriteReply() |
61 { |
61 { |
62 TRACE("EGLAPIWrapper::WriteReply()\n"); |
62 TRACE("EGLAPIWrapper::WriteReply()\n"); |
63 #ifdef LOG_ERROR |
63 #ifdef LOG_ERROR |
64 int operationid = (int)m_currentFunctionCall.Data().Header().iOpCode; |
64 int operationid = (int)m_currentFunctionCall.Data().Header().iOpCode; |
65 int eglerror = ::eglPlatsimGetError(); |
65 int eglerror = ::eglSimulatorGetError(); |
66 if ( m_lastEglError != eglerror ) |
66 if ( m_lastEglError != eglerror ) |
67 { |
67 { |
68 if ( EGL_SUCCESS != eglerror ) |
68 if ( EGL_SUCCESS != eglerror ) |
69 { |
69 { |
70 TRACE("EGL error 0x%X, for request %d\n", eglerror, operationid ); |
70 TRACE("EGL error 0x%X, for request %d\n", eglerror, operationid ); |
839 m_currentFunctionCall.GetEGLint( buffer1Offset, 7 ); |
839 m_currentFunctionCall.GetEGLint( buffer1Offset, 7 ); |
840 |
840 |
841 void* buffer0 = (void*)((EGLint)m_surfaceBuffer + buffer0Offset); |
841 void* buffer0 = (void*)((EGLint)m_surfaceBuffer + buffer0Offset); |
842 void* buffer1 = (void*)((EGLint)m_surfaceBuffer + buffer1Offset); |
842 void* buffer1 = (void*)((EGLint)m_surfaceBuffer + buffer1Offset); |
843 |
843 |
844 ::eglPlatsimSetSurfaceParams(display, surface, width, height, stride, buffer0, buffer1); |
844 ::eglSimulatorSetSurfaceParams(display, surface, width, height, stride, buffer0, buffer1); |
845 m_currentFunctionCall.SetReturnValue( 0 ); |
845 m_currentFunctionCall.SetReturnValue( 0 ); |
846 TRACE("EGLAPIWrapper::eglPlatsimSetSurfaceParams() <-\n"); |
846 TRACE("EGLAPIWrapper::eglSimulatorSetSurfaceParams() <-\n"); |
847 return WriteReply(); |
847 return WriteReply(); |
848 } |
848 } |
849 |
849 |
850 |
850 |
851 int EGLAPIWrapper::eglPlatsimCopyImageData() |
851 int EGLAPIWrapper::eglSimulatorCopyImageData() |
852 { |
852 { |
853 TRACE("EGLAPIWrapper::eglPlatsimCopyImageData() ->\n"); |
853 TRACE("EGLAPIWrapper::eglSimulatorCopyImageData() ->\n"); |
854 void* data(NULL); |
854 void* data(NULL); |
855 int size(0); |
855 int size(0); |
856 m_currentFunctionCall.GetVectorData( data, size, 0 ); |
856 m_currentFunctionCall.GetVectorData( data, size, 0 ); |
857 |
857 |
858 if ( size ) |
858 if ( size ) |
859 { |
859 { |
860 EGLDisplay display = ::eglGetCurrentDisplay(); |
860 EGLDisplay display = ::eglGetCurrentDisplay(); |
861 EGLSurface surface = ::eglGetCurrentSurface(EGL_DRAW); |
861 EGLSurface surface = ::eglGetCurrentSurface(EGL_DRAW); |
862 NativePixmapType nativePixmap = eglPlatsimGetPixmapSurfaceBitmap(display,surface); |
862 NativePixmapType nativePixmap = eglSimulatorGetPixmapSurfaceBitmap(display,surface); |
863 SymbianPixmap* symbianBitmap = (SymbianPixmap*)nativePixmap; |
863 SymbianPixmap* symbianBitmap = (SymbianPixmap*)nativePixmap; |
864 if ( symbianBitmap ) |
864 if ( symbianBitmap ) |
865 { |
865 { |
866 m_currentFunctionCall.SetVectorData( symbianBitmap->data, size, 0 ); |
866 m_currentFunctionCall.SetVectorData( symbianBitmap->data, size, 0 ); |
867 } |
867 } |
868 } |
868 } |
869 TRACE("EGLAPIWrapper::eglPlatsimCopyImageData() <-\n"); |
869 TRACE("EGLAPIWrapper::eglSimulatorCopyImageData() <-\n"); |
870 return WriteReply(); |
870 return WriteReply(); |
871 } |
871 } |
872 |
872 |
873 int EGLAPIWrapper::eglPixmapSurfaceSizeChanged() |
873 int EGLAPIWrapper::eglPixmapSurfaceSizeChanged() |
874 { |
874 { |
886 EGLint height; |
886 EGLint height; |
887 m_currentFunctionCall.GetEGLint( height, 5 ); |
887 m_currentFunctionCall.GetEGLint( height, 5 ); |
888 EGLint stride; |
888 EGLint stride; |
889 m_currentFunctionCall.GetEGLint( stride, 6 ); |
889 m_currentFunctionCall.GetEGLint( stride, 6 ); |
890 |
890 |
891 NativePixmapType nativePixmap = eglPlatsimGetPixmapSurfaceBitmap(display,surface); |
891 NativePixmapType nativePixmap = eglSimulatorGetPixmapSurfaceBitmap(display,surface); |
892 SymbianPixmap* symbianBitmap = (SymbianPixmap*)nativePixmap; |
892 SymbianPixmap* symbianBitmap = (SymbianPixmap*)nativePixmap; |
893 if ( symbianBitmap ) |
893 if ( symbianBitmap ) |
894 { |
894 { |
895 symbianBitmap->format = (TDisplayMode)format; |
895 symbianBitmap->format = (TDisplayMode)format; |
896 symbianBitmap->width = width; |
896 symbianBitmap->width = width; |
1253 ret = eglCopyBuffers(); |
1253 ret = eglCopyBuffers(); |
1254 break; |
1254 break; |
1255 } |
1255 } |
1256 case EglRFC::EeglSimulatorSetSurfaceParams: |
1256 case EglRFC::EeglSimulatorSetSurfaceParams: |
1257 { |
1257 { |
1258 ret = eglPlatsimSetSurfaceParams(); |
1258 ret = eglSimulatorSetSurfaceParams(); |
1259 break; |
1259 break; |
1260 } |
1260 } |
1261 case EglRFC::EeglSimulatorCopyImageData: |
1261 case EglRFC::EeglSimulatorCopyImageData: |
1262 { |
1262 { |
1263 ret = eglPlatsimCopyImageData(); |
1263 ret = eglSimulatorCopyImageData(); |
1264 break; |
1264 break; |
1265 } |
1265 } |
1266 case EglRFC::EeglPixmapSurfaceSizeChanged: |
1266 case EglRFC::EeglPixmapSurfaceSizeChanged: |
1267 { |
1267 { |
1268 ret = eglPixmapSurfaceSizeChanged(); |
1268 ret = eglPixmapSurfaceSizeChanged(); |