3 ms·
I wonder why the Windows Phone team decided to remove USER and GDI. After all, they ran fine on PCs in the 90s, so surely performance wouldn't be a problem on s
by mwcampbell 10y ago
I wonder why the Windows Phone team decided to remove USER and GDI. After all, they ran fine on PCs in the 90s, so surely performance wouldn't be a problem on smartphones.
- DrPizza 10y agoModern graphics hardware isn't optimized for drawing bitmapped lines. It's optimized for drawing textured triangles. This means that it's not actually a good fit for GDI any more. Given that Windows Phone was, as far as apps were concerned, a clean slate, there was little reason to retain USER and GDI. win32k.sys is also rife with security flaws, so scrapping it has arguably reliability benefits too.
- Const-me 10y agoI think you’re right about the performance: on WP7 hardware, mobile ARM CPUs should be able to run native Win32 GUI, and the code was already here. GDI is just too old. GDI was created long before multi-core CPUs gained traction, so it paints everything on the single thread. XAML uses two cores, rendering and animations run on a separate thread called “composition thread”. GDI was designed long before GPUs gained traction, so it paints everything on the CPU. XAML manipulate textures on the GPU: it’s faster because GPUs are massively parallel, it uses less energy because custom hardware is more energy efficient than a general-purpose CPU. Here’s more about that: https://msdn.microsoft.com/en-us/library/windows/desktop/ff729480(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/ff7... It’s for D2D API, but both WinRT/XAML and WinPhone/SL platforms use GPU in the similar fashion to D2D.