diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-13 11:26:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-14 07:35:59 +0000 |
commit | 945f1127e20bd32b159da2c4f205cc7bbce3c682 (patch) | |
tree | 0be699284d348c6d4168237cf5c8a66b8a22fa56 /vcl | |
parent | 5e083eb18b4e83078cb73a35862113e754e3267f (diff) |
ditch unused direct XRender text rendering calls
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/gdi/gcach_xpeer.cxx | 78 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/gcach_xpeer.hxx | 4 |
2 files changed, 0 insertions, 82 deletions
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx index f014732621d4..ebcecdae73da 100644 --- a/vcl/unx/generic/gdi/gcach_xpeer.cxx +++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx @@ -196,44 +196,6 @@ MultiScreenGlyph* X11GlyphPeer::PrepareForMultiscreen( ExtGlyphData& rEGD ) cons // --------------------------------------------------------------------------- -Glyph X11GlyphPeer::GetRenderGlyph( const GlyphData& rGD ) const -{ - Glyph aGlyphId = NO_GLYPHID; - const ExtGlyphData& rEGD = rGD.ExtDataRef(); - if( rEGD.meInfo == INFO_XRENDER ) - aGlyphId = reinterpret_cast<Glyph>(rEGD.mpData); - else if( rEGD.meInfo == INFO_MULTISCREEN ) - aGlyphId = reinterpret_cast<MultiScreenGlyph*>(rEGD.mpData)->maXRGlyphId; - return aGlyphId; -} - -// --------------------------------------------------------------------------- - -void X11GlyphPeer::SetRenderGlyph( GlyphData& rGD, Glyph aGlyphId ) const -{ - ExtGlyphData& rEGD = rGD.ExtDataRef(); - switch( rEGD.meInfo ) - { - case INFO_EMPTY: - rEGD.meInfo = INFO_XRENDER; - // fall through - case INFO_XRENDER: - rEGD.mpData = reinterpret_cast<void*>(aGlyphId); - break; - case INFO_PIXMAP: - case INFO_RAWBMP: - PrepareForMultiscreen( rEGD ); - // fall through - case INFO_MULTISCREEN: - reinterpret_cast<MultiScreenGlyph*>(rEGD.mpData)->maXRGlyphId = aGlyphId; - break; - default: - break; // cannot happen... - } -} - -// --------------------------------------------------------------------------- - const RawBitmap* X11GlyphPeer::GetRawBitmap( const GlyphData& rGD ) const { const RawBitmap* pRawBitmap = NO_RAWBMP; @@ -407,46 +369,6 @@ void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyph // --------------------------------------------------------------------------- -GlyphSet X11GlyphPeer::GetGlyphSet( ServerFont& rServerFont, int nScreen ) -{ - if( (nScreen >= 0) && ((mnUsingXRender >> nScreen) & 1) == 0 ) - return 0; - - GlyphSet aGlyphSet; - - switch( rServerFont.GetExtInfo() ) - { - case INFO_XRENDER: - aGlyphSet = (GlyphSet)rServerFont.GetExtPointer(); - break; - - case INFO_EMPTY: - { - // antialiasing for reasonable font heights only - // => prevents crashes caused by X11 requests >= 256k - // => prefer readablity of hinted glyphs at small sizes - // => prefer "grey clouds" to "black clouds" at very small sizes - int nHeight = rServerFont.GetFontSelData().mnHeight; - if( nHeight<250 && rServerFont.GetAntialiasAdvice() ) - { - aGlyphSet = XRenderPeer::GetInstance().CreateGlyphSet(); - rServerFont.SetExtended( INFO_XRENDER, (void*)aGlyphSet ); - } - else - aGlyphSet = 0; - } - break; - - default: - aGlyphSet = 0; - break; - } - - return aGlyphSet; -} - -// --------------------------------------------------------------------------- - Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nReqScreen ) { if( rServerFont.IsGlyphInvisible( nGlyphIndex ) ) diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx index a426e3b0d8be..0de3d1ee1129 100644 --- a/vcl/unx/generic/gdi/gcach_xpeer.hxx +++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx @@ -48,8 +48,6 @@ public: Pixmap GetPixmap( ServerFont&, int nGlyphIndex, int nScreen ); const RawBitmap* GetRawBitmap( ServerFont&, int nGlyphIndex ); - GlyphSet GetGlyphSet( ServerFont&, int nScreen ); - protected: void InitAntialiasing(); @@ -57,10 +55,8 @@ protected: virtual void RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex ); MultiScreenGlyph* PrepareForMultiscreen( ExtGlyphData& ) const; - void SetRenderGlyph( GlyphData&, Glyph ) const; void SetRawBitmap( GlyphData&, const RawBitmap* ) const; void SetPixmap( GlyphData&, Pixmap, int nScreen ) const; - Glyph GetRenderGlyph( const GlyphData& ) const; const RawBitmap* GetRawBitmap( const GlyphData& ) const; Pixmap GetPixmap( const GlyphData&, int nScreen ) const; |