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
9557ae7b
Kaydet (Commit)
9557ae7b
authored
Kas 20, 2014
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: update the OpenGLContext's pixmap when re-sizing a VirtualDevice.
Change-Id: Iee8089fc3bfbea60adee95dfb2c229f3efea28f8
üst
f12e8ff5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
2 deletions
+29
-2
OpenGLContext.hxx
include/vcl/opengl/OpenGLContext.hxx
+2
-0
gdiimpl.cxx
vcl/opengl/x11/gdiimpl.cxx
+3
-0
OpenGLContext.cxx
vcl/source/opengl/OpenGLContext.cxx
+15
-2
salvd.cxx
vcl/unx/generic/gdi/salvd.cxx
+9
-0
No files found.
include/vcl/opengl/OpenGLContext.hxx
Dosyayı görüntüle @
9557ae7b
...
...
@@ -195,6 +195,8 @@ public:
return
mbInitialized
;
}
void
resetToReInitialize
();
bool
supportMultiSampling
()
const
;
static
SystemWindowData
generateWinData
(
vcl
::
Window
*
pParent
,
bool
bRequestLegacyContext
);
...
...
vcl/opengl/x11/gdiimpl.cxx
Dosyayı görüntüle @
9557ae7b
...
...
@@ -62,6 +62,9 @@ GLfloat X11OpenGLSalGraphicsImpl::GetHeight() const
void
X11OpenGLSalGraphicsImpl
::
Init
()
{
X11WindowProvider
*
pProvider
=
dynamic_cast
<
X11WindowProvider
*>
(
mrParent
.
m_pFrame
);
// Called after eg. a vdev re-size where we need to update the underlying pixmap
maContext
.
resetToReInitialize
();
if
(
pProvider
)
{
Window
aWin
=
pProvider
->
GetX11Window
();
...
...
vcl/source/opengl/OpenGLContext.cxx
Dosyayı görüntüle @
9557ae7b
...
...
@@ -610,6 +610,14 @@ bool OpenGLContext::init(Display* dpy, Window win, int screen)
return
ImplInit
();
}
void
OpenGLContext
::
resetToReInitialize
()
{
if
(
!
mbInitialized
)
return
;
resetCurrent
();
mbInitialized
=
false
;
}
bool
OpenGLContext
::
init
(
Display
*
dpy
,
Pixmap
pix
,
unsigned
int
width
,
unsigned
int
height
,
int
nScreen
)
{
if
(
mbInitialized
)
...
...
@@ -712,7 +720,12 @@ bool OpenGLContext::ImplInit()
SAL_INFO
(
"vcl.opengl"
,
"available GL extensions: "
<<
m_aGLWin
.
GLExtensions
);
XWindowAttributes
xWinAttr
;
if
(
!
XGetWindowAttributes
(
m_aGLWin
.
dpy
,
m_aGLWin
.
win
,
&
xWinAttr
)
)
if
(
mbPixmap
)
{
m_aGLWin
.
Width
=
0
;
// FIXME: correct ?
m_aGLWin
.
Height
=
0
;
}
else
if
(
!
XGetWindowAttributes
(
m_aGLWin
.
dpy
,
m_aGLWin
.
win
,
&
xWinAttr
)
)
{
SAL_WARN
(
"vcl.opengl"
,
"Failed to get window attributes on "
<<
m_aGLWin
.
win
);
m_aGLWin
.
Width
=
0
;
...
...
@@ -1159,7 +1172,7 @@ void OpenGLContext::makeCurrent()
SAL_INFO
(
"vcl.opengl"
,
"OpenGLContext::makeCurrent(): Avoid setting the same context"
);
}
else
if
(
!
glXMakeCurrent
(
m_aGLWin
.
dpy
,
nDrawable
,
m_aGLWin
.
ctx
))
SAL_WARN
(
"vcl.opengl"
,
"OpenGLContext::makeCurrent failed
"
);
SAL_WARN
(
"vcl.opengl"
,
"OpenGLContext::makeCurrent failed
on drawable "
<<
nDrawable
<<
" pixmap? "
<<
mbPixmap
);
#endif
}
...
...
vcl/unx/generic/gdi/salvd.cxx
Dosyayı görüntüle @
9557ae7b
...
...
@@ -196,6 +196,8 @@ SalGraphics* X11SalVirtualDevice::AcquireGraphics()
void
X11SalVirtualDevice
::
ReleaseGraphics
(
SalGraphics
*
)
{
bGraphics_
=
false
;
}
#include "opengl/x11/gdiimpl.hxx"
bool
X11SalVirtualDevice
::
SetSize
(
long
nDX
,
long
nDY
)
{
if
(
bExternPixmap_
)
...
...
@@ -229,8 +231,15 @@ bool X11SalVirtualDevice::SetSize( long nDX, long nDY )
nDY_
=
nDY
;
if
(
pGraphics_
)
{
InitGraphics
(
this
);
// re-initialize OpenGLContext [!] having freed it's underlying pixmap above
X11OpenGLSalGraphicsImpl
*
pImpl
=
dynamic_cast
<
X11OpenGLSalGraphicsImpl
*
>
(
pGraphics_
->
GetImpl
());
if
(
pImpl
)
pImpl
->
Init
();
}
return
true
;
}
...
...
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