fix video export texture fullscreen

Signed-off-by: sunbees <sunqinjia@huawei.com>
This commit is contained in:
sunbees 2024-09-26 15:58:35 +08:00
parent 2ea9df1dcc
commit dce579281b
2 changed files with 17 additions and 0 deletions

View File

@ -1110,9 +1110,23 @@ void VideoPattern::OnRebuildFrame()
auto column = AceType::DynamicCast<FrameNode>(video->GetMediaColumn());
CHECK_NULL_VOID(column);
auto renderContext = column->GetRenderContext();
CHECK_NULL_VOID(renderContext);
renderContext->AddChild(renderContextForMediaPlayer_, 0);
}
void VideoPattern::RemoveMediaPlayerSurfaceNode()
{
auto host = GetHost();
CHECK_NULL_VOID(host);
auto video = AceType::DynamicCast<VideoNode>(host);
CHECK_NULL_VOID(video);
auto column = AceType::DynamicCast<FrameNode>(video->GetMediaColumn());
CHECK_NULL_VOID(column);
auto renderContext = column->GetRenderContext();
CHECK_NULL_VOID(renderContext);
renderContext->RemoveChild(renderContextForMediaPlayer_);
}
bool VideoPattern::OnDirtyLayoutWrapperSwap(const RefPtr<LayoutWrapper>& dirty, const DirtySwapConfig& config)
{
if (config.skipMeasure || dirty->SkipMeasureContent()) {

View File

@ -203,9 +203,12 @@ public:
{
mediaPlayer_.Reset();
renderSurface_.Reset();
RemoveMediaPlayerSurfaceNode();
renderContextForMediaPlayer_.Reset();
}
void RemoveMediaPlayerSurfaceNode();
void OnFullScreenChange(bool isFullScreen);
void RecoverState(const RefPtr<VideoPattern>& videoPattern);