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
66710ce4
Kaydet (Commit)
66710ce4
authored
May 28, 2013
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
i122350 Corrected buffering when alpha changed
üst
a599e524
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
salbmp.h
vcl/inc/win/salbmp.h
+8
-2
salbmp.cxx
vcl/win/source/gdi/salbmp.cxx
+14
-2
No files found.
vcl/inc/win/salbmp.h
Dosyayı görüntüle @
66710ce4
...
@@ -43,7 +43,7 @@ typedef boost::shared_ptr< Gdiplus::Bitmap > GdiPlusBmpPtr;
...
@@ -43,7 +43,7 @@ typedef boost::shared_ptr< Gdiplus::Bitmap > GdiPlusBmpPtr;
class
WinSalBitmap
:
public
SalBitmap
class
WinSalBitmap
:
public
SalBitmap
{
{
private
:
private
:
friend
class
GdiPlusBuffer
;
// allow buffer to remove maGdiPlusBitmap eventually
friend
class
GdiPlusBuffer
;
// allow buffer to remove maGdiPlusBitmap
and mpAssociatedAlpha
eventually
Size
maSize
;
Size
maSize
;
HGLOBAL
mhDIB
;
HGLOBAL
mhDIB
;
...
@@ -51,8 +51,14 @@ private:
...
@@ -51,8 +51,14 @@ private:
// the buffered evtl. used Gdiplus::Bitmap instance. It is managed by
// the buffered evtl. used Gdiplus::Bitmap instance. It is managed by
// GdiPlusBuffer. To make this safe, it is only handed out as shared
// GdiPlusBuffer. To make this safe, it is only handed out as shared
// pointer; the GdiPlusBuffer may delete the local instance
// pointer; the GdiPlusBuffer may delete the local instance.
//
// mpAssociatedAlpha holds the last WinSalBitmap used to construct an
// evtl. buffered GdiPlusBmp. This is needed since the GdiPlusBmp is a single
// instance and remembered only on the content-WinSalBitmap, not on the
// alpha-WinSalBitmap.
GdiPlusBmpPtr
maGdiPlusBitmap
;
GdiPlusBmpPtr
maGdiPlusBitmap
;
const
WinSalBitmap
*
mpAssociatedAlpha
;
sal_uInt16
mnBitCount
;
sal_uInt16
mnBitCount
;
...
...
vcl/win/source/gdi/salbmp.cxx
Dosyayı görüntüle @
66710ce4
...
@@ -161,6 +161,7 @@ public:
...
@@ -161,6 +161,7 @@ public:
if
(
pSource
->
maGdiPlusBitmap
.
get
())
if
(
pSource
->
maGdiPlusBitmap
.
get
())
{
{
pSource
->
maGdiPlusBitmap
.
reset
();
pSource
->
maGdiPlusBitmap
.
reset
();
pSource
->
mpAssociatedAlpha
=
0
;
}
}
}
}
}
}
...
@@ -186,6 +187,7 @@ WinSalBitmap::WinSalBitmap()
...
@@ -186,6 +187,7 @@ WinSalBitmap::WinSalBitmap()
mhDIB
(
0
),
mhDIB
(
0
),
mhDDB
(
0
),
mhDDB
(
0
),
maGdiPlusBitmap
(),
maGdiPlusBitmap
(),
mpAssociatedAlpha
(
0
),
mnBitCount
(
0
)
mnBitCount
(
0
)
{
{
}
}
...
@@ -219,6 +221,16 @@ void WinSalBitmap::Destroy()
...
@@ -219,6 +221,16 @@ void WinSalBitmap::Destroy()
GdiPlusBmpPtr
WinSalBitmap
::
ImplGetGdiPlusBitmap
(
const
WinSalBitmap
*
pAlphaSource
)
const
GdiPlusBmpPtr
WinSalBitmap
::
ImplGetGdiPlusBitmap
(
const
WinSalBitmap
*
pAlphaSource
)
const
{
{
WinSalBitmap
*
pThat
=
const_cast
<
WinSalBitmap
*
>
(
this
);
if
(
maGdiPlusBitmap
.
get
()
&&
pAlphaSource
!=
mpAssociatedAlpha
)
{
// #122350# if associated alpha with which the GDIPlus was constructed has changed
// it is necessary to remove it from buffer, reset reference to it and reconstruct
pThat
->
maGdiPlusBitmap
.
reset
();
aGdiPlusBuffer
.
remEntry
(
const_cast
<
WinSalBitmap
&
>
(
*
this
));
}
if
(
maGdiPlusBitmap
.
get
())
if
(
maGdiPlusBitmap
.
get
())
{
{
aGdiPlusBuffer
.
touchEntry
(
const_cast
<
WinSalBitmap
&
>
(
*
this
));
aGdiPlusBuffer
.
touchEntry
(
const_cast
<
WinSalBitmap
&
>
(
*
this
));
...
@@ -227,15 +239,15 @@ GdiPlusBmpPtr WinSalBitmap::ImplGetGdiPlusBitmap(const WinSalBitmap* pAlphaSourc
...
@@ -227,15 +239,15 @@ GdiPlusBmpPtr WinSalBitmap::ImplGetGdiPlusBitmap(const WinSalBitmap* pAlphaSourc
{
{
if
(
maSize
.
Width
()
>
0
&&
maSize
.
Height
()
>
0
)
if
(
maSize
.
Width
()
>
0
&&
maSize
.
Height
()
>
0
)
{
{
WinSalBitmap
*
pThat
=
const_cast
<
WinSalBitmap
*
>
(
this
);
if
(
pAlphaSource
)
if
(
pAlphaSource
)
{
{
pThat
->
maGdiPlusBitmap
.
reset
(
pThat
->
ImplCreateGdiPlusBitmap
(
*
pAlphaSource
));
pThat
->
maGdiPlusBitmap
.
reset
(
pThat
->
ImplCreateGdiPlusBitmap
(
*
pAlphaSource
));
pThat
->
mpAssociatedAlpha
=
pAlphaSource
;
}
}
else
else
{
{
pThat
->
maGdiPlusBitmap
.
reset
(
pThat
->
ImplCreateGdiPlusBitmap
());
pThat
->
maGdiPlusBitmap
.
reset
(
pThat
->
ImplCreateGdiPlusBitmap
());
pThat
->
mpAssociatedAlpha
=
0
;
}
}
if
(
maGdiPlusBitmap
.
get
())
if
(
maGdiPlusBitmap
.
get
())
...
...
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