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
5ff40663
Kaydet (Commit)
5ff40663
authored
Kas 28, 2012
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix 3D slide trans. initialization
Change-Id: Iafec5485d0a097f386070370b989d5e77f631d99
üst
ada84dbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
19 deletions
+48
-19
OGLTrans_TransitionerImpl.cxx
.../source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
+48
-19
No files found.
slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
Dosyayı görüntüle @
5ff40663
...
@@ -179,9 +179,10 @@ class OGLTransitionerImpl : private cppu::BaseMutex, private boost::noncopyable,
...
@@ -179,9 +179,10 @@ class OGLTransitionerImpl : private cppu::BaseMutex, private boost::noncopyable,
{
{
public
:
public
:
OGLTransitionerImpl
();
OGLTransitionerImpl
();
void
setSlides
(
const
Reference
<
rendering
::
XBitmap
>&
xLeavingSlide
,
const
uno
::
Reference
<
rendering
::
XBitmap
>&
xEnteringSlide
);
void
setTransition
(
boost
::
shared_ptr
<
OGLTransitionImpl
>
pOGLTransition
);
void
setTransition
(
boost
::
shared_ptr
<
OGLTransitionImpl
>
pOGLTransition
);
bool
initialize
(
const
Reference
<
presentation
::
XSlideShowView
>&
xView
);
bool
initialize
(
const
Reference
<
presentation
::
XSlideShowView
>&
xView
,
const
Reference
<
rendering
::
XBitmap
>&
xLeavingSlide
,
const
Reference
<
rendering
::
XBitmap
>&
xEnteringSlide
);
// XTransition
// XTransition
virtual
void
SAL_CALL
update
(
double
nTime
)
virtual
void
SAL_CALL
update
(
double
nTime
)
...
@@ -218,6 +219,9 @@ protected:
...
@@ -218,6 +219,9 @@ protected:
private
:
private
:
static
void
impl_initializeOnce
(
bool
const
bGLXPresent
);
static
void
impl_initializeOnce
(
bool
const
bGLXPresent
);
void
setSlides
(
const
Reference
<
rendering
::
XBitmap
>&
xLeavingSlide
,
const
uno
::
Reference
<
rendering
::
XBitmap
>&
xEnteringSlide
);
void
impl_prepareSlides
();
void
impl_createTexture
(
bool
useMipmap
,
uno
::
Sequence
<
sal_Int8
>&
data
,
const
OGLFormat
*
pFormat
);
void
impl_createTexture
(
bool
useMipmap
,
uno
::
Sequence
<
sal_Int8
>&
data
,
const
OGLFormat
*
pFormat
);
bool
initWindowFromSlideShowView
(
const
uno
::
Reference
<
presentation
::
XSlideShowView
>&
xView
);
bool
initWindowFromSlideShowView
(
const
uno
::
Reference
<
presentation
::
XSlideShowView
>&
xView
);
...
@@ -225,6 +229,8 @@ private:
...
@@ -225,6 +229,8 @@ private:
*/
*/
void
GLInitSlides
();
void
GLInitSlides
();
void
impl_prepareTransition
();
void
impl_finishTransition
();
/// Holds the information of our new child window
/// Holds the information of our new child window
struct
GLWindow
struct
GLWindow
...
@@ -351,12 +357,15 @@ float OGLTransitionerImpl::cnGLVersion;
...
@@ -351,12 +357,15 @@ float OGLTransitionerImpl::cnGLVersion;
bool
OGLTransitionerImpl
::
cbMesa
;
bool
OGLTransitionerImpl
::
cbMesa
;
bool
OGLTransitionerImpl
::
cbGLXPresent
;
bool
OGLTransitionerImpl
::
cbGLXPresent
;
bool
OGLTransitionerImpl
::
initialize
(
const
Reference
<
presentation
::
XSlideShowView
>&
xView
)
bool
OGLTransitionerImpl
::
initialize
(
const
Reference
<
presentation
::
XSlideShowView
>&
xView
,
const
Reference
<
rendering
::
XBitmap
>&
xLeavingSlide
,
const
Reference
<
rendering
::
XBitmap
>&
xEnteringSlide
)
{
{
bool
const
bGLXPresent
(
initWindowFromSlideShowView
(
xView
)
);
bool
const
bGLXPresent
(
initWindowFromSlideShowView
(
xView
)
);
impl_initializeOnce
(
bGLXPresent
);
impl_initializeOnce
(
bGLXPresent
);
setSlides
(
xLeavingSlide
,
xEnteringSlide
);
return
cbGLXPresent
;
return
cbGLXPresent
;
}
}
...
@@ -749,20 +758,25 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >&
...
@@ -749,20 +758,25 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >&
mxLeavingBitmap
.
set
(
xLeavingSlide
,
UNO_QUERY_THROW
);
mxLeavingBitmap
.
set
(
xLeavingSlide
,
UNO_QUERY_THROW
);
mxEnteringBitmap
.
set
(
xEnteringSlide
,
UNO_QUERY_THROW
);
mxEnteringBitmap
.
set
(
xEnteringSlide
,
UNO_QUERY_THROW
);
Reference
<
XFastPropertySet
>
xLeavingSet
(
xLeavingSlide
,
UNO_QUERY
);
Reference
<
XFastPropertySet
>
xEnteringSet
(
xEnteringSlide
,
UNO_QUERY
);
geometry
::
IntegerRectangle2D
SlideRect
;
SlideSize
=
mxLeavingBitmap
->
getSize
();
SlideSize
=
mxLeavingBitmap
->
getSize
();
SAL_INFO
(
"slideshow.opengl"
,
"leaving bitmap area: "
<<
SlideSize
.
Width
<<
"x"
<<
SlideSize
.
Height
);
SlideSize
=
mxEnteringBitmap
->
getSize
();
SAL_INFO
(
"slideshow.opengl"
,
"entering bitmap area: "
<<
SlideSize
.
Width
<<
"x"
<<
SlideSize
.
Height
);
}
void
OGLTransitionerImpl
::
impl_prepareSlides
()
{
Reference
<
XFastPropertySet
>
xLeavingSet
(
mxLeavingBitmap
,
UNO_QUERY
);
Reference
<
XFastPropertySet
>
xEnteringSet
(
mxEnteringBitmap
,
UNO_QUERY
);
geometry
::
IntegerRectangle2D
SlideRect
;
SlideRect
.
X1
=
0
;
SlideRect
.
X1
=
0
;
SlideRect
.
X2
=
SlideSize
.
Width
;
SlideRect
.
X2
=
SlideSize
.
Width
;
SlideRect
.
Y1
=
0
;
SlideRect
.
Y1
=
0
;
SlideRect
.
Y2
=
SlideSize
.
Height
;
SlideRect
.
Y2
=
SlideSize
.
Height
;
SAL_INFO
(
"slideshow.opengl"
,
"leaving bitmap area: "
<<
SlideSize
.
Width
<<
"x"
<<
SlideSize
.
Height
);
SlideSize
=
mxEnteringBitmap
->
getSize
();
SAL_INFO
(
"slideshow.opengl"
,
"entering bitmap area: "
<<
SlideSize
.
Width
<<
"x"
<<
SlideSize
.
Height
);
#ifdef UNX
#ifdef UNX
unx
::
glXWaitGL
();
unx
::
glXWaitGL
();
XSync
(
GLWin
.
dpy
,
false
);
XSync
(
GLWin
.
dpy
,
false
);
...
@@ -874,14 +888,29 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >&
...
@@ -874,14 +888,29 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >&
#endif
#endif
}
}
void
OGLTransitionerImpl
::
setTransition
(
boost
::
shared_ptr
<
OGLTransitionImpl
>
const
pNewTransition
)
void
OGLTransitionerImpl
::
impl_prepareTransition
(
)
{
{
mpTransition
=
pNewTransition
;
if
(
mpTransition
&&
mpTransition
->
getSettings
().
mnRequiredGLVersion
<=
cnGLVersion
)
if
(
mpTransition
&&
mpTransition
->
getSettings
().
mnRequiredGLVersion
<=
cnGLVersion
)
mpTransition
->
prepare
(
GLleavingSlide
,
GLenteringSlide
);
mpTransition
->
prepare
(
GLleavingSlide
,
GLenteringSlide
);
}
}
void
OGLTransitionerImpl
::
impl_finishTransition
()
{
if
(
mpTransition
&&
mpTransition
->
getSettings
().
mnRequiredGLVersion
<=
cnGLVersion
)
mpTransition
->
finish
();
}
void
OGLTransitionerImpl
::
setTransition
(
boost
::
shared_ptr
<
OGLTransitionImpl
>
const
pTransition
)
{
if
(
mpTransition
)
// already initialized
return
;
mpTransition
=
pTransition
;
impl_prepareSlides
();
impl_prepareTransition
();
}
void
OGLTransitionerImpl
::
createTexture
(
unsigned
int
*
texID
,
void
OGLTransitionerImpl
::
createTexture
(
unsigned
int
*
texID
,
#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
unx
::
GLXPixmap
pixmap
,
unx
::
GLXPixmap
pixmap
,
...
@@ -1570,11 +1599,14 @@ void SAL_CALL OGLTransitionerImpl::viewChanged( const Reference< presentation::X
...
@@ -1570,11 +1599,14 @@ void SAL_CALL OGLTransitionerImpl::viewChanged( const Reference< presentation::X
{
{
SAL_INFO
(
"slideshow.opengl"
,
"transitioner: view changed"
);
SAL_INFO
(
"slideshow.opengl"
,
"transitioner: view changed"
);
impl_finishTransition
();
disposeTextures
();
disposeTextures
();
disposeContextAndWindow
();
disposeContextAndWindow
();
initWindowFromSlideShowView
(
rView
);
initWindowFromSlideShowView
(
rView
);
setSlides
(
rLeavingBitmap
,
rEnteringBitmap
);
setSlides
(
rLeavingBitmap
,
rEnteringBitmap
);
impl_prepareSlides
();
impl_prepareTransition
();
}
}
void
OGLTransitionerImpl
::
disposeContextAndWindow
()
void
OGLTransitionerImpl
::
disposeContextAndWindow
()
...
@@ -1674,11 +1706,9 @@ void OGLTransitionerImpl::disposing()
...
@@ -1674,11 +1706,9 @@ void OGLTransitionerImpl::disposing()
#endif
#endif
if
(
pWindow
)
{
if
(
pWindow
)
{
impl_finishTransition
();
disposeTextures
();
disposeTextures
();
if
(
mpTransition
)
mpTransition
->
finish
();
#ifdef UNX
#ifdef UNX
if
(
mbRestoreSync
)
{
if
(
mbRestoreSync
)
{
// try to reestablish synchronize state
// try to reestablish synchronize state
...
@@ -1781,7 +1811,7 @@ public:
...
@@ -1781,7 +1811,7 @@ public:
return
uno
::
Reference
<
presentation
::
XTransition
>
();
return
uno
::
Reference
<
presentation
::
XTransition
>
();
rtl
::
Reference
<
OGLTransitionerImpl
>
xRes
(
new
OGLTransitionerImpl
()
);
rtl
::
Reference
<
OGLTransitionerImpl
>
xRes
(
new
OGLTransitionerImpl
()
);
if
(
!
xRes
->
initialize
(
view
)
)
if
(
!
xRes
->
initialize
(
view
,
leavingBitmap
,
enteringBitmap
)
)
return
uno
::
Reference
<
presentation
::
XTransition
>
();
return
uno
::
Reference
<
presentation
::
XTransition
>
();
if
(
OGLTransitionerImpl
::
cbMesa
&&
(
if
(
OGLTransitionerImpl
::
cbMesa
&&
(
...
@@ -1852,7 +1882,6 @@ public:
...
@@ -1852,7 +1882,6 @@ public:
return
uno
::
Reference
<
presentation
::
XTransition
>
();
return
uno
::
Reference
<
presentation
::
XTransition
>
();
xRes
->
setTransition
(
pTransition
);
xRes
->
setTransition
(
pTransition
);
xRes
->
setSlides
(
leavingBitmap
,
enteringBitmap
);
return
uno
::
Reference
<
presentation
::
XTransition
>
(
xRes
.
get
());
return
uno
::
Reference
<
presentation
::
XTransition
>
(
xRes
.
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