fix d2d compile error and wrong background

TODO:
for direct2d, why background is white if return after clear color and
data is null?