aboutsummaryrefslogtreecommitdiffstatsci
path: root/testDrm/src/Egl
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2017-05-19 21:33:37 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2017-05-19 21:33:37 +0200
commit37570a2ebed6dfa7ebabc665c688af14b55a894a (patch)
tree671a2f5272f57fe3ad02f55721221264f818d191 /testDrm/src/Egl
parente6482e0efc568749f15dd12b91c56150a83a1172 (diff)
CrowMonitor tread loggertestDrmDebugTreading
Diffstat (limited to 'testDrm/src/Egl')
-rw-r--r--testDrm/src/Egl/Context.cs3
-rw-r--r--testDrm/src/Egl/Surface.cs25
2 files changed, 16 insertions, 12 deletions
diff --git a/testDrm/src/Egl/Context.cs b/testDrm/src/Egl/Context.cs
index 122f2e72..b8efecc8 100644
--- a/testDrm/src/Egl/Context.cs
+++ b/testDrm/src/Egl/Context.cs
@@ -290,9 +290,6 @@ namespace EGL
[DllImportAttribute("libEGL.dll", EntryPoint = "eglWaitNative")]
[return: MarshalAsAttribute(UnmanagedType.I1)]
public static extern bool WaitNative(int engine);
- [DllImportAttribute("libEGL.dll", EntryPoint = "eglSwapBuffers")]
- [return: MarshalAsAttribute(UnmanagedType.I1)]
- public static extern bool SwapBuffers(EGLDisplay dpy, EGLSurface surface);
[DllImportAttribute("libEGL.dll", EntryPoint = "eglCopyBuffers")]
[return: MarshalAsAttribute(UnmanagedType.I1)]
public static extern bool CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
diff --git a/testDrm/src/Egl/Surface.cs b/testDrm/src/Egl/Surface.cs
index ccfcaa9c..5a441a56 100644
--- a/testDrm/src/Egl/Surface.cs
+++ b/testDrm/src/Egl/Surface.cs
@@ -41,23 +41,26 @@ namespace EGL
{
#region pinvoke
[DllImportAttribute("libEGL.dll")]
- public static extern EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, IntPtr win, IntPtr attrib_list);
+ internal static extern EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, IntPtr win, IntPtr attrib_list);
[DllImportAttribute("libEGL.dll")]
- public static extern EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, int[] attrib_list);
+ internal static extern EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, int[] attrib_list);
[DllImportAttribute("libEGL.dll")]
- public static extern EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, int[] attrib_list);
+ internal static extern EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, int[] attrib_list);
[DllImportAttribute("libEGL.dll")][return: MarshalAsAttribute(UnmanagedType.I1)]
- public static extern bool eglDestroySurface(EGLDisplay dpy, EGLSurface surface);
+ internal static extern bool eglDestroySurface(EGLDisplay dpy, EGLSurface surface);
[DllImportAttribute("libEGL.dll")][return: MarshalAsAttribute(UnmanagedType.I1)]
- public static extern bool eglQuerySurface(EGLDisplay dpy, EGLSurface surface, int attribute, out int value);
+ internal static extern bool eglQuerySurface(EGLDisplay dpy, EGLSurface surface, int attribute, out int value);
[DllImportAttribute("libEGL.dll")]
- public static extern EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, int buftype, EGLClientBuffer buffer, EGLConfig config, int[] attrib_list);
+ internal static extern EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, int buftype, EGLClientBuffer buffer, EGLConfig config, int[] attrib_list);
[DllImportAttribute("libEGL.dll")][return: MarshalAsAttribute(UnmanagedType.I1)]
- public static extern bool eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, int attribute, int value);
+ internal static extern bool eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, int attribute, int value);
[DllImportAttribute("libEGL.dll")][return: MarshalAsAttribute(UnmanagedType.I1)]
- public static extern bool eglBindTexImage(EGLDisplay dpy, EGLSurface surface, int buffer);
+ internal static extern bool eglBindTexImage(EGLDisplay dpy, EGLSurface surface, int buffer);
[DllImportAttribute("libEGL.dll")][return: MarshalAsAttribute(UnmanagedType.I1)]
- public static extern bool eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, int buffer);
+ internal static extern bool eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, int buffer);
+ [DllImportAttribute("libEGL.dll")][return: MarshalAsAttribute(UnmanagedType.I1)]
+ internal static extern bool eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
+
#endregion
Context ctx;
@@ -75,6 +78,10 @@ namespace EGL
if (!Context.MakeCurrent(ctx.dpy, handle, handle, ctx.ctx))
throw new NotSupportedException(string.Format("eglMakeCurrent on surface Failed: {0}",Context.GetError()));
}
+ public void SwapBuffers () {
+ if (!eglSwapBuffers (ctx.dpy, handle))
+ throw new NotSupportedException(string.Format("eglSwapBuffers Failed: {0}",Context.GetError()));
+ }
#region IDisposable implementation
~Surface(){