mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 15:11:51 +00:00
!9287 修复SetWptrNativeWindowToPSurface用例失败问题
Merge pull request !9287 from 刘瓒/producer
This commit is contained in:
commit
3ff0cb50ba
@ -529,9 +529,12 @@ NativeWindow::NativeWindow() : NativeWindowMagic(NATIVE_OBJECT_MAGIC_WINDOW), su
|
||||
|
||||
NativeWindow::~NativeWindow()
|
||||
{
|
||||
auto utils = SurfaceUtils::GetInstance();
|
||||
utils->Remove(surface->GetUniqueId());
|
||||
utils->RemoveNativeWindow(surface->GetUniqueId());
|
||||
if (surface != nullptr) {
|
||||
auto utils = SurfaceUtils::GetInstance();
|
||||
utils->Remove(surface->GetUniqueId());
|
||||
utils->RemoveNativeWindow(surface->GetUniqueId());
|
||||
}
|
||||
|
||||
for (auto &[seqNum, buffer] : bufferCache_) {
|
||||
NativeObjectUnreference(buffer);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user