Why use D2D1_BITMAP_OPTIONS_CANNOT_DRAW when create render target bitmap? Is it faster?
And the docuemnt is confusing:
http://msdn.microsoft.com/en-us/library/windows/desktop/hh446984(v=vs.85).aspx
D2D1_BITMAP_OPTIONS_CANNOT_DRAW must be specified in conjunction with D2D1_BITMAP_OPTIONS_TARGET or D2D1_BITMAP_OPTIONS_CPU_READ. The bitmap can be used a target but, it cannot be drawn from. Attempting to draw with a bitmap that has this flag set will result in the device context being put into an error state with D2DERR_BITMAP_CANNOT_DRAW.
D2D1_BITMAP_OPTIONS_CANNOT_DRAW must be specified in conjunction with D2D1_BITMAP_OPTIONS_TARGET. If specified, the bitmap can be used as a target but it cannot be drawn from. Attempting to draw with a bitmap that has this flag set will result in the device context returning the error D2DERR_BITMAP_CANNOT_DRAW.
I think the second line should be deleted.