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

Obsolete OpenGLView #9660

Merged
merged 3 commits into from
Aug 27, 2022
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[assembly: Dependency(typeof(RegistrarValidationService))]
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.WinUI
{
[System.Obsolete]
public class RegistrarValidationService : IRegistrarValidationService
{
public bool Validate(VisualElement element, out string message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@

namespace Microsoft.Maui.Controls.Compatibility.Platform.Android
{
//public class OpenGLViewRenderer : ViewRenderer<OpenGLView, GLSurfaceView>
#pragma warning disable CS0618 // Type or member is obsolete
[Obsolete]
internal class OpenGLViewRenderer : ViewRenderer<OpenGLView, GLSurfaceView>
#pragma warning restore CS0618 // Type or member is obsolete
{
bool _disposed;

Expand Down
2 changes: 2 additions & 0 deletions src/Compatibility/Core/src/AppHostBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ public static MauiAppBuilder UseMauiCompatibility(this MauiAppBuilder builder)

#if !WINDOWS
#if !(MACCATALYST || MACOS)
#pragma warning disable CS0618 // Type or member is obsolete
#pragma warning disable CS0612 // Type or member is obsolete
handlers.TryAddCompatibilityRenderer(typeof(OpenGLView), typeof(OpenGLViewRenderer));
#pragma warning restore CS0612 // Type or member is obsolete
#pragma warning restore CS0618 // Type or member is obsolete
#endif
#else
#pragma warning disable CS0618 // Type or member is obsolete
Expand Down
1 change: 1 addition & 0 deletions src/Controls/src/Core/OpenGLView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Microsoft.Maui.Controls
{
/// <include file="../../docs/Microsoft.Maui.Controls/OpenGLView.xml" path="Type[@FullName='Microsoft.Maui.Controls.OpenGLView']/Docs" />
[Obsolete("OpenGLView is obsolete as of .NET 7. To enable this view you will need to call `builder.UseMauiCompatibility` but it is currently untested and unsupported.")]
public sealed class OpenGLView : View, IOpenGlViewController, IElementConfiguration<OpenGLView>
{
#region Statics
Expand Down