Yankes : that's exactly what I did yesterday. I wrote my own blit function with the shading done on the fly - it simplifies the whole problem a lot.
But there is still a problem with it. When running in debug mode, the handwritten blit function is also compiled with debug info, making the whole thing soooo sloooow
I'm no specialist on compilers and stuff like that, so I don't know how you can have parts of the code normally build while still being able to debug build the rest...