This is unnecessary, COM is already initialized on the application startup and
Direct2D can't be used before that anyhow.
This also fixes lack of matching CoUninitialize() call.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
ID2D1DCRenderTarget was leaked every time a wxD2DContext was created because a
raw pointer was given to wxCOMPtr<> which didn't take its ownership.
Use wxCOMPtr instead of the raw pointer to fix this and also fix more rare but
still possible leak in case of error.
This fixes out of memory errors and crashes in the drawing sample after a few
seconds of constant window resizing/repainting.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Bail out earlier: if d2d1.dll is not there, it doesn't make sense to try to
load dwrite.dll.
Also use Load() return value directly instead of ignoring it and then checking
for IsLoaded().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxDL_QUIET flag when loading Direct2D DLLs as we're prepared to handle
their absence and don't need to show error messages if they're not available.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
DirectWrite GDI interop only works with Unicode LOGFONTW, so use it explicitly
instead of LOGFONT which is LOGFONTA in non-Unicode build.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
ID2D1Image is not defined in v7.0A platform SDK used by VC10 and doesn't seem
to be needed here as we are only working with ID2D1Bitmaps (deriving from
ID2D1Image) anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The line defining PI didn't compile with VC10 because atan(1) is ambiguous
(argument could be float, double or long double). And it was not needed anyhow
as PI was not used anywhere (and if it were, we should be just using M_PI from
wx/math.h anyhow), so simply remove it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775