Const-ify eglSwapBuffersWithDamage* 'rects' parameter

Fixes #98
diff --git a/api/EGL/eglext.h b/api/EGL/eglext.h
index 53442d3..b9407de 100644
--- a/api/EGL/eglext.h
+++ b/api/EGL/eglext.h
@@ -33,12 +33,12 @@
 ** used to make the header, and the header can be found at
 **   http://www.khronos.org/registry/egl
 **
-** Khronos $Git commit SHA1: 0f3a3945bf $ on $Git commit date: 2019-11-13 13:25:18 +0000 $
+** Khronos $Git commit SHA1: aa9b63f3ab $ on $Git commit date: 2020-01-06 19:36:27 +0000 $
 */
 
 #include <EGL/eglplatform.h>
 
-#define EGL_EGLEXT_VERSION 20191212
+#define EGL_EGLEXT_VERSION 20200220
 
 /* Generated C header for:
  * API: egl
@@ -443,9 +443,9 @@
 
 #ifndef EGL_KHR_swap_buffers_with_damage
 #define EGL_KHR_swap_buffers_with_damage 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
 #ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
 #endif
 #endif /* EGL_KHR_swap_buffers_with_damage */
 
@@ -917,9 +917,9 @@
 
 #ifndef EGL_EXT_swap_buffers_with_damage
 #define EGL_EXT_swap_buffers_with_damage 1
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
 #ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
 #endif
 #endif /* EGL_EXT_swap_buffers_with_damage */
 
diff --git a/api/egl.xml b/api/egl.xml
index 8dca413..f4740d6 100644
--- a/api/egl.xml
+++ b/api/egl.xml
@@ -95,10 +95,10 @@
         <!-- Backwards-compatibility hack: Downstream implementations shipped
              incorrect function pointer names for some years. -->
         <type>typedef void (<apientry/> *<name>EGLDEBUGPROCKHR</name>)(EGLenum error,const char *command,EGLint messageType,EGLLabelKHR threadLabel,EGLLabelKHR objectLabel,const char* message);</type>
-	<type>#define <name>PFNEGLBINDWAYLANDDISPLAYWL</name> PFNEGLBINDWAYLANDDISPLAYWLPROC</type>
-	<type>#define <name>PFNEGLUNBINDWAYLANDDISPLAYWL</name> PFNEGLUNBINDWAYLANDDISPLAYWLPROC</type>
-	<type>#define <name>PFNEGLQUERYWAYLANDBUFFERWL</name> PFNEGLQUERYWAYLANDBUFFERWLPROC</type>
-	<type>#define <name>PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL</name> PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWLPROC</type>
+        <type>#define <name>PFNEGLBINDWAYLANDDISPLAYWL</name> PFNEGLBINDWAYLANDDISPLAYWLPROC</type>
+        <type>#define <name>PFNEGLUNBINDWAYLANDDISPLAYWL</name> PFNEGLUNBINDWAYLANDDISPLAYWLPROC</type>
+        <type>#define <name>PFNEGLQUERYWAYLANDBUFFERWL</name> PFNEGLQUERYWAYLANDBUFFERWLPROC</type>
+        <type>#define <name>PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL</name> PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWLPROC</type>
     </types>
 
     <!-- SECTION: EGL enumerant (token) definitions. -->
@@ -1824,14 +1824,14 @@
             <proto><ptype>EGLBoolean</ptype> <name>eglSwapBuffersWithDamageEXT</name></proto>
             <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
             <param><ptype>EGLSurface</ptype> <name>surface</name></param>
-            <param><ptype>EGLint</ptype> *<name>rects</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>rects</name></param>
             <param><ptype>EGLint</ptype> <name>n_rects</name></param>
         </command>
         <command>
             <proto><ptype>EGLBoolean</ptype> <name>eglSwapBuffersWithDamageKHR</name></proto>
             <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
             <param><ptype>EGLSurface</ptype> <name>surface</name></param>
-            <param><ptype>EGLint</ptype> *<name>rects</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>rects</name></param>
             <param><ptype>EGLint</ptype> <name>n_rects</name></param>
         </command>
         <command>
diff --git a/extensions/EXT/EGL_EXT_swap_buffers_with_damage.txt b/extensions/EXT/EGL_EXT_swap_buffers_with_damage.txt
index 717d1d0..7a1f7fc 100644
--- a/extensions/EXT/EGL_EXT_swap_buffers_with_damage.txt
+++ b/extensions/EXT/EGL_EXT_swap_buffers_with_damage.txt
@@ -29,7 +29,7 @@
 
 Version
 
-    10 - October 23, 2014
+    Version 11, February 20, 2020
 
 Number
 
@@ -59,7 +59,7 @@
     EGLBoolean eglSwapBuffersWithDamageEXT (
         EGLDisplay dpy,
         EGLSurface surface,
-        EGLint *rects,
+        const EGLint *rects,
         EGLint n_rects);
 
 New Tokens
@@ -76,7 +76,7 @@
         EGLBoolean eglSwapBuffersWithDamageEXT (
             EGLDisplay dpy,
             EGLSurface surface,
-            EGLint *rects,
+            const EGLint *rects,
             EGLint n_rects);
 
         to do the same thing as eglSwapBuffers but additionally report
@@ -103,7 +103,7 @@
 
     Modify the first paragraph of Section 3.9.1 titled "Native Window
     Resizing"
-    
+
         "If the native window corresponding to <surface> has been
         resized prior to the swap, <surface> must be resized to match.
         <surface> will normally be resized by the EGL implementation
@@ -252,7 +252,7 @@
     awkward issue to provide guarantees for we can consider X11 based
     platforms where native windows can be resized asynchronously with
     respect to a client side EGL surface:
-    
+
     With X11 there may be multiple "gravity" transformations that can
     affect how surface buffer content is positioned with respect to a
     new native window size; there is the core X "bit gravity" and
@@ -271,7 +271,7 @@
     result in a temporary artefact until the full window gets redrawn
     and then re-composed. X11 already suffers other similar transient
     artefacts when resizing windows.
-    
+
     The authors of this spec believe that even if a driver can't do
     reliable mappings of EGL damage rectangles then compositors would
     be able mitigate the majority of related artefacts by ignoring
@@ -295,7 +295,7 @@
       3) Within the X server the driver component should use the same
       gravity transform that was used to present the surface content
       to also transform the EGL damage rectangle coordinates.
-      
+
       Note that because this transform is done in the xserver then
       this is implicitly synchronized with all clients that would
       otherwise be able to enact an asynchronous window resize.
@@ -339,3 +339,5 @@
         knonw IP claims.
     Version 10, 23/10/2014, Jon Leech
       - Remove copyright after signoff from Intel.
+    Version 11, 20/02/2020, Jon Leech
+      - Constify rects parameter (EGL-Registry issue 98).
diff --git a/extensions/KHR/EGL_KHR_swap_buffers_with_damage.txt b/extensions/KHR/EGL_KHR_swap_buffers_with_damage.txt
index 28565ff..310dc39 100644
--- a/extensions/KHR/EGL_KHR_swap_buffers_with_damage.txt
+++ b/extensions/KHR/EGL_KHR_swap_buffers_with_damage.txt
@@ -37,7 +37,7 @@
 
 Version
 
-    Version 12, November 5, 2014
+    Version 13, February 20, 2020
 
 Number
 
@@ -160,7 +160,7 @@
     EGLBoolean eglSwapBuffersWithDamageKHR (
         EGLDisplay dpy,
         EGLSurface surface,
-        EGLint *rects,
+        const EGLint *rects,
         EGLint n_rects);
 
 New Tokens
@@ -177,7 +177,7 @@
         EGLBoolean eglSwapBuffersWithDamageKHR (
             EGLDisplay dpy,
             EGLSurface surface,
-            EGLint *rects,
+            const EGLint *rects,
             EGLint n_rects);
 
         to do the same thing as eglSwapBuffers but additionally report
@@ -204,7 +204,7 @@
 
     Modify the first paragraph of Section 3.9.1 titled "Native Window
     Resizing"
-    
+
         "If the native window corresponding to <surface> has been
         resized prior to the swap, <surface> must be resized to match.
         <surface> will normally be resized by the EGL implementation
@@ -353,7 +353,7 @@
     awkward issue to provide guarantees for we can consider X11 based
     platforms where native windows can be resized asynchronously with
     respect to a client side EGL surface:
-    
+
     With X11 there may be multiple "gravity" transformations that can
     affect how surface buffer content is positioned with respect to a
     new native window size; there is the core X "bit gravity" and
@@ -372,7 +372,7 @@
     result in a temporary artefact until the full window gets redrawn
     and then re-composed. X11 already suffers other similar transient
     artefacts when resizing windows.
-    
+
     The authors of this spec believe that even if a driver can't do
     reliable mappings of EGL damage rectangles then compositors would
     be able mitigate the majority of related artefacts by ignoring
@@ -396,7 +396,7 @@
       3) Within the X server the driver component should use the same
       gravity transform that was used to present the surface content
       to also transform the EGL damage rectangle coordinates.
-      
+
       Note that because this transform is done in the xserver then
       this is implicitly synchronized with all clients that would
       otherwise be able to enact an asynchronous window resize.
@@ -445,3 +445,5 @@
       - Marked as display extension
     Version 12, 11/05/2014
       - Change copyright to Khronos after signoff from Intel.
+    Version 13, 20/02/2020, Jon Leech
+      - Constify rects parameter (EGL-Registry issue 98).