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
3c115cd0
Kaydet (Commit)
3c115cd0
authored
Tem 30, 2014
tarafından
Andrzej Hunt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use SolarMutexGuard instead of pairs of Acquire/ReleaseSolarMutex
Change-Id: I7ff41dd932fd9860dff944b3bf8ff5bdc230ae5d
üst
5ee87e86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
53 deletions
+46
-53
init.cxx
desktop/source/lib/init.cxx
+46
-53
No files found.
desktop/source/lib/init.cxx
Dosyayı görüntüle @
3c115cd0
...
...
@@ -466,11 +466,8 @@ static void doc_setPart(LibreOfficeKitDocument* pThis, int nPart)
return
;
}
Application
::
AcquireSolarMutex
(
1
);
{
pDoc
->
setPart
(
nPart
);
}
Application
::
ReleaseSolarMutex
();
SolarMutexGuard
aGuard
;
pDoc
->
setPart
(
nPart
);
}
static
char
*
doc_getPartName
(
LibreOfficeKitDocument
*
pThis
,
int
nPart
)
...
...
@@ -504,31 +501,29 @@ static void doc_setPartMode(LibreOfficeKitDocument* pThis,
return
;
}
Application
::
AcquireSolarMutex
(
1
);
SolarMutexGuard
aGuard
;
int
nCurrentPart
=
pDoc
->
getPart
();
pDoc
->
setPartMode
(
ePartMode
);
// We need to make sure the internal state is updated, just changing the mode
// might not update the relevant shells (i.e. impress will keep rendering the
// previous mode unless we do this).
// TODO: we might want to do this within the relevant components rather than
// here, but that's also dependent on how we implement embedded object
// rendering I guess?
// TODO: we could be clever and e.g. set to 0 when we change to/from
// embedded object mode, and not when changing between slide/notes/combined
// modes?
if
(
nCurrentPart
<
pDoc
->
getParts
()
)
{
int
nCurrentPart
=
pDoc
->
getPart
();
pDoc
->
setPartMode
(
ePartMode
);
// We need to make sure the internal state is updated, just changing the mode
// might not update the relevant shells (i.e. impress will keep rendering the
// previous mode unless we do this).
// TODO: we might want to do this within the relevant components rather than
// here, but that's also dependent on how we implement embedded object
// rendering I guess?
// TODO: we could be clever and e.g. set to 0 when we change to/from
// embedded object mode, and not when changing between slide/notes/combined
// modes?
if
(
nCurrentPart
<
pDoc
->
getParts
()
)
{
pDoc
->
setPart
(
nCurrentPart
);
}
else
{
pDoc
->
setPart
(
0
);
}
pDoc
->
setPart
(
nCurrentPart
);
}
else
{
pDoc
->
setPart
(
0
);
}
Application
::
ReleaseSolarMutex
();
}
void
doc_paintTile
(
LibreOfficeKitDocument
*
pThis
,
...
...
@@ -550,38 +545,36 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
return
;
}
Application
::
AcquireSolarMutex
(
1
)
;
{
SolarMutexGuard
aGuard
;
#if defined(UNX) && !defined(MACOSX) && !defined(ENABLE_HEADLESS)
ImplSVData
*
pSVData
=
ImplGetSVData
();
SvpSalInstance
*
pSalInstance
=
static_cast
<
SvpSalInstance
*
>
(
pSVData
->
mpDefInst
);
pSalInstance
->
setBitCountFormatMapping
(
32
,
::
basebmp
::
FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA
);
ImplSVData
*
pSVData
=
ImplGetSVData
();
SvpSalInstance
*
pSalInstance
=
static_cast
<
SvpSalInstance
*
>
(
pSVData
->
mpDefInst
);
pSalInstance
->
setBitCountFormatMapping
(
32
,
::
basebmp
::
FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA
);
VirtualDevice
aDevice
(
0
,
(
sal_uInt16
)
32
);
boost
::
shared_array
<
sal_uInt8
>
aBuffer
(
pBuffer
,
NoDelete
<
sal_uInt8
>
()
);
aDevice
.
SetOutputSizePixelScaleOffsetAndBuffer
(
Size
(
nCanvasWidth
,
nCanvasHeight
),
Fraction
(
1.0
),
Point
(),
aBuffer
,
true
);
VirtualDevice
aDevice
(
0
,
(
sal_uInt16
)
32
);
boost
::
shared_array
<
sal_uInt8
>
aBuffer
(
pBuffer
,
NoDelete
<
sal_uInt8
>
()
);
aDevice
.
SetOutputSizePixelScaleOffsetAndBuffer
(
Size
(
nCanvasWidth
,
nCanvasHeight
),
Fraction
(
1.0
),
Point
(),
aBuffer
,
true
);
pDoc
->
paintTile
(
aDevice
,
nCanvasWidth
,
nCanvasHeight
,
nTilePosX
,
nTilePosY
,
nTileWidth
,
nTileHeight
);
pDoc
->
paintTile
(
aDevice
,
nCanvasWidth
,
nCanvasHeight
,
nTilePosX
,
nTilePosY
,
nTileWidth
,
nTileHeight
);
SvpSalVirtualDevice
*
pSalDev
=
static_cast
<
SvpSalVirtualDevice
*
>
(
aDevice
.
getSalVirtualDevice
());
basebmp
::
BitmapDeviceSharedPtr
pBmpDev
=
pSalDev
->
getBitmapDevice
();
SvpSalVirtualDevice
*
pSalDev
=
static_cast
<
SvpSalVirtualDevice
*
>
(
aDevice
.
getSalVirtualDevice
());
basebmp
::
BitmapDeviceSharedPtr
pBmpDev
=
pSalDev
->
getBitmapDevice
();
*
pRowStride
=
pBmpDev
->
getScanlineStride
();
*
pRowStride
=
pBmpDev
->
getScanlineStride
();
#else
(
void
)
pBuffer
;
(
void
)
nCanvasWidth
;
(
void
)
nCanvasHeight
;
(
void
)
pRowStride
;
(
void
)
nTilePosX
;
(
void
)
nTilePosY
;
(
void
)
nTileWidth
;
(
void
)
nTileHeight
;
(
void
)
pBuffer
;
(
void
)
nCanvasWidth
;
(
void
)
nCanvasHeight
;
(
void
)
pRowStride
;
(
void
)
nTilePosX
;
(
void
)
nTilePosY
;
(
void
)
nTileWidth
;
(
void
)
nTileHeight
;
#endif
}
Application
::
ReleaseSolarMutex
();
}
static
void
doc_getDocumentSize
(
LibreOfficeKitDocument
*
pThis
,
...
...
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