Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
1c064d14
Kaydet (Commit)
1c064d14
authored
Kas 13, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
I don't see that any of this makes sense anymore
üst
5670184e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
91 deletions
+6
-91
gcach_xpeer.cxx
vcl/unx/generic/gdi/gcach_xpeer.cxx
+6
-83
gcach_xpeer.hxx
vcl/unx/generic/gdi/gcach_xpeer.hxx
+0
-8
No files found.
vcl/unx/generic/gdi/gcach_xpeer.cxx
Dosyayı görüntüle @
1c064d14
...
@@ -43,19 +43,7 @@
...
@@ -43,19 +43,7 @@
// ===========================================================================
// ===========================================================================
X11GlyphPeer
::
X11GlyphPeer
()
X11GlyphPeer
::
X11GlyphPeer
()
:
mpDisplay
(
GetGenericData
()
->
GetSalDisplay
()
->
GetDisplay
()
)
,
mnMaxScreens
(
0
)
,
mnDefaultScreen
(
0
)
{
{
if
(
!
mpDisplay
)
return
;
SalDisplay
&
rSalDisplay
=
*
GetGenericData
()
->
GetSalDisplay
();
mpDisplay
=
rSalDisplay
.
GetDisplay
();
mnMaxScreens
=
rSalDisplay
.
GetScreenCount
();
if
(
mnMaxScreens
>
MAX_GCACH_SCREENS
)
mnMaxScreens
=
MAX_GCACH_SCREENS
;
mnDefaultScreen
=
rSalDisplay
.
GetDefaultScreenNumber
();
}
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
...
@@ -65,10 +53,13 @@ X11GlyphPeer::~X11GlyphPeer()
...
@@ -65,10 +53,13 @@ X11GlyphPeer::~X11GlyphPeer()
if
(
!
ImplGetSVData
()
)
if
(
!
ImplGetSVData
()
)
return
;
return
;
//Why do this here, move into dtor/shutdown of display?
SalDisplay
*
pSalDisp
=
GetGenericData
()
->
GetSalDisplay
();
SalDisplay
*
pSalDisp
=
GetGenericData
()
->
GetSalDisplay
();
Display
*
const
pX11Disp
=
pSalDisp
->
GetDisplay
();
Display
*
const
pX11Disp
=
pSalDisp
->
GetDisplay
();
int
nMaxScreens
=
pSalDisp
->
GetScreenCount
();
XRenderPeer
&
rRenderPeer
=
XRenderPeer
::
GetInstance
();
XRenderPeer
&
rRenderPeer
=
XRenderPeer
::
GetInstance
();
for
(
int
i
=
0
;
i
<
mnMaxScreens
;
i
++
)
for
(
int
i
=
0
;
i
<
nMaxScreens
;
i
++
)
{
{
SalDisplay
::
RenderEntryMap
&
rMap
=
pSalDisp
->
GetRenderEntries
(
i
);
SalDisplay
::
RenderEntryMap
&
rMap
=
pSalDisp
->
GetRenderEntries
(
i
);
for
(
SalDisplay
::
RenderEntryMap
::
iterator
it
=
rMap
.
begin
();
it
!=
rMap
.
end
();
++
it
)
for
(
SalDisplay
::
RenderEntryMap
::
iterator
it
=
rMap
.
begin
();
it
!=
rMap
.
end
();
++
it
)
...
@@ -82,85 +73,17 @@ X11GlyphPeer::~X11GlyphPeer()
...
@@ -82,85 +73,17 @@ X11GlyphPeer::~X11GlyphPeer()
}
}
}
}
// ===========================================================================
enum
{
INFO_EMPTY
=
0
,
INFO_PIXMAP
,
INFO_XRENDER
,
INFO_RAWBMP
};
static
const
Glyph
NO_GLYPHID
=
0
;
static
RawBitmap
*
const
NO_RAWBMP
=
NULL
;
static
const
Pixmap
NO_PIXMAP
=
~
0
;
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
void
X11GlyphPeer
::
RemovingFont
(
ServerFont
&
rServerFont
)
void
X11GlyphPeer
::
RemovingFont
(
ServerFont
&
)
{
{
void
*
pFontExt
=
rServerFont
.
GetExtPointer
();
switch
(
rServerFont
.
GetExtInfo
()
)
{
case
INFO_PIXMAP
:
case
INFO_RAWBMP
:
// nothing to do
break
;
case
INFO_XRENDER
:
XRenderPeer
::
GetInstance
().
FreeGlyphSet
(
(
GlyphSet
)
pFontExt
);
break
;
}
rServerFont
.
SetExtended
(
INFO_EMPTY
,
NULL
);
}
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// notification to clean up GlyphPeer resources for this glyph
// notification to clean up GlyphPeer resources for this glyph
void
X11GlyphPeer
::
RemovingGlyph
(
ServerFont
&
/*rServerFont*/
,
GlyphData
&
rGlyphData
,
int
/*nGlyphIndex*/
)
void
X11GlyphPeer
::
RemovingGlyph
(
ServerFont
&
,
GlyphData
&
,
int
/*nGlyphIndex*/
)
{
{
// nothing to do if the GlyphPeer hasn't allocated resources for the glyph
if
(
rGlyphData
.
ExtDataRef
().
meInfo
==
INFO_EMPTY
)
return
;
const
GlyphMetric
&
rGM
=
rGlyphData
.
GetMetric
();
const
int
nWidth
=
rGM
.
GetSize
().
Width
();
const
int
nHeight
=
rGM
.
GetSize
().
Height
();
void
*
pGlyphExt
=
rGlyphData
.
ExtDataRef
().
mpData
;
switch
(
rGlyphData
.
ExtDataRef
().
meInfo
)
{
case
INFO_PIXMAP
:
{
Pixmap
aPixmap
=
(
Pixmap
)
pGlyphExt
;
if
(
aPixmap
!=
None
)
{
XFreePixmap
(
mpDisplay
,
aPixmap
);
mnBytesUsed
-=
nHeight
*
((
nWidth
+
7
)
>>
3
);
}
}
break
;
case
INFO_RAWBMP
:
{
RawBitmap
*
pRawBitmap
=
(
RawBitmap
*
)
pGlyphExt
;
if
(
pRawBitmap
!=
NULL
)
{
mnBytesUsed
-=
pRawBitmap
->
mnScanlineSize
*
pRawBitmap
->
mnHeight
;
mnBytesUsed
-=
sizeof
(
RawBitmap
);
delete
pRawBitmap
;
}
}
break
;
case
INFO_XRENDER
:
{
// Glyph nGlyphId = (Glyph)rGlyphData.GetExtPointer();
// XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nGlyphId );
mnBytesUsed
-=
nHeight
*
((
nWidth
+
3
)
&
~
3
);
}
break
;
}
if
(
mnBytesUsed
<
0
)
// TODO: eliminate nBytesUsed calc mismatch
mnBytesUsed
=
0
;
rGlyphData
.
ExtDataRef
()
=
ExtGlyphData
();
}
}
// ===========================================================================
// ===========================================================================
...
...
vcl/unx/generic/gdi/gcach_xpeer.hxx
Dosyayı görüntüle @
1c064d14
...
@@ -47,14 +47,6 @@ public:
...
@@ -47,14 +47,6 @@ public:
protected
:
protected
:
virtual
void
RemovingFont
(
ServerFont
&
);
virtual
void
RemovingFont
(
ServerFont
&
);
virtual
void
RemovingGlyph
(
ServerFont
&
,
GlyphData
&
,
int
nGlyphIndex
);
virtual
void
RemovingGlyph
(
ServerFont
&
,
GlyphData
&
,
int
nGlyphIndex
);
private
:
Display
*
mpDisplay
;
// thirty-two screens should be enough for everyone...
static
const
int
MAX_GCACH_SCREENS
=
32
;
int
mnMaxScreens
;
int
mnDefaultScreen
;
};
};
class
X11GlyphCache
:
public
GlyphCache
class
X11GlyphCache
:
public
GlyphCache
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment