summaryrefslogtreecommitdiff
path: root/vcl/unx/source
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2011-01-17 16:06:05 +0100
committerLuboš Luňák <l.lunak@suse.cz>2011-01-17 16:26:33 +0100
commit6a1ec8a0060f7b9b352a64750e23b1a759f051b0 (patch)
tree9333a45d2790f627ef6f67219808ad4c18de4ff4 /vcl/unx/source
parent4a45c1b515859e997df02da0ff3d6d957c9048e5 (diff)
avoid some useless and confusing void* <-> XRenderPictFormat* casts
Diffstat (limited to 'vcl/unx/source')
-rw-r--r--vcl/unx/source/gdi/pspgraphics.cxx2
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx28
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx4
-rw-r--r--vcl/unx/source/gdi/salvd.cxx14
4 files changed, 24 insertions, 24 deletions
diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx
index 0c4650a88dcc..dcbb689265b5 100644
--- a/vcl/unx/source/gdi/pspgraphics.cxx
+++ b/vcl/unx/source/gdi/pspgraphics.cxx
@@ -1472,7 +1472,7 @@ SystemGraphicsData PspGraphics::GetGraphicsData() const
SystemGraphicsData aRes;
aRes.nSize = sizeof(aRes);
aRes.hDrawable = 0;
- aRes.pRenderFormat = 0;
+ aRes.pXRenderFormat = 0;
return aRes;
}
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index 0bc1612d8062..c7a9afe97a70 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -102,8 +102,8 @@ X11SalGraphics::X11SalGraphics()
m_pVDev = NULL;
m_pDeleteColormap = NULL;
hDrawable_ = None;
- m_aRenderPicture = 0;
- m_pRenderFormat = NULL;
+ m_aXRenderPicture = 0;
+ m_pXRenderFormat = NULL;
pClipRegion_ = NULL;
pPaintRegion_ = NULL;
@@ -187,8 +187,8 @@ void X11SalGraphics::freeResources()
if( m_pDeleteColormap )
delete m_pDeleteColormap, m_pColormap = m_pDeleteColormap = NULL;
- if( m_aRenderPicture )
- XRenderPeer::GetInstance().FreePicture( m_aRenderPicture ), m_aRenderPicture = 0;
+ if( m_aXRenderPicture )
+ XRenderPeer::GetInstance().FreePicture( m_aXRenderPicture ), m_aXRenderPicture = 0;
bPenGC_ = bFontGC_ = bBrushGC_ = bMonoGC_ = bCopyGC_ = bInvertGC_ = bInvert50GC_ = bStippleGC_ = bTrackingGC_ = false;
}
@@ -209,10 +209,10 @@ void X11SalGraphics::SetDrawable( Drawable aDrawable, int nScreen )
hDrawable_ = aDrawable;
SetXRenderFormat( NULL );
- if( m_aRenderPicture )
+ if( m_aXRenderPicture )
{
- XRenderPeer::GetInstance().FreePicture( m_aRenderPicture );
- m_aRenderPicture = 0;
+ XRenderPeer::GetInstance().FreePicture( m_aXRenderPicture );
+ m_aXRenderPicture = 0;
}
if( hDrawable_ )
@@ -1014,11 +1014,11 @@ XID X11SalGraphics::GetXRenderPicture()
{
XRenderPeer& rRenderPeer = XRenderPeer::GetInstance();
- if( !m_aRenderPicture )
+ if( !m_aXRenderPicture )
{
// check xrender support for matching visual
// find a XRenderPictFormat compatible with the Drawable
- XRenderPictFormat* pVisualFormat = static_cast<XRenderPictFormat*>(GetXRenderFormat());
+ XRenderPictFormat* pVisualFormat = GetXRenderFormat();
if( !pVisualFormat )
{
Visual* pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual();
@@ -1026,11 +1026,11 @@ XID X11SalGraphics::GetXRenderPicture()
if( !pVisualFormat )
return 0;
// cache the XRenderPictFormat
- SetXRenderFormat( static_cast<void*>(pVisualFormat) );
+ SetXRenderFormat( pVisualFormat );
}
// get the matching xrender target for drawable
- m_aRenderPicture = rRenderPeer.CreatePicture( hDrawable_, pVisualFormat, 0, NULL );
+ m_aXRenderPicture = rRenderPeer.CreatePicture( hDrawable_, pVisualFormat, 0, NULL );
}
{
@@ -1038,10 +1038,10 @@ XID X11SalGraphics::GetXRenderPicture()
// TODO: avoid clip reset if already done
XRenderPictureAttributes aAttr;
aAttr.clip_mask = None;
- rRenderPeer.ChangePicture( m_aRenderPicture, CPClipMask, &aAttr );
+ rRenderPeer.ChangePicture( m_aXRenderPicture, CPClipMask, &aAttr );
}
- return m_aRenderPicture;
+ return m_aXRenderPicture;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -1057,7 +1057,7 @@ SystemGraphicsData X11SalGraphics::GetGraphicsData() const
aRes.nScreen = m_nScreen;
aRes.nDepth = GetDisplay()->GetVisual( m_nScreen ).GetDepth();
aRes.aColormap = GetDisplay()->GetColormap( m_nScreen ).GetXColormap();
- aRes.pRenderFormat = m_pRenderFormat;
+ aRes.pXRenderFormat = m_pXRenderFormat;
return aRes;
}
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index fa0f695dee8b..5903d4937ed9 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -985,13 +985,13 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
return;
// find a XRenderPictFormat compatible with the Drawable
- XRenderPictFormat* pVisualFormat = static_cast<XRenderPictFormat*>(GetXRenderFormat());
+ XRenderPictFormat* pVisualFormat = GetXRenderFormat();
if( !pVisualFormat )
{
Visual* pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual();
pVisualFormat = XRenderPeer::GetInstance().FindVisualFormat( pVisual );
// cache the XRenderPictFormat
- SetXRenderFormat( static_cast<void*>(pVisualFormat) );
+ SetXRenderFormat( pVisualFormat );
}
DBG_ASSERT( pVisualFormat!=NULL, "no matching XRenderPictFormat for text" );
diff --git a/vcl/unx/source/gdi/salvd.cxx b/vcl/unx/source/gdi/salvd.cxx
index c883acfa1973..ce8421f14f49 100644
--- a/vcl/unx/source/gdi/salvd.cxx
+++ b/vcl/unx/source/gdi/salvd.cxx
@@ -68,7 +68,8 @@ SalVirtualDevice* X11SalInstance::CreateVirtualDevice( SalGraphics* pGraphics,
}
nDX = (long)w;
nDY = (long)h;
- if( !pVDev->Init( GetX11SalData()->GetDisplay(), nDX, nDY, nBitCount, nScreen, pData->hDrawable, pData->pRenderFormat ) )
+ if( !pVDev->Init( GetX11SalData()->GetDisplay(), nDX, nDY, nBitCount, nScreen, pData->hDrawable,
+ static_cast< XRenderPictFormat* >( pData->pXRenderFormat )) )
{
delete pVDev;
return NULL;
@@ -136,7 +137,7 @@ BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay,
USHORT nBitCount,
int nScreen,
Pixmap hDrawable,
- void* pRenderFormatVoid )
+ XRenderPictFormat* pXRenderFormat )
{
SalColormap* pColormap = NULL;
bool bDeleteColormap = false;
@@ -144,11 +145,10 @@ BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay,
pDisplay_ = pDisplay;
pGraphics_ = new X11SalGraphics();
m_nScreen = nScreen;
- if( pRenderFormatVoid ) {
- XRenderPictFormat *pRenderFormat = ( XRenderPictFormat* )pRenderFormatVoid;
- pGraphics_->SetXRenderFormat( pRenderFormat );
- if( pRenderFormat->colormap )
- pColormap = new SalColormap( pDisplay, pRenderFormat->colormap, m_nScreen );
+ if( pXRenderFormat ) {
+ pGraphics_->SetXRenderFormat( pXRenderFormat );
+ if( pXRenderFormat->colormap )
+ pColormap = new SalColormap( pDisplay, pXRenderFormat->colormap, m_nScreen );
else
pColormap = new SalColormap( nBitCount );
bDeleteColormap = true;