]> O.S.I.I.S - jp/vkvg.git/commitdiff
wip
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 13 Dec 2023 09:17:21 +0000 (10:17 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 13 Dec 2023 09:17:21 +0000 (10:17 +0100)
src/vkvg_context.c
src/vkvg_context_internal.c
src/vkvg_device.c

index deee2d0c816e04d7b99e3bd3642ab8d593eb5184..cfbabe8cb9125916cec9078b0168af33638b8cd7 100644 (file)
@@ -1,24 +1,6 @@
-/*
- * Copyright (c) 2018-2020 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
- * Software, and to permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
+// Copyright (c) 2018-2024 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
 #include "vkvg_device_internal.h"
 #include "vkvg_context_internal.h"
index 1ee302802317cc03714a82e1e51d31a577e0e8d5..b6a9068f76c6b7bfc565867eee9a800226eaf677 100644 (file)
@@ -1859,7 +1859,8 @@ void _fill_non_zero (VkvgContext ctx){
 
                if (pathPointCount > 2) {
                        VKVG_IBO_INDEX_TYPE firstVertIdx = (VKVG_IBO_INDEX_TYPE)(ctx->vertCount - ctx->curVertOffset);
-                       ear_clip_point* ecps = (ear_clip_point*)malloc(pathPointCount*sizeof(ear_clip_point));
+            //ear_clip_point* ecps = (ear_clip_point*)malloc(pathPointCount*sizeof(ear_clip_point));
+            ear_clip_point ecps[pathPointCount];
                        uint32_t ecps_count = pathPointCount;
                        VKVG_IBO_INDEX_TYPE i = 0;
 
@@ -1912,7 +1913,6 @@ void _fill_non_zero (VkvgContext ctx){
                        }
                        if (ecps_count == 3)
                                _add_triangle_indices(ctx, ecp_current->next->idx, ecp_current->idx, ecp_current->next->next->idx);
-                       free (ecps);
 
                        //limit batch size here to 1/3 of the ibo index type ability
                        if (ctx->vertCount - ctx->curVertOffset > VKVG_IBO_MAX / 3)
index 7783fb5fac76c6c875ac0e16064ac87bb7968eda..893d23efff336e066328a36f7e8ad4853e07641a 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 #include "vkvg_device_internal.h"
-#include "vkvg_surface_internal.h"
 #include "vkvg_context_internal.h"
 #include "vkh_queue.h"
 #include "vkh_phyinfo.h"