-
|
我是使用最新的提交后运行发现一个bug 然后我对比了更新前后的代码,发现新的代码去掉了一些 std::shared_ptr<Surface> EAGLWindow::onCreateSurface(Context* context) {
if (layerTexture != nullptr) {
layerTexture->release(context->gpu());
layerTexture = nullptr;
}
layerTexture = EAGLLayerTexture::MakeFrom(static_cast<GLGPU*>(context->gpu()), layer);
if (layerTexture == nullptr) {
return nullptr;
}
BackendRenderTarget renderTarget = layerTexture->getBackendRenderTarget();
return Surface::MakeFrom(context, renderTarget, ImageOrigin::BottomLeft);
}最新提交 std::shared_ptr<Surface> EAGLWindow::onCreateSurface(Context* context) {
if (layerTexture != nullptr) {
// 调试发现加上这个就正常了
layerTexture->onReleaseTexture(static_cast<GLGPU*>(context->gpu()));
layerTexture = nullptr;
}
layerTexture = EAGLLayerTexture::MakeFrom(static_cast<GLGPU*>(context->gpu()), layer);
if (layerTexture == nullptr) {
return nullptr;
}
BackendRenderTarget renderTarget = layerTexture->getBackendRenderTarget();
return Surface::MakeFrom(context, renderTarget, ImageOrigin::BottomLeft);
}目前我还不具备修复这类bug,所以我只能调试定位到原因后,反馈给您们 |
Beta Was this translation helpful? Give feedback.
Answered by
domchen
Nov 12, 2025
Replies: 2 comments 1 reply
-
|
看起来是这里的FrameBuffer不允许多重绑定,layerTexture现在设置为nullptr之后又是延迟释放的。我们来修复一下这个问题。感谢反馈~ |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
domchen
-
|
已在 #1039 中修复。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
看起来是这里的FrameBuffer不允许多重绑定,layerTexture现在设置为nullptr之后又是延迟释放的。我们来修复一下这个问题。感谢反馈~