Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
426
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
3529e880
Commit
3529e880
authored
9 months ago
by
Fatih Uzunoğlu
Committed by
Jean-Baptiste Kempf
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
qt: decouple scene graph and CompositorDirectComposition
parent
31923d31
No related branches found
No related tags found
Loading
Pipeline
#467160
passed with warnings with stage
in 43 minutes and 18 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/gui/qt/maininterface/compositor_dcomp.cpp
+26
-10
26 additions, 10 deletions
modules/gui/qt/maininterface/compositor_dcomp.cpp
modules/gui/qt/maininterface/compositor_dcomp.hpp
+2
-0
2 additions, 0 deletions
modules/gui/qt/maininterface/compositor_dcomp.hpp
with
28 additions
and
10 deletions
modules/gui/qt/maininterface/compositor_dcomp.cpp
+
26
−
10
View file @
3529e880
...
...
@@ -231,17 +231,9 @@ bool CompositorDirectComposition::makeMainInterface(MainCtx* mainCtx)
&
QQuickWindow
::
frameSwapped
,
// At this stage, we can be sure that QRhi and QRhiSwapChain are valid.
this
,
&
CompositorDirectComposition
::
setup
,
static_cast
<
Qt
::
ConnectionType
>
(
Qt
::
SingleShotConnection
|
Qt
::
DirectConnection
)
);
Qt
::
SingleShotConnection
);
connect
(
quickViewPtr
,
&
QQuickWindow
::
sceneGraphInvalidated
,
this
,
[
this
]()
{
m_videoVisual
.
Reset
();
delete
m_acrylicSurface
.
data
();
m_rootVisual
.
Reset
();
},
Qt
::
DirectConnection
);
m_quickView
->
installEventFilter
(
this
);
bool
appropriateGraphicsApi
=
true
;
...
...
@@ -391,4 +383,28 @@ QQuickItem * CompositorDirectComposition::activeFocusItem() const /* override */
return
m_quickView
->
activeFocusItem
();
}
bool
CompositorDirectComposition
::
eventFilter
(
QObject
*
watched
,
QEvent
*
event
)
{
switch
(
event
->
type
())
{
case
QEvent
::
PlatformSurface
:
if
(
watched
==
m_quickView
.
get
()
&&
static_cast
<
QPlatformSurfaceEvent
*>
(
event
)
->
surfaceEventType
()
==
QPlatformSurfaceEvent
::
SurfaceAboutToBeDestroyed
)
{
m_videoVisual
.
Reset
();
delete
m_acrylicSurface
.
data
();
// Just in case root visual deletes its children
// when it is deleted: (Qt's UI visual should be
// deleted by Qt itself)
m_rootVisual
->
RemoveVisual
(
m_uiVisual
);
m_rootVisual
.
Reset
();
}
break
;
default
:
break
;
}
return
QObject
::
eventFilter
(
watched
,
event
);
}
}
This diff is collapsed.
Click to expand it.
modules/gui/qt/maininterface/compositor_dcomp.hpp
+
2
−
0
View file @
3529e880
...
...
@@ -65,6 +65,8 @@ public:
QQuickItem
*
activeFocusItem
()
const
override
;
bool
eventFilter
(
QObject
*
watched
,
QEvent
*
event
)
override
;
private
slots
:
void
onSurfacePositionChanged
(
const
QPointF
&
position
)
override
;
void
onSurfaceSizeChanged
(
const
QSizeF
&
size
)
override
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment