Consider the following code snippet:
HRGN clip = ::CreateRectRgn(50, 50, 100, 100);
::SelectClipRgn(context, clip);
::Rectangle(context, 0, 0, 50, 50);
Is Microsoft's clipping implementation intelligent enough to return immediately from the call to Rectangle without attempting to draw anything? I suspect it probably is but have been unable to find confirmation anywhere. The MSDN documentation for clipping is sparse on under the hood details, and Googling turns up nothing but how to use GDI clipping.
EDIT: It dawned on me that I failed to point out that this is running on Windows Mobile so the toolset I have for analysis is limited.