-
-
Notifications
You must be signed in to change notification settings - Fork 499
Fix #4029: Expire vector display instances after SVG destruction #4041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
8a11b3c
mbedTLS fix for cURL 8.8.0
Lpsd 181bf0f
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 6728cbe
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 0b989ac
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 9c19509
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 75c36ed
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 96dd1ee
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd f9eaf3f
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 54bd11b
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd ddee2d0
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 288b8db
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd b30a4a2
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 27b9eae
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 3731d81
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd b50a68c
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 58ae23f
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 20f1d27
Allow display manager to cleanup expired instances
Lpsd 90bc1dd
Adjust expiration (only after svg destroyed)
Lpsd f3645b8
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 489eb7b
Merge branch 'master' into svg-ptr-fix
Lpsd df9d47d
Use shared_ptr
Lpsd e62d9f4
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd 812ec31
Merge branch 'master' into svg-ptr-fix
Lpsd e95ca0e
Implement shared_ptr and weak_ptr references for CClientDisplay(Manager)
Lpsd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,8 +17,7 @@ CClientVectorGraphic::CClientVectorGraphic(CClientManager* pManager, ElementID I | |
| SetTypeName("svg"); | ||
|
|
||
| m_pManager = pManager; | ||
|
|
||
| m_pVectorGraphicDisplay = std::make_unique<CClientVectorGraphicDisplay>(m_pManager->GetDisplayManager(), this); | ||
| m_pVectorGraphicDisplay = m_pManager->GetDisplayManager()->CreateVectorGraphicDisplay(this); | ||
|
|
||
| // Generate the default XML document | ||
| SString defaultXmlString = SString("<svg viewBox='0 0 %u %u'></svg>", pVectorGraphicItem->m_uiSizeX, pVectorGraphicItem->m_uiSizeY); | ||
|
|
@@ -46,7 +45,7 @@ bool CClientVectorGraphic::LoadFromString(std::string strData) | |
|
|
||
| bool CClientVectorGraphic::SetDocument(CXMLNode* node) | ||
| { | ||
| if (!node || !node->IsValid()) | ||
| if (!m_pVectorGraphicDisplay || !node || !node->IsValid()) | ||
| return false; | ||
|
|
||
| if (m_pXMLString && m_pXMLString->node != node) | ||
|
|
@@ -80,11 +79,14 @@ bool CClientVectorGraphic::RemoveUpdateCallback() | |
|
|
||
| void CClientVectorGraphic::OnUpdate() | ||
| { | ||
| if (!m_pVectorGraphicDisplay) | ||
TheNormalnij marked this conversation as resolved.
Show resolved
Hide resolved
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this situation possible? |
||
| return; | ||
|
|
||
| m_pVectorGraphicDisplay->UpdateTexture(); | ||
|
|
||
| if (std::holds_alternative<CLuaFunctionRef>(m_updateCallbackRef)) | ||
| { | ||
| auto func = std::get<CLuaFunctionRef>(m_updateCallbackRef); | ||
| auto& func = std::get<CLuaFunctionRef>(m_updateCallbackRef); | ||
| auto state = func.GetLuaVM(); | ||
|
|
||
| if (VERIFY_FUNCTION(func) && state != NULL) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.