Skip to content
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

[NUI] Remove RenderTask itself from the RenderTaskList when disposed #5407

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/Tizen.NUI/src/internal/Common/RenderTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@
return ret;
}

protected override void Dispose(DisposeTypes type)
{
if (Disposed)
{
return;
}

foreach (var window in Application.GetWindowList())
{
window.GetRenderTaskList().RemoveTask(this);

Check warning on line 53 in src/Tizen.NUI/src/internal/Common/RenderTask.cs

View workflow job for this annotation

GitHub Actions / build

Call System.IDisposable.Dispose on object created by 'window.GetRenderTaskList()' before all references to it are out of scope.
}

base.Dispose(type);
}

internal class Property
{
internal static readonly int ViewportPosition = Interop.RenderTask.ViewportPositionGet();
Expand Down Expand Up @@ -71,7 +86,7 @@
}
}

public static bool DEFAULT_EXCLUSIVE

Check warning on line 89 in src/Tizen.NUI/src/internal/Common/RenderTask.cs

View workflow job for this annotation

GitHub Actions / build

Remove the underscores from member name Tizen.NUI.RenderTask.DEFAULT_EXCLUSIVE.
{
get
{
Expand All @@ -81,7 +96,7 @@
}
}

public static bool DEFAULT_INPUT_ENABLED

Check warning on line 99 in src/Tizen.NUI/src/internal/Common/RenderTask.cs

View workflow job for this annotation

GitHub Actions / build

Remove the underscores from member name Tizen.NUI.RenderTask.DEFAULT_INPUT_ENABLED.
{
get
{
Expand All @@ -91,7 +106,7 @@
}
}

public static Vector4 DEFAULT_CLEAR_COLOR

Check warning on line 109 in src/Tizen.NUI/src/internal/Common/RenderTask.cs

View workflow job for this annotation

GitHub Actions / build

Remove the underscores from member name Tizen.NUI.RenderTask.DEFAULT_CLEAR_COLOR.
{
get
{
Expand All @@ -102,7 +117,7 @@
}
}

public static bool DEFAULT_CLEAR_ENABLED

Check warning on line 120 in src/Tizen.NUI/src/internal/Common/RenderTask.cs

View workflow job for this annotation

GitHub Actions / build

Remove the underscores from member name Tizen.NUI.RenderTask.DEFAULT_CLEAR_ENABLED.
{
get
{
Expand All @@ -112,7 +127,7 @@
}
}

public static bool DEFAULT_CULL_MODE

Check warning on line 130 in src/Tizen.NUI/src/internal/Common/RenderTask.cs

View workflow job for this annotation

GitHub Actions / build

Remove the underscores from member name Tizen.NUI.RenderTask.DEFAULT_CULL_MODE.
{
get
{
Expand All @@ -122,7 +137,7 @@
}
}

public static uint DEFAULT_REFRESH_RATE

Check warning on line 140 in src/Tizen.NUI/src/internal/Common/RenderTask.cs

View workflow job for this annotation

GitHub Actions / build

Remove the underscores from member name Tizen.NUI.RenderTask.DEFAULT_REFRESH_RATE.
{
get
{
Expand Down Expand Up @@ -373,8 +388,8 @@
/// <since_tizen> 3 </since_tizen>
public enum RefreshRate
{
REFRESH_ONCE = 0,

Check warning on line 391 in src/Tizen.NUI/src/internal/Common/RenderTask.cs

View workflow job for this annotation

GitHub Actions / build

Remove the underscores from member name Tizen.NUI.RenderTask.RefreshRate.REFRESH_ONCE.
REFRESH_ALWAYS = 1

Check warning on line 392 in src/Tizen.NUI/src/internal/Common/RenderTask.cs

View workflow job for this annotation

GitHub Actions / build

Remove the underscores from member name Tizen.NUI.RenderTask.RefreshRate.REFRESH_ALWAYS.
}

public Vector2 ViewportPosition
Expand Down
Loading