mirror of https://github.com/axmolengine/axmol.git
Update 3rd libs & emsdk
This commit is contained in:
parent
62eebaa8af
commit
95629d9978
|
@ -11,8 +11,8 @@
|
|||
if ($Global:is_axmol_app -or $Global:is_axmol_engine) {
|
||||
$manifest['nuget'] = '5.5.1' # since 5.6.0, requires .net 4.0
|
||||
$manifest['glslcc'] = '1.9.5+'
|
||||
$manifest['cmake'] = '3.29.3~3.30.2+'
|
||||
$manifest['emsdk'] = '3.1.63+'
|
||||
$manifest['cmake'] = '3.29.3~3.30.3+'
|
||||
$manifest['emsdk'] = '3.1.66~3.1.67+'
|
||||
$manifest['jdk'] = '17.0.10~17.0.12+'
|
||||
$manifest['vs'] = '16.0+'
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
## c-ares
|
||||
- [![Upstream](https://img.shields.io/github/v/release/c-ares/c-ares?label=Upstream)](https://github.com/c-ares/c-ares)
|
||||
- Version: 1.33.0
|
||||
- Version: 1.33.1
|
||||
- License: MIT
|
||||
|
||||
## Chipmunk2D
|
||||
|
@ -47,7 +47,7 @@
|
|||
|
||||
## curl
|
||||
- [![Upstream](https://img.shields.io/github/v/release/curl/curl?label=Upstream)](https://github.com/curl/curl)
|
||||
- Version: 8.9.1
|
||||
- Version: 8.10.1
|
||||
- License: Curl (MIT/X)
|
||||
|
||||
## doctest
|
||||
|
@ -77,7 +77,7 @@
|
|||
|
||||
## Glad
|
||||
- [![Upstream](https://img.shields.io/github/v/tag/Dav1dde/glad?label=Upstream)](https://github.com/Dav1dde/glad)
|
||||
- Version: 2.0.6
|
||||
- Version: 2.0.7
|
||||
- License: MIT
|
||||
|
||||
## glfw
|
||||
|
@ -97,7 +97,7 @@
|
|||
|
||||
## jpeg-turbo
|
||||
- [![Upstream](https://img.shields.io/github/v/release/libjpeg-turbo/libjpeg-turbo?label=Upstream)](https://github.com/libjpeg-turbo/libjpeg-turbo)
|
||||
- Version: 3.0.3
|
||||
- Version: 3.0.4
|
||||
- License: BSD-style (IJG,BSD-3-Clause,zlib)
|
||||
|
||||
## kcp
|
||||
|
@ -123,7 +123,7 @@
|
|||
|
||||
- luajit
|
||||
- Upstream: https://github.com/LuaJIT/LuaJIT
|
||||
- Version: 2.1-04dca79
|
||||
- Version: 2.1-87ae18a
|
||||
- License: MIT
|
||||
|
||||
- tolua
|
||||
|
@ -179,12 +179,12 @@
|
|||
|
||||
## OpenSSL
|
||||
- [![Upstream](https://img.shields.io/github/v/tag/openssl/openssl?label=Upstream)](https://github.com/openssl/openssl)
|
||||
- Version: 3.3.1
|
||||
- Version: 3.0.15
|
||||
- License: Apache-2.0
|
||||
|
||||
## png
|
||||
- [![Upstream](https://img.shields.io/github/v/tag/glennrp/libpng?label=Upstream)](https://github.com/glennrp/libpng)
|
||||
- Version: 1.6.43
|
||||
- Version: 1.6.44
|
||||
- License: PNG Reference Library License version 2
|
||||
|
||||
## poly2tri
|
||||
|
@ -201,7 +201,7 @@
|
|||
|
||||
## rapidjson
|
||||
- [![Upstream](https://img.shields.io/github/v/tag/Tencent/rapidjson?label=Upstream)](https://github.com/Tencent/rapidjson)
|
||||
- Version: 1.1.0-b4a6da3
|
||||
- Version: 1.1.0-815e6e7 (until Sep 24, 2024)
|
||||
- License: MIT
|
||||
|
||||
## recast
|
||||
|
@ -218,7 +218,7 @@
|
|||
|
||||
## simdjson
|
||||
- [![Upstream](https://img.shields.io/github/v/tag/simdjson/simdjson?label=Upstream)](https://github.com/simdjson/simdjson)
|
||||
- Version: 3.10.0
|
||||
- Version: 3.10.1
|
||||
- License: Apache-2.0
|
||||
|
||||
## stb (stb_image)
|
||||
|
@ -253,7 +253,7 @@
|
|||
|
||||
## yasio
|
||||
- [![Upstream](https://img.shields.io/github/v/release/yasio/yasio?label=Upstream)](https://github.com/yasio/yasio)
|
||||
- Version: 4.2.4
|
||||
- Version: 4.3.1
|
||||
- License: MIT WITH Anti-996
|
||||
|
||||
## zlib
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -871,6 +871,7 @@ int GLAD_GL_QCOM_texture_foveated_subsampled_layout = 0;
|
|||
int GLAD_GL_QCOM_texture_lod_bias = 0;
|
||||
int GLAD_GL_QCOM_tiled_rendering = 0;
|
||||
int GLAD_GL_QCOM_writeonly_rendering = 0;
|
||||
int GLAD_GL_QCOM_ycbcr_degamma = 0;
|
||||
int GLAD_GL_VIV_shader_binary = 0;
|
||||
|
||||
|
||||
|
@ -10812,6 +10813,7 @@ static int glad_gl_find_extensions_gles2(void) {
|
|||
GLAD_GL_QCOM_texture_lod_bias = glad_gl_has_extension(exts, exts_i, "GL_QCOM_texture_lod_bias");
|
||||
GLAD_GL_QCOM_tiled_rendering = glad_gl_has_extension(exts, exts_i, "GL_QCOM_tiled_rendering");
|
||||
GLAD_GL_QCOM_writeonly_rendering = glad_gl_has_extension(exts, exts_i, "GL_QCOM_writeonly_rendering");
|
||||
GLAD_GL_QCOM_ycbcr_degamma = glad_gl_has_extension(exts, exts_i, "GL_QCOM_ycbcr_degamma");
|
||||
GLAD_GL_VIV_shader_binary = glad_gl_has_extension(exts, exts_i, "GL_VIV_shader_binary");
|
||||
|
||||
glad_gl_free_extensions(exts_i);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
README for libpng version 1.6.43
|
||||
README for libpng version 1.6.44
|
||||
================================
|
||||
|
||||
See the note about version numbers near the top of `png.h`.
|
||||
|
|
|
@ -1,253 +1,61 @@
|
|||
|
||||
/* filter_neon.S - NEON optimised filter functions
|
||||
/* filter_neon.S - placeholder file
|
||||
*
|
||||
* Copyright (c) 2018 Cosmin Truta
|
||||
* Copyright (c) 2014,2017 Glenn Randers-Pehrson
|
||||
* Written by Mans Rullgard, 2011.
|
||||
* Copyright (c) 2024 Cosmin Truta
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
* and license in png.h
|
||||
*/
|
||||
|
||||
/* IMPORTANT NOTE:
|
||||
*
|
||||
* Historically, the hand-coded assembler implementation of Neon optimizations
|
||||
* in this module had not been in sync with the intrinsics-based implementation
|
||||
* in filter_neon_intrinsics.c and palette_neon_intrinsics.c, at least since
|
||||
* the introduction of riffled palette optimizations. Moreover, the assembler
|
||||
* code used to work on 32-bit ARM only, and it caused problems, even if empty,
|
||||
* on 64-bit ARM.
|
||||
*
|
||||
* All references to this module from our internal build scripts and projects
|
||||
* have been removed.
|
||||
*
|
||||
* For the external projects that might still expect this module to be present,
|
||||
* we leave this stub in place, for the remaining lifetime of libpng-1.6.x.
|
||||
* Everything should continue to function normally, as long as there are no
|
||||
* deliberate attempts to use the old hand-made assembler code. A build error
|
||||
* will be raised otherwise.
|
||||
*/
|
||||
|
||||
/* This is required to get the symbol renames, which are #defines, and the
|
||||
* definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION.
|
||||
*/
|
||||
#define PNG_VERSION_INFO_ONLY
|
||||
#include "../pngpriv.h"
|
||||
|
||||
#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__)
|
||||
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
|
||||
/* Assembler NEON support - only works for 32-bit ARM (i.e. it does not work for
|
||||
* ARM64). The code in arm/filter_neon_intrinsics.c supports ARM64, however it
|
||||
* only works if -mfpu=neon is specified on the GCC command line. See pngpriv.h
|
||||
* for the logic which sets PNG_USE_ARM_NEON_ASM:
|
||||
*/
|
||||
#if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */
|
||||
|
||||
#if PNG_ARM_NEON_OPT > 0
|
||||
|
||||
#ifdef __ELF__
|
||||
# define ELF
|
||||
#if defined(__clang__)
|
||||
#define GNUC_VERSION 0 /* not gcc, although it might pretend to be */
|
||||
#elif defined(__GNUC__)
|
||||
#define GNUC_MAJOR (__GNUC__ + 0)
|
||||
#define GNUC_MINOR (__GNUC_MINOR__ + 0)
|
||||
#define GNUC_PATCHLEVEL (__GNUC_PATCHLEVEL__ + 0)
|
||||
#define GNUC_VERSION (GNUC_MAJOR * 10000 + GNUC_MINOR * 100 + GNUC_PATCHLEVEL)
|
||||
#else
|
||||
# define ELF @
|
||||
#define GNUC_VERSION 0 /* not gcc */
|
||||
#endif
|
||||
|
||||
.arch armv7-a
|
||||
.fpu neon
|
||||
#if (GNUC_VERSION > 0) && (GNUC_VERSION < 40300)
|
||||
#error "PNG_ARM_NEON is not supported with gcc versions earlier than 4.3.0"
|
||||
#elif GNUC_VERSION == 40504
|
||||
#error "PNG_ARM_NEON is not supported with gcc version 4.5.4"
|
||||
#else
|
||||
#error "Please use 'arm/*_neon_intrinsics.c' for PNG_ARM_NEON support"
|
||||
#endif
|
||||
|
||||
.macro func name, export=0
|
||||
.macro endfunc
|
||||
ELF .size \name, . - \name
|
||||
.endfunc
|
||||
.purgem endfunc
|
||||
.endm
|
||||
.text
|
||||
|
||||
/* Explicitly specifying alignment here because some versions of
|
||||
* GAS don't align code correctly. This is harmless in correctly
|
||||
* written versions of GAS.
|
||||
*/
|
||||
.align 2
|
||||
|
||||
.if \export
|
||||
.global \name
|
||||
.endif
|
||||
ELF .type \name, STT_FUNC
|
||||
.func \name
|
||||
\name:
|
||||
.endm
|
||||
|
||||
func png_read_filter_row_sub4_neon, export=1
|
||||
ldr r3, [r0, #4] @ rowbytes
|
||||
vmov.i8 d3, #0
|
||||
1:
|
||||
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
||||
vadd.u8 d0, d3, d4
|
||||
vadd.u8 d1, d0, d5
|
||||
vadd.u8 d2, d1, d6
|
||||
vadd.u8 d3, d2, d7
|
||||
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
||||
subs r3, r3, #16
|
||||
bgt 1b
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
func png_read_filter_row_sub3_neon, export=1
|
||||
ldr r3, [r0, #4] @ rowbytes
|
||||
vmov.i8 d3, #0
|
||||
mov r0, r1
|
||||
mov r2, #3
|
||||
mov r12, #12
|
||||
vld1.8 {q11}, [r0], r12
|
||||
1:
|
||||
vext.8 d5, d22, d23, #3
|
||||
vadd.u8 d0, d3, d22
|
||||
vext.8 d6, d22, d23, #6
|
||||
vadd.u8 d1, d0, d5
|
||||
vext.8 d7, d23, d23, #1
|
||||
vld1.8 {q11}, [r0], r12
|
||||
vst1.32 {d0[0]}, [r1,:32], r2
|
||||
vadd.u8 d2, d1, d6
|
||||
vst1.32 {d1[0]}, [r1], r2
|
||||
vadd.u8 d3, d2, d7
|
||||
vst1.32 {d2[0]}, [r1], r2
|
||||
vst1.32 {d3[0]}, [r1], r2
|
||||
subs r3, r3, #12
|
||||
bgt 1b
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
func png_read_filter_row_up_neon, export=1
|
||||
ldr r3, [r0, #4] @ rowbytes
|
||||
1:
|
||||
vld1.8 {q0}, [r1,:128]
|
||||
vld1.8 {q1}, [r2,:128]!
|
||||
vadd.u8 q0, q0, q1
|
||||
vst1.8 {q0}, [r1,:128]!
|
||||
subs r3, r3, #16
|
||||
bgt 1b
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
func png_read_filter_row_avg4_neon, export=1
|
||||
ldr r12, [r0, #4] @ rowbytes
|
||||
vmov.i8 d3, #0
|
||||
1:
|
||||
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
||||
vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]!
|
||||
vhadd.u8 d0, d3, d16
|
||||
vadd.u8 d0, d0, d4
|
||||
vhadd.u8 d1, d0, d17
|
||||
vadd.u8 d1, d1, d5
|
||||
vhadd.u8 d2, d1, d18
|
||||
vadd.u8 d2, d2, d6
|
||||
vhadd.u8 d3, d2, d19
|
||||
vadd.u8 d3, d3, d7
|
||||
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
||||
subs r12, r12, #16
|
||||
bgt 1b
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
func png_read_filter_row_avg3_neon, export=1
|
||||
push {r4,lr}
|
||||
ldr r12, [r0, #4] @ rowbytes
|
||||
vmov.i8 d3, #0
|
||||
mov r0, r1
|
||||
mov r4, #3
|
||||
mov lr, #12
|
||||
vld1.8 {q11}, [r0], lr
|
||||
1:
|
||||
vld1.8 {q10}, [r2], lr
|
||||
vext.8 d5, d22, d23, #3
|
||||
vhadd.u8 d0, d3, d20
|
||||
vext.8 d17, d20, d21, #3
|
||||
vadd.u8 d0, d0, d22
|
||||
vext.8 d6, d22, d23, #6
|
||||
vhadd.u8 d1, d0, d17
|
||||
vext.8 d18, d20, d21, #6
|
||||
vadd.u8 d1, d1, d5
|
||||
vext.8 d7, d23, d23, #1
|
||||
vld1.8 {q11}, [r0], lr
|
||||
vst1.32 {d0[0]}, [r1,:32], r4
|
||||
vhadd.u8 d2, d1, d18
|
||||
vst1.32 {d1[0]}, [r1], r4
|
||||
vext.8 d19, d21, d21, #1
|
||||
vadd.u8 d2, d2, d6
|
||||
vhadd.u8 d3, d2, d19
|
||||
vst1.32 {d2[0]}, [r1], r4
|
||||
vadd.u8 d3, d3, d7
|
||||
vst1.32 {d3[0]}, [r1], r4
|
||||
subs r12, r12, #12
|
||||
bgt 1b
|
||||
|
||||
pop {r4,pc}
|
||||
endfunc
|
||||
|
||||
.macro paeth rx, ra, rb, rc
|
||||
vaddl.u8 q12, \ra, \rb @ a + b
|
||||
vaddl.u8 q15, \rc, \rc @ 2*c
|
||||
vabdl.u8 q13, \rb, \rc @ pa
|
||||
vabdl.u8 q14, \ra, \rc @ pb
|
||||
vabd.u16 q15, q12, q15 @ pc
|
||||
vcle.u16 q12, q13, q14 @ pa <= pb
|
||||
vcle.u16 q13, q13, q15 @ pa <= pc
|
||||
vcle.u16 q14, q14, q15 @ pb <= pc
|
||||
vand q12, q12, q13 @ pa <= pb && pa <= pc
|
||||
vmovn.u16 d28, q14
|
||||
vmovn.u16 \rx, q12
|
||||
vbsl d28, \rb, \rc
|
||||
vbsl \rx, \ra, d28
|
||||
.endm
|
||||
|
||||
func png_read_filter_row_paeth4_neon, export=1
|
||||
ldr r12, [r0, #4] @ rowbytes
|
||||
vmov.i8 d3, #0
|
||||
vmov.i8 d20, #0
|
||||
1:
|
||||
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
||||
vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]!
|
||||
paeth d0, d3, d16, d20
|
||||
vadd.u8 d0, d0, d4
|
||||
paeth d1, d0, d17, d16
|
||||
vadd.u8 d1, d1, d5
|
||||
paeth d2, d1, d18, d17
|
||||
vadd.u8 d2, d2, d6
|
||||
paeth d3, d2, d19, d18
|
||||
vmov d20, d19
|
||||
vadd.u8 d3, d3, d7
|
||||
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
||||
subs r12, r12, #16
|
||||
bgt 1b
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
func png_read_filter_row_paeth3_neon, export=1
|
||||
push {r4,lr}
|
||||
ldr r12, [r0, #4] @ rowbytes
|
||||
vmov.i8 d3, #0
|
||||
vmov.i8 d4, #0
|
||||
mov r0, r1
|
||||
mov r4, #3
|
||||
mov lr, #12
|
||||
vld1.8 {q11}, [r0], lr
|
||||
1:
|
||||
vld1.8 {q10}, [r2], lr
|
||||
paeth d0, d3, d20, d4
|
||||
vext.8 d5, d22, d23, #3
|
||||
vadd.u8 d0, d0, d22
|
||||
vext.8 d17, d20, d21, #3
|
||||
paeth d1, d0, d17, d20
|
||||
vst1.32 {d0[0]}, [r1,:32], r4
|
||||
vext.8 d6, d22, d23, #6
|
||||
vadd.u8 d1, d1, d5
|
||||
vext.8 d18, d20, d21, #6
|
||||
paeth d2, d1, d18, d17
|
||||
vext.8 d7, d23, d23, #1
|
||||
vld1.8 {q11}, [r0], lr
|
||||
vst1.32 {d1[0]}, [r1], r4
|
||||
vadd.u8 d2, d2, d6
|
||||
vext.8 d19, d21, d21, #1
|
||||
paeth d3, d2, d19, d18
|
||||
vst1.32 {d2[0]}, [r1], r4
|
||||
vmov d4, d19
|
||||
vadd.u8 d3, d3, d7
|
||||
vst1.32 {d3[0]}, [r1], r4
|
||||
subs r12, r12, #12
|
||||
bgt 1b
|
||||
|
||||
pop {r4,pc}
|
||||
endfunc
|
||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */
|
||||
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 */
|
||||
#endif /* READ */
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "pngpriv.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43;
|
||||
typedef png_libpng_version_1_6_44 Your_png_h_is_not_version_1_6_44;
|
||||
|
||||
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
||||
* of the PNG file signature. If the PNG data is embedded into another
|
||||
|
@ -794,7 +794,7 @@ png_get_copyright(png_const_structrp png_ptr)
|
|||
return PNG_STRING_COPYRIGHT
|
||||
#else
|
||||
return PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.43" PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.44" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 2018-2024 Cosmin Truta" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
|
||||
PNG_STRING_NEWLINE \
|
||||
|
@ -1203,6 +1203,24 @@ png_colorspace_sync(png_const_structrp png_ptr, png_inforp info_ptr)
|
|||
#endif /* GAMMA */
|
||||
|
||||
#ifdef PNG_COLORSPACE_SUPPORTED
|
||||
static int
|
||||
png_safe_add(png_int_32 *addend0_and_result, png_int_32 addend1,
|
||||
png_int_32 addend2) {
|
||||
/* Safely add three integers. Returns 0 on success, 1 on overlow.
|
||||
* IMPLEMENTATION NOTE: ANSI requires signed overflow not to occur, therefore
|
||||
* relying on addition of two positive values producing a negative one is not
|
||||
* safe.
|
||||
*/
|
||||
int addend0 = *addend0_and_result;
|
||||
if (0x7fffffff - addend0 < addend1)
|
||||
return 1;
|
||||
addend0 += addend1;
|
||||
if (0x7fffffff - addend1 < addend2)
|
||||
return 1;
|
||||
*addend0_and_result = addend0 + addend2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Added at libpng-1.5.5 to support read and write of true CIEXYZ values for
|
||||
* cHRM, as opposed to using chromaticities. These internal APIs return
|
||||
* non-zero on a parameter error. The X, Y and Z values are required to be
|
||||
|
@ -1211,38 +1229,52 @@ png_colorspace_sync(png_const_structrp png_ptr, png_inforp info_ptr)
|
|||
static int
|
||||
png_xy_from_XYZ(png_xy *xy, const png_XYZ *XYZ)
|
||||
{
|
||||
png_int_32 d, dwhite, whiteX, whiteY;
|
||||
png_int_32 d, dred, dgreen, dwhite, whiteX, whiteY;
|
||||
|
||||
d = XYZ->red_X + XYZ->red_Y + XYZ->red_Z;
|
||||
/* 'd' in each of the blocks below is just X+Y+Z for each component,
|
||||
* x, y and z are X,Y,Z/(X+Y+Z).
|
||||
*/
|
||||
d = XYZ->red_X;
|
||||
if (png_safe_add(&d, XYZ->red_Y, XYZ->red_Z))
|
||||
return 1;
|
||||
if (png_muldiv(&xy->redx, XYZ->red_X, PNG_FP_1, d) == 0)
|
||||
return 1;
|
||||
if (png_muldiv(&xy->redy, XYZ->red_Y, PNG_FP_1, d) == 0)
|
||||
return 1;
|
||||
dwhite = d;
|
||||
dred = d;
|
||||
whiteX = XYZ->red_X;
|
||||
whiteY = XYZ->red_Y;
|
||||
|
||||
d = XYZ->green_X + XYZ->green_Y + XYZ->green_Z;
|
||||
d = XYZ->green_X;
|
||||
if (png_safe_add(&d, XYZ->green_Y, XYZ->green_Z))
|
||||
return 1;
|
||||
if (png_muldiv(&xy->greenx, XYZ->green_X, PNG_FP_1, d) == 0)
|
||||
return 1;
|
||||
if (png_muldiv(&xy->greeny, XYZ->green_Y, PNG_FP_1, d) == 0)
|
||||
return 1;
|
||||
dwhite += d;
|
||||
dgreen = d;
|
||||
whiteX += XYZ->green_X;
|
||||
whiteY += XYZ->green_Y;
|
||||
|
||||
d = XYZ->blue_X + XYZ->blue_Y + XYZ->blue_Z;
|
||||
d = XYZ->blue_X;
|
||||
if (png_safe_add(&d, XYZ->blue_Y, XYZ->blue_Z))
|
||||
return 1;
|
||||
if (png_muldiv(&xy->bluex, XYZ->blue_X, PNG_FP_1, d) == 0)
|
||||
return 1;
|
||||
if (png_muldiv(&xy->bluey, XYZ->blue_Y, PNG_FP_1, d) == 0)
|
||||
return 1;
|
||||
dwhite += d;
|
||||
whiteX += XYZ->blue_X;
|
||||
whiteY += XYZ->blue_Y;
|
||||
|
||||
/* The reference white is simply the sum of the end-point (X,Y,Z) vectors,
|
||||
* thus:
|
||||
/* The reference white is simply the sum of the end-point (X,Y,Z) vectors so
|
||||
* the fillowing calculates (X+Y+Z) of the reference white (media white,
|
||||
* encoding white) itself:
|
||||
*/
|
||||
if (png_safe_add(&d, dred, dgreen))
|
||||
return 1;
|
||||
|
||||
dwhite = d;
|
||||
|
||||
if (png_muldiv(&xy->whitex, whiteX, PNG_FP_1, dwhite) == 0)
|
||||
return 1;
|
||||
if (png_muldiv(&xy->whitey, whiteY, PNG_FP_1, dwhite) == 0)
|
||||
|
@ -1257,20 +1289,6 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
|
|||
png_fixed_point red_inverse, green_inverse, blue_scale;
|
||||
png_fixed_point left, right, denominator;
|
||||
|
||||
/* Check xy and, implicitly, z. Note that wide gamut color spaces typically
|
||||
* have end points with 0 tristimulus values (these are impossible end
|
||||
* points, but they are used to cover the possible colors). We check
|
||||
* xy->whitey against 5, not 0, to avoid a possible integer overflow.
|
||||
*/
|
||||
if (xy->redx < 0 || xy->redx > PNG_FP_1) return 1;
|
||||
if (xy->redy < 0 || xy->redy > PNG_FP_1-xy->redx) return 1;
|
||||
if (xy->greenx < 0 || xy->greenx > PNG_FP_1) return 1;
|
||||
if (xy->greeny < 0 || xy->greeny > PNG_FP_1-xy->greenx) return 1;
|
||||
if (xy->bluex < 0 || xy->bluex > PNG_FP_1) return 1;
|
||||
if (xy->bluey < 0 || xy->bluey > PNG_FP_1-xy->bluex) return 1;
|
||||
if (xy->whitex < 0 || xy->whitex > PNG_FP_1) return 1;
|
||||
if (xy->whitey < 5 || xy->whitey > PNG_FP_1-xy->whitex) return 1;
|
||||
|
||||
/* The reverse calculation is more difficult because the original tristimulus
|
||||
* value had 9 independent values (red,green,blue)x(X,Y,Z) however only 8
|
||||
* derived values were recorded in the cHRM chunk;
|
||||
|
@ -1451,16 +1469,16 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
|
|||
* value of 2 indicates an internal error to the caller.
|
||||
*/
|
||||
if (png_muldiv(&left, xy->greenx-xy->bluex, xy->redy - xy->bluey, 7) == 0)
|
||||
return 2;
|
||||
return 1;
|
||||
if (png_muldiv(&right, xy->greeny-xy->bluey, xy->redx - xy->bluex, 7) == 0)
|
||||
return 2;
|
||||
return 1;
|
||||
denominator = left - right;
|
||||
|
||||
/* Now find the red numerator. */
|
||||
if (png_muldiv(&left, xy->greenx-xy->bluex, xy->whitey-xy->bluey, 7) == 0)
|
||||
return 2;
|
||||
return 1;
|
||||
if (png_muldiv(&right, xy->greeny-xy->bluey, xy->whitex-xy->bluex, 7) == 0)
|
||||
return 2;
|
||||
return 1;
|
||||
|
||||
/* Overflow is possible here and it indicates an extreme set of PNG cHRM
|
||||
* chunk values. This calculation actually returns the reciprocal of the
|
||||
|
@ -1473,9 +1491,9 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
|
|||
|
||||
/* Similarly for green_inverse: */
|
||||
if (png_muldiv(&left, xy->redy-xy->bluey, xy->whitex-xy->bluex, 7) == 0)
|
||||
return 2;
|
||||
return 1;
|
||||
if (png_muldiv(&right, xy->redx-xy->bluex, xy->whitey-xy->bluey, 7) == 0)
|
||||
return 2;
|
||||
return 1;
|
||||
if (png_muldiv(&green_inverse, xy->whitey, denominator, left-right) == 0 ||
|
||||
green_inverse <= xy->whitey)
|
||||
return 1;
|
||||
|
@ -1520,25 +1538,14 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
|
|||
static int
|
||||
png_XYZ_normalize(png_XYZ *XYZ)
|
||||
{
|
||||
png_int_32 Y;
|
||||
png_int_32 Y, Ytemp;
|
||||
|
||||
if (XYZ->red_Y < 0 || XYZ->green_Y < 0 || XYZ->blue_Y < 0 ||
|
||||
XYZ->red_X < 0 || XYZ->green_X < 0 || XYZ->blue_X < 0 ||
|
||||
XYZ->red_Z < 0 || XYZ->green_Z < 0 || XYZ->blue_Z < 0)
|
||||
/* Normalize by scaling so the sum of the end-point Y values is PNG_FP_1. */
|
||||
Ytemp = XYZ->red_Y;
|
||||
if (png_safe_add(&Ytemp, XYZ->green_Y, XYZ->blue_Y))
|
||||
return 1;
|
||||
|
||||
/* Normalize by scaling so the sum of the end-point Y values is PNG_FP_1.
|
||||
* IMPLEMENTATION NOTE: ANSI requires signed overflow not to occur, therefore
|
||||
* relying on addition of two positive values producing a negative one is not
|
||||
* safe.
|
||||
*/
|
||||
Y = XYZ->red_Y;
|
||||
if (0x7fffffff - Y < XYZ->green_X)
|
||||
return 1;
|
||||
Y += XYZ->green_Y;
|
||||
if (0x7fffffff - Y < XYZ->blue_X)
|
||||
return 1;
|
||||
Y += XYZ->blue_Y;
|
||||
Y = Ytemp;
|
||||
|
||||
if (Y != PNG_FP_1)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.6.43
|
||||
* libpng version 1.6.44
|
||||
*
|
||||
* Copyright (c) 2018-2024 Cosmin Truta
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
|
@ -15,7 +15,7 @@
|
|||
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
|
||||
* Glenn Randers-Pehrson
|
||||
* libpng versions 1.6.36, December 2018, through 1.6.43, February 2024:
|
||||
* libpng versions 1.6.36, December 2018, through 1.6.44, September 2024:
|
||||
* Cosmin Truta
|
||||
* See also "Contributing Authors", below.
|
||||
*/
|
||||
|
@ -239,7 +239,7 @@
|
|||
* ...
|
||||
* 1.5.30 15 10530 15.so.15.30[.0]
|
||||
* ...
|
||||
* 1.6.43 16 10643 16.so.16.43[.0]
|
||||
* 1.6.44 16 10644 16.so.16.44[.0]
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major and
|
||||
* minor numbers; the shared-library major version number will be used for
|
||||
|
@ -275,7 +275,7 @@
|
|||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.6.43"
|
||||
#define PNG_LIBPNG_VER_STRING "1.6.44"
|
||||
#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"
|
||||
|
||||
/* The versions of shared library builds should stay in sync, going forward */
|
||||
|
@ -286,18 +286,18 @@
|
|||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||
#define PNG_LIBPNG_VER_MAJOR 1
|
||||
#define PNG_LIBPNG_VER_MINOR 6
|
||||
#define PNG_LIBPNG_VER_RELEASE 43
|
||||
#define PNG_LIBPNG_VER_RELEASE 44
|
||||
|
||||
/* This should be zero for a public release, or non-zero for a
|
||||
* development version.
|
||||
*/
|
||||
#define PNG_LIBPNG_VER_BUILD 0
|
||||
#define PNG_LIBPNG_VER_BUILD 0
|
||||
|
||||
/* Release Status */
|
||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||
#define PNG_LIBPNG_BUILD_BETA 2
|
||||
#define PNG_LIBPNG_BUILD_RC 3
|
||||
#define PNG_LIBPNG_BUILD_STABLE 4
|
||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||
#define PNG_LIBPNG_BUILD_BETA 2
|
||||
#define PNG_LIBPNG_BUILD_RC 3
|
||||
#define PNG_LIBPNG_BUILD_STABLE 4
|
||||
#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7
|
||||
|
||||
/* Release-Specific Flags */
|
||||
|
@ -317,7 +317,7 @@
|
|||
* From version 1.0.1 it is:
|
||||
* XXYYZZ, where XX=major, YY=minor, ZZ=release
|
||||
*/
|
||||
#define PNG_LIBPNG_VER 10643 /* 1.6.43 */
|
||||
#define PNG_LIBPNG_VER 10644 /* 1.6.44 */
|
||||
|
||||
/* Library configuration: these options cannot be changed after
|
||||
* the library has been built.
|
||||
|
@ -427,7 +427,7 @@ extern "C" {
|
|||
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||
* do not agree upon the version number.
|
||||
*/
|
||||
typedef char* png_libpng_version_1_6_43;
|
||||
typedef char* png_libpng_version_1_6_44;
|
||||
|
||||
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
|
||||
*
|
||||
|
@ -824,7 +824,7 @@ typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp,
|
|||
* your compiler. This may be very difficult - try using a different compiler
|
||||
* to build the library!
|
||||
*/
|
||||
PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef);
|
||||
PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), (jmp_buf, int), typedef);
|
||||
#endif
|
||||
|
||||
/* Transform masks for the high-level interface */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
/* pngconf.h - machine-configurable file for libpng
|
||||
*
|
||||
* libpng version 1.6.43
|
||||
* libpng version 1.6.44
|
||||
*
|
||||
* Copyright (c) 2018-2024 Cosmin Truta
|
||||
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
|
||||
|
@ -88,7 +88,7 @@
|
|||
|
||||
/* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect
|
||||
* against legacy (pre ISOC90) compilers that did not understand function
|
||||
* prototypes. It is not required for modern C compilers.
|
||||
* prototypes. [Deprecated.]
|
||||
*/
|
||||
#ifndef PNGARG
|
||||
# define PNGARG(arglist) arglist
|
||||
|
@ -298,7 +298,7 @@
|
|||
|
||||
#ifndef PNG_EXPORTA
|
||||
# define PNG_EXPORTA(ordinal, type, name, args, attributes) \
|
||||
PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), PNGARG(args), \
|
||||
PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), args, \
|
||||
PNG_LINKAGE_API attributes)
|
||||
#endif
|
||||
|
||||
|
@ -316,7 +316,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef PNG_CALLBACK
|
||||
# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args)
|
||||
# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) args
|
||||
#endif
|
||||
|
||||
/* Support for compiler specific function attributes. These are used
|
||||
|
|
|
@ -20,13 +20,14 @@
|
|||
|
||||
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||
|
||||
static PNG_FUNCTION(void, png_default_error,PNGARG((png_const_structrp png_ptr,
|
||||
png_const_charp error_message)),PNG_NORETURN);
|
||||
static PNG_FUNCTION(void /* PRIVATE */,
|
||||
png_default_error,(png_const_structrp png_ptr, png_const_charp error_message),
|
||||
PNG_NORETURN);
|
||||
|
||||
#ifdef PNG_WARNINGS_SUPPORTED
|
||||
static void /* PRIVATE */
|
||||
png_default_warning PNGARG((png_const_structrp png_ptr,
|
||||
png_const_charp warning_message));
|
||||
png_default_warning(png_const_structrp png_ptr,
|
||||
png_const_charp warning_message);
|
||||
#endif /* WARNINGS */
|
||||
|
||||
/* This function is called whenever there is a fatal error. This function
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* pnglibconf.h - library build configuration */
|
||||
|
||||
/* libpng version 1.6.43 */
|
||||
/* libpng version 1.6.44 */
|
||||
|
||||
/* Copyright (c) 2018-2024 Cosmin Truta */
|
||||
/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
|
||||
|
|
|
@ -140,47 +140,6 @@
|
|||
* callbacks to do this.
|
||||
*/
|
||||
# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_neon
|
||||
|
||||
/* By default the 'intrinsics' code in arm/filter_neon_intrinsics.c is used
|
||||
* if possible - if __ARM_NEON__ is set and the compiler version is not known
|
||||
* to be broken. This is controlled by PNG_ARM_NEON_IMPLEMENTATION which can
|
||||
* be:
|
||||
*
|
||||
* 1 The intrinsics code (the default with __ARM_NEON__)
|
||||
* 2 The hand coded assembler (the default without __ARM_NEON__)
|
||||
*
|
||||
* It is possible to set PNG_ARM_NEON_IMPLEMENTATION in CPPFLAGS, however
|
||||
* this is *NOT* supported and may cease to work even after a minor revision
|
||||
* to libpng. It *is* valid to do this for testing purposes, e.g. speed
|
||||
* testing or a new compiler, but the results should be communicated to the
|
||||
* libpng implementation list for incorporation in the next minor release.
|
||||
*/
|
||||
# ifndef PNG_ARM_NEON_IMPLEMENTATION
|
||||
# if defined(__ARM_NEON__) || defined(__ARM_NEON)
|
||||
# if defined(__clang__)
|
||||
/* At present it is unknown by the libpng developers which versions
|
||||
* of clang support the intrinsics, however some or perhaps all
|
||||
* versions do not work with the assembler so this may be
|
||||
* irrelevant, so just use the default (do nothing here.)
|
||||
*/
|
||||
# elif defined(__GNUC__)
|
||||
/* GCC 4.5.4 NEON support is known to be broken. 4.6.3 is known to
|
||||
* work, so if this *is* GCC, or G++, look for a version >4.5
|
||||
*/
|
||||
# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6)
|
||||
# define PNG_ARM_NEON_IMPLEMENTATION 2
|
||||
# endif /* no GNUC support */
|
||||
# endif /* __GNUC__ */
|
||||
# else /* !defined __ARM_NEON__ */
|
||||
/* The 'intrinsics' code simply won't compile without this -mfpu=neon:
|
||||
*/
|
||||
# if !defined(__aarch64__) && !defined(_M_ARM64)
|
||||
/* The assembler code currently does not work on ARM64 */
|
||||
# define PNG_ARM_NEON_IMPLEMENTATION 2
|
||||
# endif /* __aarch64__ */
|
||||
# endif /* __ARM_NEON__ */
|
||||
# endif /* !PNG_ARM_NEON_IMPLEMENTATION */
|
||||
|
||||
# ifndef PNG_ARM_NEON_IMPLEMENTATION
|
||||
/* Use the intrinsics code by default. */
|
||||
# define PNG_ARM_NEON_IMPLEMENTATION 1
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "rapidjson.h"
|
||||
#include "document.h"
|
|
@ -1033,7 +1033,7 @@ public:
|
|||
return false;
|
||||
for (ConstMemberIterator lhsMemberItr = MemberBegin(); lhsMemberItr != MemberEnd(); ++lhsMemberItr) {
|
||||
typename RhsType::ConstMemberIterator rhsMemberItr = rhs.FindMember(lhsMemberItr->name);
|
||||
if (rhsMemberItr == rhs.MemberEnd() || lhsMemberItr->value != rhsMemberItr->value)
|
||||
if (rhsMemberItr == rhs.MemberEnd() || (!(lhsMemberItr->value == rhsMemberItr->value)))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -1042,7 +1042,7 @@ public:
|
|||
if (data_.a.size != rhs.data_.a.size)
|
||||
return false;
|
||||
for (SizeType i = 0; i < data_.a.size; i++)
|
||||
if ((*this)[i] != rhs[i])
|
||||
if (!((*this)[i] == rhs[i]))
|
||||
return false;
|
||||
return true;
|
||||
|
||||
|
@ -2445,13 +2445,14 @@ private:
|
|||
data_.f.flags = kShortStringFlag;
|
||||
data_.ss.SetLength(s.length);
|
||||
str = data_.ss.str;
|
||||
std::memmove(str, s, s.length * sizeof(Ch));
|
||||
} else {
|
||||
data_.f.flags = kCopyStringFlag;
|
||||
data_.s.length = s.length;
|
||||
str = static_cast<Ch *>(allocator.Malloc((s.length + 1) * sizeof(Ch)));
|
||||
SetStringPointer(str);
|
||||
std::memcpy(str, s, s.length * sizeof(Ch));
|
||||
}
|
||||
std::memcpy(str, s, s.length * sizeof(Ch));
|
||||
str[s.length] = '\0';
|
||||
}
|
||||
|
||||
|
|
|
@ -615,7 +615,7 @@ public:
|
|||
RAPIDJSON_ASSERT(regex_.IsValid());
|
||||
if (!allocator_)
|
||||
ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();
|
||||
stateSet_ = static_cast<unsigned*>(allocator_->Malloc(GetStateSetSize()));
|
||||
stateSet_ = static_cast<uint32_t*>(allocator_->Malloc(GetStateSetSize()));
|
||||
state0_.template Reserve<SizeType>(regex_.stateCount_);
|
||||
state1_.template Reserve<SizeType>(regex_.stateCount_);
|
||||
}
|
||||
|
|
|
@ -268,7 +268,7 @@
|
|||
# elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
|
||||
# define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN
|
||||
// Detect with architecture macros
|
||||
# elif defined(__sparc) || defined(__sparc__) || defined(_POWER) || defined(__powerpc__) || defined(__ppc__) || defined(__hpux) || defined(__hppa) || defined(_MIPSEB) || defined(_POWER) || defined(__s390__)
|
||||
# elif defined(__sparc) || defined(__sparc__) || defined(_POWER) || defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || defined(__hpux) || defined(__hppa) || defined(_MIPSEB) || defined(_POWER) || defined(__s390__)
|
||||
# define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN
|
||||
# elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__)
|
||||
# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
|
||||
|
|
|
@ -1584,7 +1584,7 @@ private:
|
|||
// Parse frac = decimal-point 1*DIGIT
|
||||
int expFrac = 0;
|
||||
size_t decimalPosition;
|
||||
if (Consume(s, '.')) {
|
||||
if (!useNanOrInf && Consume(s, '.')) {
|
||||
decimalPosition = s.Length();
|
||||
|
||||
if (RAPIDJSON_UNLIKELY(!(s.Peek() >= '0' && s.Peek() <= '9')))
|
||||
|
@ -1631,7 +1631,7 @@ private:
|
|||
|
||||
// Parse exp = e [ minus / plus ] 1*DIGIT
|
||||
int exp = 0;
|
||||
if (Consume(s, 'e') || Consume(s, 'E')) {
|
||||
if (!useNanOrInf && (Consume(s, 'e') || Consume(s, 'E'))) {
|
||||
if (!useDouble) {
|
||||
d = static_cast<double>(use64bit ? i64 : i);
|
||||
useDouble = true;
|
||||
|
|
|
@ -24,13 +24,9 @@
|
|||
|
||||
#if !defined(RAPIDJSON_SCHEMA_USE_INTERNALREGEX)
|
||||
#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 1
|
||||
#else
|
||||
#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 0
|
||||
#endif
|
||||
|
||||
#if !RAPIDJSON_SCHEMA_USE_INTERNALREGEX && defined(RAPIDJSON_SCHEMA_USE_STDREGEX) && (__cplusplus >=201103L || (defined(_MSC_VER) && _MSC_VER >= 1800))
|
||||
#define RAPIDJSON_SCHEMA_USE_STDREGEX 1
|
||||
#else
|
||||
#if !defined(RAPIDJSON_SCHEMA_USE_STDREGEX) || !(__cplusplus >=201103L || (defined(_MSC_VER) && _MSC_VER >= 1800))
|
||||
#define RAPIDJSON_SCHEMA_USE_STDREGEX 0
|
||||
#endif
|
||||
|
||||
|
@ -367,7 +363,9 @@ public:
|
|||
uint64_t h = Hash(0, kObjectType);
|
||||
uint64_t* kv = stack_.template Pop<uint64_t>(memberCount * 2);
|
||||
for (SizeType i = 0; i < memberCount; i++)
|
||||
h ^= Hash(kv[i * 2], kv[i * 2 + 1]); // Use xor to achieve member order insensitive
|
||||
// Issue #2205
|
||||
// Hasing the key to avoid key=value cases with bug-prone zero-value hash
|
||||
h ^= Hash(Hash(0, kv[i * 2]), kv[i * 2 + 1]); // Use xor to achieve member order insensitive
|
||||
*stack_.template Push<uint64_t>() = h;
|
||||
return true;
|
||||
}
|
||||
|
@ -405,7 +403,7 @@ private:
|
|||
|
||||
bool WriteBuffer(Type type, const void* data, size_t len) {
|
||||
// FNV-1a from http://isthe.com/chongo/tech/comp/fnv/
|
||||
uint64_t h = Hash(RAPIDJSON_UINT64_C2(0x84222325, 0xcbf29ce4), type);
|
||||
uint64_t h = Hash(RAPIDJSON_UINT64_C2(0xcbf29ce4, 0x84222325), type);
|
||||
const unsigned char* d = static_cast<const unsigned char*>(data);
|
||||
for (size_t i = 0; i < len; i++)
|
||||
h = Hash(h, d[i]);
|
||||
|
@ -1643,9 +1641,13 @@ private:
|
|||
|
||||
bool CheckDoubleMultipleOf(Context& context, double d) const {
|
||||
double a = std::abs(d), b = std::abs(multipleOf_.GetDouble());
|
||||
double q = std::floor(a / b);
|
||||
double r = a - q * b;
|
||||
if (r > 0.0) {
|
||||
double q = a / b;
|
||||
double qRounded = std::floor(q + 0.5);
|
||||
double scaledEpsilon = (q + qRounded) * std::numeric_limits<double>::epsilon();
|
||||
double difference = std::abs(qRounded - q);
|
||||
bool isMultiple = (difference <= scaledEpsilon)
|
||||
|| (difference < std::numeric_limits<double>::min());
|
||||
if (!isMultiple) {
|
||||
context.error_handler.NotMultipleOf(d, multipleOf_);
|
||||
RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorMultipleOf);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* auto-generated on 2024-08-01 09:31:50 -0400. Do not edit! */
|
||||
/* auto-generated on 2024-08-26 09:37:03 -0400. Do not edit! */
|
||||
/* including simdjson.cpp: */
|
||||
/* begin file simdjson.cpp */
|
||||
#define SIMDJSON_SRC_SIMDJSON_CPP
|
||||
|
@ -332,6 +332,8 @@ double from_chars(const char *first, const char* end) noexcept;
|
|||
#define SIMDJSON_ISALIGNED_N(ptr, n) (((uintptr_t)(ptr) & ((n)-1)) == 0)
|
||||
|
||||
#if SIMDJSON_REGULAR_VISUAL_STUDIO
|
||||
// We could use [[deprecated]] but it requires C++14
|
||||
#define simdjson_deprecated __declspec(deprecated)
|
||||
|
||||
#define simdjson_really_inline __forceinline
|
||||
#define simdjson_never_inline __declspec(noinline)
|
||||
|
@ -370,6 +372,8 @@ double from_chars(const char *first, const char* end) noexcept;
|
|||
#define SIMDJSON_POP_DISABLE_UNUSED_WARNINGS
|
||||
|
||||
#else // SIMDJSON_REGULAR_VISUAL_STUDIO
|
||||
// We could use [[deprecated]] but it requires C++14
|
||||
#define simdjson_deprecated __attribute__((deprecated))
|
||||
|
||||
#define simdjson_really_inline inline __attribute__((always_inline))
|
||||
#define simdjson_never_inline inline __attribute__((noinline))
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -205,7 +205,7 @@ SOFTWARE.
|
|||
/*
|
||||
** The yasio version macros
|
||||
*/
|
||||
#define YASIO_VERSION_NUM 0x040204
|
||||
#define YASIO_VERSION_NUM 0x040301
|
||||
|
||||
/*
|
||||
** The macros used by io_service.
|
||||
|
|
|
@ -376,7 +376,10 @@ int io_transport::write(io_send_buffer&& buffer, completion_cb_t&& handler)
|
|||
get_service().wakeup();
|
||||
return n;
|
||||
}
|
||||
int io_transport::do_read(int revent, int& error, highp_time_t&) { return this->call_read(buffer_ + offset_, sizeof(buffer_) - offset_, revent, error); }
|
||||
int io_transport::do_read(int revent, int& error, highp_time_t&)
|
||||
{
|
||||
return this->call_read(buffer_.data() + offset_, static_cast<int>(buffer_.size() - offset_), revent, error);
|
||||
}
|
||||
bool io_transport::do_write(highp_time_t& wait_duration)
|
||||
{
|
||||
bool ret = false;
|
||||
|
@ -728,7 +731,14 @@ int io_transport_kcp::do_read(int revent, int& error, highp_time_t& wait_duratio
|
|||
this->handle_input(rawbuf_.data(), n, error, wait_duration);
|
||||
if (!error)
|
||||
{ // !important, should always try to call ikcp_recv when no error occured.
|
||||
n = ::ikcp_recv(kcp_, buffer_ + offset_, sizeof(buffer_) - offset_);
|
||||
auto kdata_size = ::ikcp_peeksize(kcp_);
|
||||
if (kdata_size > 0)
|
||||
{
|
||||
auto need_size = static_cast<size_t>(kdata_size + offset_);
|
||||
if (buffer_.size() < need_size)
|
||||
buffer_.resize(kdata_size + offset_);
|
||||
n = ::ikcp_recv(kcp_, buffer_.data() + offset_, kdata_size);
|
||||
}
|
||||
if (n > 0) // If got data from kcp, don't wait
|
||||
wait_duration = 0;
|
||||
else if (n < 0)
|
||||
|
@ -821,6 +831,15 @@ void io_service::handle_stop()
|
|||
return;
|
||||
}
|
||||
this->worker_.join();
|
||||
if (this->state_ != state::AT_EXITING)
|
||||
{
|
||||
// after join if state not AT_EXITING, means worker thread was terminated externally
|
||||
// i.g .net managed exception occurred when invoke c# delegate and we should clear pending
|
||||
// events to prevent dispatch to io event handler again
|
||||
YASIO_KLOGW("[core] the worker thread terminated unexpectedly");
|
||||
handle_worker_exit();
|
||||
this->events_.clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (this->state_ != state::AT_EXITING)
|
||||
|
@ -1005,6 +1024,10 @@ void io_service::run()
|
|||
|
||||
} while (!this->stop_flag_ || !this->transports_.empty());
|
||||
|
||||
handle_worker_exit();
|
||||
}
|
||||
void io_service::handle_worker_exit()
|
||||
{
|
||||
#if defined(YASIO_USE_CARES)
|
||||
destroy_ares_channel();
|
||||
#endif
|
||||
|
@ -1012,7 +1035,6 @@ void io_service::run()
|
|||
cleanup_ssl_context(YSSL_CLIENT);
|
||||
cleanup_ssl_context(YSSL_SERVER);
|
||||
#endif
|
||||
|
||||
this->state_ = io_service::state::AT_EXITING;
|
||||
}
|
||||
void io_service::process_transports()
|
||||
|
@ -1767,7 +1789,7 @@ bool io_service::do_read(transport_handle_t transport)
|
|||
const int bytes_to_strip = transport->ctx_->uparams_.initial_bytes_to_strip;
|
||||
if (transport->expected_size_ == -1)
|
||||
{ // decode length
|
||||
int length = transport->ctx_->decode_len_(transport->buffer_, transport->offset_ + n);
|
||||
int length = transport->ctx_->decode_len_(transport->buffer_.data(), transport->offset_ + n);
|
||||
if (length > 0)
|
||||
{
|
||||
if (length < bytes_to_strip)
|
||||
|
@ -1793,7 +1815,7 @@ bool io_service::do_read(transport_handle_t transport)
|
|||
}
|
||||
else if (n > 0)
|
||||
{ // forward packet, don't perform unpack, it's useful for implement streaming based protocol, like http, websocket and ...
|
||||
this->forward_packet(transport->cindex(), io_packet_view{transport->buffer_, n}, transport);
|
||||
this->forward_packet(transport->cindex(), io_packet_view{transport->buffer_.data(), n}, transport);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1811,7 +1833,7 @@ void io_service::unpack(transport_handle_t transport, int bytes_want /*want cons
|
|||
auto& offset = transport->offset_;
|
||||
auto bytes_available = bytes_transferred + offset;
|
||||
auto& pkt = transport->expected_packet_;
|
||||
pkt.insert(pkt.end(), transport->buffer_ + bytes_to_strip, transport->buffer_ + (std::min)(bytes_want, bytes_available));
|
||||
pkt.insert(pkt.end(), transport->buffer_.data() + bytes_to_strip, transport->buffer_.data() + (std::min)(bytes_want, bytes_available));
|
||||
|
||||
// set 'offset' to bytes of remain buffer
|
||||
offset = bytes_available - bytes_want;
|
||||
|
@ -1819,7 +1841,7 @@ void io_service::unpack(transport_handle_t transport, int bytes_want /*want cons
|
|||
{ /* pdu received properly */
|
||||
if (offset > 0)
|
||||
{ /* move remain data to head of buffer and hold 'offset'. */
|
||||
::memmove(transport->buffer_, transport->buffer_ + bytes_want, offset);
|
||||
::memmove(transport->buffer_.data(), transport->buffer_.data() + bytes_want, offset);
|
||||
this->wait_duration_ = 0;
|
||||
}
|
||||
// move properly pdu to ready queue, the other thread who care about will retrieve it.
|
||||
|
|
|
@ -778,7 +778,7 @@ protected:
|
|||
|
||||
bool is_valid() const { return ctx_ != nullptr; }
|
||||
|
||||
char buffer_[yasio__max_rcvbuf]; // recv buffer, 64K
|
||||
yasio::sbyte_buffer buffer_{static_cast<size_t>(yasio__max_rcvbuf)};
|
||||
int offset_ = 0; // recv buffer offset
|
||||
|
||||
int expected_size_ = -1;
|
||||
|
@ -1199,6 +1199,7 @@ private:
|
|||
|
||||
YASIO__DECL bool cleanup_channel(io_channel* channel, bool clear_mask = true);
|
||||
YASIO__DECL bool cleanup_io(io_base* obj, bool clear_mask = true);
|
||||
YASIO__DECL void handle_worker_exit();
|
||||
|
||||
YASIO__DECL void handle_close(transport_handle_t);
|
||||
|
||||
|
|
20
CHANGELOG.md
20
CHANGELOG.md
|
@ -1,3 +1,23 @@
|
|||
## axmol-2.2.0 ??
|
||||
|
||||
### sdks updates
|
||||
|
||||
- emsdk: 3.1.63 ==> 3.1.67
|
||||
|
||||
### 3rdparty updates
|
||||
|
||||
- glad: 2.0.6 ==> 2.0.7
|
||||
- curl: 8.9.1 ==> 8.10.1
|
||||
- simdjson: 3.10.0 ==> 3.10.1
|
||||
- libpng: 1.6.43 ==> 1.6.44
|
||||
- c-ares: 1.33.0 ==> 1.33.1
|
||||
- openssl: 3.3.1 ==> 3.0.15
|
||||
- yasio: 4.2.4 ==> 4.3.1
|
||||
- jpeg-turbo: 3.0.3 ==> 3.0.4
|
||||
- luajit: 2.1-04dca79 ==> 2.1-87ae18a
|
||||
- simdjson: 3.10.0 ==> 3.10.1
|
||||
- rapidjson: 1.1.0-b4a6da3 ==> 1.1.0-815e6e7
|
||||
|
||||
## axmol-2.1.5 Aug.11 2024
|
||||
|
||||
### Significant changes relative to 2.1.4:
|
||||
|
|
|
@ -30,7 +30,9 @@
|
|||
#include "base/Data.h"
|
||||
#include "3d/Bundle3DData.h"
|
||||
#include "3d/BundleReader.h"
|
||||
#include "rapidjson/document-wrapper.h"
|
||||
#include "rapidjson/rapidjson.h"
|
||||
#include "rapidjson/document.h"
|
||||
|
||||
|
||||
namespace ax
|
||||
{
|
||||
|
|
|
@ -39,7 +39,9 @@
|
|||
#include "Manifest.h"
|
||||
#include "extensions/ExtensionMacros.h"
|
||||
#include "extensions/ExtensionExport.h"
|
||||
#include "rapidjson/document-wrapper.h"
|
||||
#include "rapidjson/rapidjson.h"
|
||||
#include "rapidjson/document.h"
|
||||
|
||||
|
||||
struct zlib_filefunc_def_s;
|
||||
|
||||
|
|
|
@ -35,7 +35,9 @@
|
|||
#include "network/Downloader.h"
|
||||
#include "platform/FileUtils.h"
|
||||
|
||||
#include "rapidjson/document-wrapper.h"
|
||||
#include "rapidjson/rapidjson.h"
|
||||
#include "rapidjson/document.h"
|
||||
|
||||
|
||||
NS_AX_EXT_BEGIN
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
#define _COCOLOADER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "rapidjson/document-wrapper.h"
|
||||
#include "rapidjson/rapidjson.h"
|
||||
#include "rapidjson/document.h"
|
||||
#include "CocosStudioExport.h"
|
||||
|
||||
#pragma pack(4)
|
||||
|
|
|
@ -34,7 +34,9 @@ THE SOFTWARE.
|
|||
#include "pugixml/pugixml.hpp"
|
||||
#include "pugixml/pugiext.hpp"
|
||||
|
||||
#include "rapidjson/document-wrapper.h"
|
||||
#include "rapidjson/rapidjson.h"
|
||||
#include "rapidjson/document.h"
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <queue>
|
||||
|
|
|
@ -25,7 +25,9 @@ THE SOFTWARE.
|
|||
#ifndef __DICTIONARYHELPER_H__
|
||||
#define __DICTIONARYHELPER_H__
|
||||
|
||||
#include "rapidjson/document-wrapper.h"
|
||||
#include "rapidjson/rapidjson.h"
|
||||
#include "rapidjson/document.h"
|
||||
|
||||
#include "CocosStudioExport.h"
|
||||
|
||||
#define DICTOOL DictionaryHelper::getInstance()
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include "rapidjson/document-wrapper.h"
|
||||
#include "rapidjson/rapidjson.h"
|
||||
#include "rapidjson/document.h"
|
||||
#include "CocosStudioExport.h"
|
||||
|
||||
namespace cocostudio
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"versions": {
|
||||
"1kdist": "v90",
|
||||
"1kdist": "v92",
|
||||
"oboe": "1.9.0",
|
||||
"kcp": "v1.7-f2aa30e",
|
||||
"lz4": "v1.10.0",
|
||||
|
|
Loading…
Reference in New Issue