summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/gdi
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/generic/gdi')
-rw-r--r--vcl/unx/generic/gdi/gdiimpl.cxx6
-rw-r--r--vcl/unx/generic/gdi/gdiimpl.hxx2
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx21
3 files changed, 15 insertions, 14 deletions
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index 60ed793915f6..6b90220a0ac8 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -153,6 +153,12 @@ X11SalGraphicsImpl::~X11SalGraphicsImpl()
{
}
+void X11SalGraphicsImpl::Init( SalFrame* /*pFrame*/ )
+{
+ mnPenPixel = mrParent.GetPixel( mnPenColor );
+ mnBrushPixel = mrParent.GetPixel( mnBrushColor );
+}
+
XID X11SalGraphicsImpl::GetXRenderPicture()
{
XRenderPeer& rRenderPeer = XRenderPeer::GetInstance();
diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx
index a6e12ecb6d14..e81d16ee0cb5 100644
--- a/vcl/unx/generic/gdi/gdiimpl.hxx
+++ b/vcl/unx/generic/gdi/gdiimpl.hxx
@@ -108,6 +108,8 @@ public:
virtual ~X11SalGraphicsImpl();
+ virtual void Init( SalFrame* pFrame ) SAL_OVERRIDE;
+
virtual bool setClipRegion( const vcl::Region& ) SAL_OVERRIDE;
//
// get the depth of the device
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index c5dd0bedd54a..97e060eb0a91 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -148,22 +148,15 @@ void X11SalGraphics::SetDrawable( Drawable aDrawable, SalX11Screen nXScreen )
if( hDrawable_ )
{
- X11SalGraphicsImpl* pImpl = dynamic_cast<X11SalGraphicsImpl*>(mpImpl.get());
- if (pImpl)
+ OpenGLSalGraphicsImpl* pOpenGLImpl = dynamic_cast<OpenGLSalGraphicsImpl*>(mpImpl.get());
+ if (pOpenGLImpl && m_pFrame && dynamic_cast<X11WindowProvider*>(m_pFrame))
{
- pImpl->mnPenPixel = GetPixel( pImpl->mnPenColor );
- pImpl->mnBrushPixel = GetPixel( pImpl->mnBrushColor );
- }
- else
- {
- OpenGLSalGraphicsImpl* pOpenGLImpl = dynamic_cast<OpenGLSalGraphicsImpl*>(mpImpl.get());
- if (pOpenGLImpl && m_pFrame && dynamic_cast<X11WindowProvider*>(m_pFrame))
- {
- Window aWin = dynamic_cast<X11WindowProvider*>(m_pFrame)->GetX11Window();
- pOpenGLImpl->GetOpenGLContext().init(GetXDisplay(),
- aWin, m_nXScreen.getXScreen());
- }
+ Window aWin = dynamic_cast<X11WindowProvider*>(m_pFrame)->GetX11Window();
+ pOpenGLImpl->GetOpenGLContext().init(GetXDisplay(),
+ aWin, m_nXScreen.getXScreen());
}
+
+ mpImpl->Init( m_pFrame );
nTextPixel_ = GetPixel( nTextColor_ );
}
}