diff --git a/binding/Binding/GRGlInterface.cs b/binding/Binding/GRGlInterface.cs index f4b645e19c..b946659832 100644 --- a/binding/Binding/GRGlInterface.cs +++ b/binding/Binding/GRGlInterface.cs @@ -84,13 +84,10 @@ public static GRGlInterface CreateWebGl (GRGlGetProcedureAddressDelegate get) } } - public static GRGlInterface CreateEvas (IntPtr evas) => - CreateEvas (evas, IntPtr.Zero); - - public static GRGlInterface CreateEvas (IntPtr evas, IntPtr evasGlContext) + public static GRGlInterface CreateEvas (IntPtr evas) { #if __TIZEN__ - var evasLoader = new EvasGlLoader (evas, evasGlContext); + var evasLoader = new EvasGlLoader (evas); return CreateGles (name => evasLoader.GetFunctionPointer (name)); #else return null; @@ -241,21 +238,25 @@ public static IntPtr GetProc (string name) #if __TIZEN__ private class EvasGlLoader { + private const string libevas = "libevas.so.1"; + private static readonly Type IntPtrType; private static readonly Type EvasGlApiType; private static readonly FieldInfo[] apiFields; private readonly IntPtr glEvas; - private readonly IntPtr glContext; private readonly EvasGlApi api; - [DllImport ("libevas.so.1")] + [DllImport (libevas)] internal static extern IntPtr evas_gl_api_get (IntPtr evas_gl); - [DllImport ("libevas.so.1")] + [DllImport (libevas)] internal static extern IntPtr evas_gl_context_api_get (IntPtr evas_gl, IntPtr ctx); - [DllImport ("libevas.so.1")] + [DllImport (libevas)] + internal static extern IntPtr evas_gl_current_context_get (IntPtr evas_gl); + + [DllImport (libevas)] internal static extern IntPtr evas_gl_proc_address_get (IntPtr evas_gl, string name); static EvasGlLoader () @@ -266,14 +267,9 @@ static EvasGlLoader () } public EvasGlLoader (IntPtr evas) - : this (evas, IntPtr.Zero) - { - } - - public EvasGlLoader (IntPtr evas, IntPtr evasGlContext) { glEvas = evas; - glContext = evasGlContext; + var glContext = evas_gl_current_context_get (glEvas); var apiPtr = glContext != IntPtr.Zero ? evas_gl_context_api_get (glEvas, glContext) diff --git a/samples/Basic/Tizen/SkiaSharpSample/tizen-manifest.xml b/samples/Basic/Tizen/SkiaSharpSample/tizen-manifest.xml index 9a28258296..b8bf0defb3 100644 --- a/samples/Basic/Tizen/SkiaSharpSample/tizen-manifest.xml +++ b/samples/Basic/Tizen/SkiaSharpSample/tizen-manifest.xml @@ -2,7 +2,7 @@ - + SkiaSharpSample.png diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Tizen/SKGLSurfaceView.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Tizen/SKGLSurfaceView.cs index fbbfc1b079..c420b68652 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Tizen/SKGLSurfaceView.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Tizen/SKGLSurfaceView.cs @@ -154,7 +154,7 @@ protected sealed override void CreateDrawingSurface() Gles.glViewport(0, 0, surfaceSize.Width, surfaceSize.Height); // create the interface using the function pointers provided by the EFL - var glInterface = GRGlInterface.CreateEvas(glEvas, glContext); + var glInterface = GRGlInterface.CreateEvas(glEvas); if (glInterface == null) Log.Error("SKGLSurfaceView", "Unable to create GRGlInterface."); if (!glInterface.Validate())