From: Vadim Zeitlin Date: Sat, 20 Mar 2010 12:45:23 +0000 (+0000) Subject: Define wxGraphicsRenderer::GetDefaultRenderer() for all non-{MSW,Mac} ports. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ef40c54c636759ddb30a078bfa497e68e4576727?ds=inline Define wxGraphicsRenderer::GetDefaultRenderer() for all non-{MSW,Mac} ports. wxGraphicsRenderer::GetDefaultRenderer() was only defined for wxGTK for some reason but it needs to be defined in terms of GetCairoRenderer() for all ports without native renderer implementation, i.e. everything but wxMSW and wxMac. See #11817. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index a47a9362ac..2767ab8c19 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -1771,13 +1771,6 @@ static wxCairoRenderer gs_cairoGraphicsRenderer; extern wxGraphicsRenderer* gCairoRenderer; wxGraphicsRenderer* gCairoRenderer = &gs_cairoGraphicsRenderer; -#ifdef __WXGTK__ -wxGraphicsRenderer* wxGraphicsRenderer::GetDefaultRenderer() -{ - return &gs_cairoGraphicsRenderer; -} -#endif - wxGraphicsContext * wxCairoRenderer::CreateContext( const wxWindowDC& dc) { return new wxCairoContext(this,dc); @@ -1952,15 +1945,27 @@ wxCairoRenderer::CreateSubBitmap(const wxGraphicsBitmap& WXUNUSED(bitmap), return wxNullGraphicsBitmap; } -#endif // wxUSE_CAIRO - wxGraphicsRenderer* wxGraphicsRenderer::GetCairoRenderer() { -#if wxUSE_CAIRO return &gs_cairoGraphicsRenderer; -#else +} + +#else // !wxUSE_CAIRO + +wxGraphicsRenderer* wxGraphicsRenderer::GetCairoRenderer() +{ return NULL; -#endif } +#endif // wxUSE_CAIRO/!wxUSE_CAIRO + +// MSW and OS X have their own native default renderers, but the other ports +// use Cairo by default +#if !(defined(__WXMSW__) || defined(__WXOSX__)) +wxGraphicsRenderer* wxGraphicsRenderer::GetDefaultRenderer() +{ + return GetCairoRenderer(); +} +#endif // !(__WXMSW__ || __WXOSX__) + #endif // wxUSE_GRAPHICS_CONTEXT