From a9ef76a54c05dc114be1f4067eadce88ecfdaf74 Mon Sep 17 00:00:00 2001 From: erik-larsen Date: Mon, 14 Jul 2025 16:06:52 -0400 Subject: [PATCH 01/13] Fix GLUT window resizing when CSS scaling (#7133) 1) Add reshapeHandler() to set canvas size to clientWidth, clientHeight, and pass these along to glutReshapeFunc. 2) Register reshapeHandler as 'resize' event listener with addEventListener. 3) Call reshapeHandler on glutMainLoop instead of glutReshapeWindow, which unnecessarily exits fullscreen. --- src/lib/libglut.js | 22 +++-- test/browser/test_glut_resize.c | 146 ++++++++++++++++++++++++++++++++ test/test_browser.py | 3 + 3 files changed, 163 insertions(+), 8 deletions(-) create mode 100644 test/browser/test_glut_resize.c diff --git a/src/lib/libglut.js b/src/lib/libglut.js index a490cbf8b4557..4bf8aa337b1ba 100644 --- a/src/lib/libglut.js +++ b/src/lib/libglut.js @@ -298,6 +298,15 @@ var LibraryGLUT = { {{{ makeDynCall('vii', 'GLUT.reshapeFunc') }}}(width, height); } _glutPostRedisplay(); + }, + + reshapeHandler: () => { + // Use clientWidth and clientHeight, which include CSS scaling of the canvas + var canvas = Browser.getCanvas(); + Browser.setCanvasSize(canvas.clientWidth, canvas.clientHeight, true); + if (GLUT.reshapeFunc) { + {{{ makeDynCall('vii', 'GLUT.reshapeFunc') }}}(canvas.clientWidth, canvas.clientHeight); + } } }, @@ -336,11 +345,7 @@ var LibraryGLUT = { // Firefox window.addEventListener('DOMMouseScroll', GLUT.onMouseWheel, true); - Browser.resizeListeners.push((width, height) => { - if (GLUT.reshapeFunc) { - {{{ makeDynCall('vii', 'GLUT.reshapeFunc') }}}(width, height); - } - }); + window.addEventListener('resize', GLUT.reshapeHandler, true); addOnExit(() => { if (isTouchDevice) { @@ -359,6 +364,8 @@ var LibraryGLUT = { // Firefox window.removeEventListener('DOMMouseScroll', GLUT.onMouseWheel, true); + window.removeEventListener('resize', GLUT.reshapeHandler, true); + var canvas = Browser.getCanvas(); canvas.width = canvas.height = 1; }); @@ -633,10 +640,9 @@ var LibraryGLUT = { }, glutMainLoop__proxy: 'sync', - glutMainLoop__deps: ['$GLUT', 'glutReshapeWindow', 'glutPostRedisplay'], + glutMainLoop__deps: ['$GLUT', 'glutPostRedisplay'], glutMainLoop: () => { - var canvas = Browser.getCanvas(); - _glutReshapeWindow(canvas.width, canvas.height); + GLUT.reshapeHandler(); _glutPostRedisplay(); throw 'unwind'; }, diff --git a/test/browser/test_glut_resize.c b/test/browser/test_glut_resize.c new file mode 100644 index 0000000000000..2322e2c7450be --- /dev/null +++ b/test/browser/test_glut_resize.c @@ -0,0 +1,146 @@ +/* + * Copyright 2025 The Emscripten Authors. All rights reserved. + * Emscripten is available under two separate licenses, the MIT license and the + * University of Illinois/NCSA Open Source License. Both these licenses can be + * found in the LICENSE file. + */ + +#include +#include +#include +#include + +typedef struct { + int width; + int height; +} rect_size_t; + +static rect_size_t browser_window_size = { 0, 0 }; +static rect_size_t glut_init_size = { 0, 0 }; +static rect_size_t glut_reshape_size = { 0, 0 }; + +void print_size_test(const char* name, rect_size_t rect_size) { + static int test_count = 0; + printf("Test %d: %s = %d x %d\n", ++test_count, name, rect_size.width, rect_size.height); +} + +int equal_size(rect_size_t rect_1, rect_size_t rect_2) { + return (rect_1.width == rect_2.width && rect_1.height == rect_2.height); +} + +/** + * Obtain various dimensions + */ +EM_JS(void, get_browser_window_size, (int* width, int* height), { + setValue(width, window.innerWidth, 'i32'); + setValue(height, window.innerHeight, 'i32'); +}); + +EM_JS(void, get_canvas_client_size, (int* width, int* height), { + const canvas = Module.canvas; + setValue(width, canvas.clientWidth, 'i32'); + setValue(height, canvas.clientHeight, 'i32'); +}); + +EM_JS(void, get_canvas_size, (int* width, int* height), { + const canvas = Module.canvas; + setValue(width, canvas.width, 'i32'); + setValue(height, canvas.height, 'i32'); +}); + +/** + * Update canvas style with given width and height, then invoke window resize event + */ +EM_JS(void, test_resize_with_CSS, (const char* position, const char* width, const char* height), { + const canvas = Module.canvas; + canvas.style.position = UTF8ToString(position); + canvas.style.width = UTF8ToString(width); + canvas.style.height = UTF8ToString(height); + + window.dispatchEvent(new UIEvent('resize')); +}); + +/** + * Verify canvas and reshape callback match target size, and also that + * canvas width, height matches canvas clientWidth, clientHeight + */ +void assert_sizes_equal(rect_size_t target_size) { + /* verify target size match */ + rect_size_t canvas_size; + get_canvas_size(&canvas_size.width, &canvas_size.height); + assert(equal_size(canvas_size, target_size)); + assert(equal_size(glut_reshape_size, target_size)); + + /* verify canvas client size match */ + rect_size_t canvas_client_size; + get_canvas_client_size(&canvas_client_size.width, &canvas_client_size.height); + assert(equal_size(canvas_size, canvas_client_size)); +} + +/** + * Resizing tests + */ +void run_tests() { + + /* startup */ + print_size_test("startup, no CSS: canvas == glutReshapeFunc == glutInitWindow size", glut_init_size); + assert_sizes_equal(glut_init_size); + + /* glutReshapeWindow */ + rect_size_t new_reshape_size = { glut_init_size.width + 40, glut_init_size.height + 20 }; + print_size_test("glut reshape, no CSS: canvas == glutReshapeFunc == glutReshapeWindow size", new_reshape_size); + glutReshapeWindow(new_reshape_size.width, new_reshape_size.height); + assert_sizes_equal(new_reshape_size); + + /* 100% scale CSS */ + print_size_test("100% window scale CSS: canvas == glutReshapeFunc == browser window size", browser_window_size); + test_resize_with_CSS("fixed", "100%", "100%"); /* fixed, so canvas is driven by window size */ + assert_sizes_equal(browser_window_size); + + /* specific pixel size CSS */ + rect_size_t css_pixels_size = { glut_init_size.width - 20, glut_init_size.height + 40 }; + print_size_test("specific pixel size CSS: canvas == glutReshapeFunc == CSS specific size", css_pixels_size); + char css_width[16], css_height[16]; + snprintf (css_width, 16, "%dpx", css_pixels_size.width); + snprintf (css_height, 16, "%dpx", css_pixels_size.height); + test_resize_with_CSS("static", css_width, css_height); /* static, canvas is driven by CSS size */ + assert_sizes_equal(css_pixels_size); + + /* mix of CSS scale and pixel size */ + rect_size_t css_mixed_size = { browser_window_size.width * 0.6, 100 }; + print_size_test("60% width, 100px height CSS: canvas == glutReshapeFunc == CSS mixed size", css_mixed_size); + test_resize_with_CSS("fixed", "60%", "100px"); /* fixed, canvas width is driven by window size */ + assert_sizes_equal(css_mixed_size); + + /* run tests once */ + glutIdleFunc(NULL); + emscripten_force_exit(0); +} + +/** + * Reshape callback + */ +void reshape(int w, int h) { + glut_reshape_size.width = w; + glut_reshape_size.height = h; +} + +int main(int argc, char *argv[]) { + /* Make glut initial canvas size be 1/2 of browser window */ + get_browser_window_size(&browser_window_size.width, &browser_window_size.height); + glut_init_size.width = browser_window_size.width / 2; + glut_init_size.height = browser_window_size.height / 2; + + glutInit(&argc, argv); + glutInitWindowSize(glut_init_size.width, glut_init_size.height); + glutInitDisplayMode(GLUT_RGB); + glutCreateWindow("test_glut_resize.c"); + + /* Set up glut callback functions */ + glutIdleFunc(run_tests); + glutReshapeFunc(reshape); + glutDisplayFunc(NULL); + + glutMainLoop(); + return 0; +} \ No newline at end of file diff --git a/test/test_browser.py b/test/test_browser.py index df9275cc74111..b4fb30d5e9f35 100644 --- a/test/test_browser.py +++ b/test/test_browser.py @@ -1135,6 +1135,9 @@ def test_glut_glutget(self): self.btest_exit('glut_glutget.c', cflags=['-lglut', '-lGL']) self.btest_exit('glut_glutget.c', cflags=['-lglut', '-lGL', '-DAA_ACTIVATED', '-DDEPTH_ACTIVATED', '-DSTENCIL_ACTIVATED', '-DALPHA_ACTIVATED']) + def test_glut_resize(self): + self.btest_exit('test_glut_resize.c') + def test_sdl_joystick_1(self): # Generates events corresponding to the Working Draft of the HTML5 Gamepad API. # http://www.w3.org/TR/2012/WD-gamepad-20120529/#gamepad-interface From 3afce0cb283d5fd6a79e0b94a976324c12c3b386 Mon Sep 17 00:00:00 2001 From: erik-larsen Date: Tue, 15 Jul 2025 10:51:42 -0400 Subject: [PATCH 02/13] Two-stage resizing so resizeListeners can participate in GLUT resizing. 1. First stage is addEventListener for GLUT.onSize, which only updates the canvas size to clientWidth and clientHeight via setCanvasSize, which in turn calls updateResizeListeners. 2. Second stage is to add back original Browser.resizeListeners.push for GLUT.reshapeFunc, which is called on updateResizeListeners. The callback sequence is: window resize -> GLUT.onSize -> Browser.setCanvasSize -> updateResizeListeners -> GLUT.reshapeFunc This extra step is so any other calls to Browser.setCanvasSize, setFullscreenCanvasSize, setWindowedCanvasSize will now callback to GLUT.reshapeFunc. --- src/lib/libglut.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/lib/libglut.js b/src/lib/libglut.js index 4bf8aa337b1ba..fae3998314065 100644 --- a/src/lib/libglut.js +++ b/src/lib/libglut.js @@ -300,13 +300,11 @@ var LibraryGLUT = { _glutPostRedisplay(); }, - reshapeHandler: () => { - // Use clientWidth and clientHeight, which include CSS scaling of the canvas + // Resize callback stage 1: update canvas by setCanvasSize, which notifies resizeListeners including GLUT.reshapeFunc + onResize: () => { + // Update canvas size to clientWidth and clientHeight, which include CSS scaling var canvas = Browser.getCanvas(); - Browser.setCanvasSize(canvas.clientWidth, canvas.clientHeight, true); - if (GLUT.reshapeFunc) { - {{{ makeDynCall('vii', 'GLUT.reshapeFunc') }}}(canvas.clientWidth, canvas.clientHeight); - } + Browser.setCanvasSize(canvas.clientWidth, canvas.clientHeight, /*noUpdates*/false); } }, @@ -345,7 +343,15 @@ var LibraryGLUT = { // Firefox window.addEventListener('DOMMouseScroll', GLUT.onMouseWheel, true); - window.addEventListener('resize', GLUT.reshapeHandler, true); + // Resize callback stage 1: update canvas which notifies resizeListeners + window.addEventListener('resize', GLUT.onResize, true); + + // Resize callback stage 2: updateResizeListeners notifies reshapeFunc + Browser.resizeListeners.push((width, height) => { + if (GLUT.reshapeFunc) { + {{{ makeDynCall('vii', 'GLUT.reshapeFunc') }}}(width, height); + } + }); addOnExit(() => { if (isTouchDevice) { @@ -364,7 +370,7 @@ var LibraryGLUT = { // Firefox window.removeEventListener('DOMMouseScroll', GLUT.onMouseWheel, true); - window.removeEventListener('resize', GLUT.reshapeHandler, true); + window.removeEventListener('resize', GLUT.onResize, true); var canvas = Browser.getCanvas(); canvas.width = canvas.height = 1; @@ -642,7 +648,7 @@ var LibraryGLUT = { glutMainLoop__proxy: 'sync', glutMainLoop__deps: ['$GLUT', 'glutPostRedisplay'], glutMainLoop: () => { - GLUT.reshapeHandler(); + GLUT.onResize(); _glutPostRedisplay(); throw 'unwind'; }, From 70675ff41f9b8163a2384862f5bd8c5a52f2b21b Mon Sep 17 00:00:00 2001 From: erik-larsen Date: Wed, 16 Jul 2025 19:37:24 -0400 Subject: [PATCH 03/13] Reworked test code to run reliably under async test cases (those which modify CSS and manually trigger a resize event). Also removed unnecessary whitespace change from libglut.js. Callback sequence for synchronous test cases 1-2: case 1: glutMainLoop -> GLUT.onSize -> Browser.setCanvasSize -> updateResizeListeners -> GLUT.reshapeFunc case 2: glutResizeWindow -> Browser.setCanvasSize -> updateResizeListeners -> GLUT.reshapeFunc Callback sequence for asynchronous test cases 3-5: window resize -> async update -> GLUT.onSize -> Browser.setCanvasSize -> updateResizeListeners -> GLUT.reshapeFunc Because window resize does not immediately call GLUT.onSize, we wait to run verification of a test until we get confirmation in GLUT.reshapeFunc. And after verification is done, we move on to the next test. --- src/lib/libglut.js | 2 +- test/browser/test_glut_resize.c | 145 +++++++++++++++++++++++--------- 2 files changed, 104 insertions(+), 43 deletions(-) diff --git a/src/lib/libglut.js b/src/lib/libglut.js index fae3998314065..c85783d2ae42d 100644 --- a/src/lib/libglut.js +++ b/src/lib/libglut.js @@ -351,7 +351,7 @@ var LibraryGLUT = { if (GLUT.reshapeFunc) { {{{ makeDynCall('vii', 'GLUT.reshapeFunc') }}}(width, height); } - }); + }); addOnExit(() => { if (isTouchDevice) { diff --git a/test/browser/test_glut_resize.c b/test/browser/test_glut_resize.c index 2322e2c7450be..08c3eb03aebfe 100644 --- a/test/browser/test_glut_resize.c +++ b/test/browser/test_glut_resize.c @@ -18,10 +18,26 @@ typedef struct { static rect_size_t browser_window_size = { 0, 0 }; static rect_size_t glut_init_size = { 0, 0 }; static rect_size_t glut_reshape_size = { 0, 0 }; +static rect_size_t target_size = { 0, 0 }; + +/* + * Set run_async_verification to 0 for sync test cases, and 1 for async tests. + * + * Callback sequence for test case 1 & 2 (synchronous): + * glutMainLoop -> GLUT.onSize -> Browser.setCanvasSize -> updateResizeListeners -> GLUT.reshapeFunc + * glutResizeWindow -> Browser.setCanvasSize -> updateResizeListeners -> GLUT.reshapeFunc + * + * Callback sequence for test cases 3-5 (async): + * window resize -> async update -> GLUT.onSize -> Browser.setCanvasSize -> updateResizeListeners -> GLUT.reshapeFunc + * + * Because window resize does not immediately call GLUT.onSize, we wait to run verification of a test until we get + * confirmation in GLUT.reshapeFunc. And after verification is done, we move on to the next test. + * + */ +static int run_async_verification = 0; -void print_size_test(const char* name, rect_size_t rect_size) { - static int test_count = 0; - printf("Test %d: %s = %d x %d\n", ++test_count, name, rect_size.width, rect_size.height); +void print_size_test(int test_num, const char* name, rect_size_t rect_size) { + printf("Test %d: %s = %d x %d\n", test_num, name, rect_size.width, rect_size.height); } int equal_size(rect_size_t rect_1, rect_size_t rect_2) { @@ -64,7 +80,7 @@ EM_JS(void, test_resize_with_CSS, (const char* position, const char* width, cons * Verify canvas and reshape callback match target size, and also that * canvas width, height matches canvas clientWidth, clientHeight */ -void assert_sizes_equal(rect_size_t target_size) { +void assert_canvas_and_target_sizes_equal() { /* verify target size match */ rect_size_t canvas_size; get_canvas_size(&canvas_size.width, &canvas_size.height); @@ -77,57 +93,102 @@ void assert_sizes_equal(rect_size_t target_size) { assert(equal_size(canvas_size, canvas_client_size)); } +/** + * Verify the result of the previous test and then run the next one + */ +void verify_test_and_run_next() { + void run_next_test(); + + assert_canvas_and_target_sizes_equal(); + run_next_test(); +} + /** * Resizing tests */ -void run_tests() { - - /* startup */ - print_size_test("startup, no CSS: canvas == glutReshapeFunc == glutInitWindow size", glut_init_size); - assert_sizes_equal(glut_init_size); - - /* glutReshapeWindow */ - rect_size_t new_reshape_size = { glut_init_size.width + 40, glut_init_size.height + 20 }; - print_size_test("glut reshape, no CSS: canvas == glutReshapeFunc == glutReshapeWindow size", new_reshape_size); - glutReshapeWindow(new_reshape_size.width, new_reshape_size.height); - assert_sizes_equal(new_reshape_size); - - /* 100% scale CSS */ - print_size_test("100% window scale CSS: canvas == glutReshapeFunc == browser window size", browser_window_size); - test_resize_with_CSS("fixed", "100%", "100%"); /* fixed, so canvas is driven by window size */ - assert_sizes_equal(browser_window_size); - - /* specific pixel size CSS */ - rect_size_t css_pixels_size = { glut_init_size.width - 20, glut_init_size.height + 40 }; - print_size_test("specific pixel size CSS: canvas == glutReshapeFunc == CSS specific size", css_pixels_size); - char css_width[16], css_height[16]; - snprintf (css_width, 16, "%dpx", css_pixels_size.width); - snprintf (css_height, 16, "%dpx", css_pixels_size.height); - test_resize_with_CSS("static", css_width, css_height); /* static, canvas is driven by CSS size */ - assert_sizes_equal(css_pixels_size); - - /* mix of CSS scale and pixel size */ - rect_size_t css_mixed_size = { browser_window_size.width * 0.6, 100 }; - print_size_test("60% width, 100px height CSS: canvas == glutReshapeFunc == CSS mixed size", css_mixed_size); - test_resize_with_CSS("fixed", "60%", "100px"); /* fixed, canvas width is driven by window size */ - assert_sizes_equal(css_mixed_size); - - /* run tests once */ - glutIdleFunc(NULL); - emscripten_force_exit(0); +void run_next_test() { + static int test_num = 0; + ++test_num; + + switch(test_num) { + case 1: { + /* startup */ + target_size = glut_init_size; + print_size_test(test_num, "startup, no CSS: canvas == glutReshapeFunc == glutInitWindow size", target_size); + verify_test_and_run_next(); + break; + } + case 2: { + /* glutReshapeWindow */ + target_size.width = glut_init_size.width + 40; + target_size.height = glut_init_size.height + 20; + print_size_test(test_num, "glut reshape, no CSS: canvas == glutReshapeFunc == glutReshapeWindow size", target_size); + glutReshapeWindow(target_size.width, target_size.height); + verify_test_and_run_next(); + break; + } + case 3: { + /* 100% scale CSS */ + target_size = browser_window_size; + print_size_test(test_num, "100% window scale CSS: canvas == glutReshapeFunc == browser window size", target_size); + run_async_verification = 1; + test_resize_with_CSS("fixed", "100%", "100%"); /* fixed, so canvas is driven by window size */ + break; + } + case 4: { + /* specific pixel size CSS */ + target_size.width = glut_init_size.width - 20; + target_size.height = glut_init_size.height + 40; + print_size_test(test_num, "specific pixel size CSS: canvas == glutReshapeFunc == CSS specific size", target_size); + char css_width[16], css_height[16]; + snprintf (css_width, 16, "%dpx", target_size.width); + snprintf (css_height, 16, "%dpx", target_size.height); + run_async_verification = 1; + test_resize_with_CSS("static", css_width, css_height); /* static, canvas is driven by CSS size */ + break; + } + case 5: { + /* mix of CSS scale and pixel size */ + target_size.width = browser_window_size.width; + target_size.height = 100; + print_size_test(test_num, "100% width, 100px height CSS: canvas == glutReshapeFunc == CSS mixed size", target_size); + run_async_verification = 1; + test_resize_with_CSS("fixed", "100%", "100px"); /* fixed, canvas width is driven by window size */ + break; + } + default: { + /* all tests complete */ + emscripten_force_exit(0); + break; + } + } } /** - * Reshape callback + * Idle callback - start tests + */ +void start_tests() { + glutIdleFunc(NULL); + run_next_test(); +} + +/** + * Reshape callback - record latest size, verify and run next test if async */ void reshape(int w, int h) { glut_reshape_size.width = w; glut_reshape_size.height = h; + + if (run_async_verification) { + run_async_verification = 0; /* Only one verification per test */ + verify_test_and_run_next(); + } } int main(int argc, char *argv[]) { - /* Make glut initial canvas size be 1/2 of browser window */ get_browser_window_size(&browser_window_size.width, &browser_window_size.height); + + /* Make glut initial canvas size be 1/2 of browser window */ glut_init_size.width = browser_window_size.width / 2; glut_init_size.height = browser_window_size.height / 2; @@ -137,7 +198,7 @@ int main(int argc, char *argv[]) { glutCreateWindow("test_glut_resize.c"); /* Set up glut callback functions */ - glutIdleFunc(run_tests); + glutIdleFunc(start_tests); glutReshapeFunc(reshape); glutDisplayFunc(NULL); From 0e615f9b59d7836103303ff355ae1760b046e8e8 Mon Sep 17 00:00:00 2001 From: erik-larsen Date: Thu, 17 Jul 2025 14:38:36 -0400 Subject: [PATCH 04/13] Fix for 64-bit CI assert, use int32_t for all sizes in test code --- test/browser/test_glut_resize.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/browser/test_glut_resize.c b/test/browser/test_glut_resize.c index 08c3eb03aebfe..a6036f8f778b9 100644 --- a/test/browser/test_glut_resize.c +++ b/test/browser/test_glut_resize.c @@ -7,12 +7,13 @@ #include #include +#include #include #include typedef struct { - int width; - int height; + int32_t width; + int32_t height; } rect_size_t; static rect_size_t browser_window_size = { 0, 0 }; @@ -47,18 +48,18 @@ int equal_size(rect_size_t rect_1, rect_size_t rect_2) { /** * Obtain various dimensions */ -EM_JS(void, get_browser_window_size, (int* width, int* height), { +EM_JS(void, get_browser_window_size, (int32_t* width, int32_t* height), { setValue(width, window.innerWidth, 'i32'); setValue(height, window.innerHeight, 'i32'); }); -EM_JS(void, get_canvas_client_size, (int* width, int* height), { +EM_JS(void, get_canvas_client_size, (int32_t* width, int32_t* height), { const canvas = Module.canvas; setValue(width, canvas.clientWidth, 'i32'); setValue(height, canvas.clientHeight, 'i32'); }); -EM_JS(void, get_canvas_size, (int* width, int* height), { +EM_JS(void, get_canvas_size, (int32_t* width, int32_t* height), { const canvas = Module.canvas; setValue(width, canvas.width, 'i32'); setValue(height, canvas.height, 'i32'); @@ -176,8 +177,8 @@ void start_tests() { * Reshape callback - record latest size, verify and run next test if async */ void reshape(int w, int h) { - glut_reshape_size.width = w; - glut_reshape_size.height = h; + glut_reshape_size.width = (int32_t)w; + glut_reshape_size.height = (int32_t)h; if (run_async_verification) { run_async_verification = 0; /* Only one verification per test */ From 476594e2a944b4fde75cfa4e17fd8a79d41141db Mon Sep 17 00:00:00 2001 From: erik-larsen Date: Mon, 21 Jul 2025 15:08:13 -0400 Subject: [PATCH 05/13] Add newline at EOF --- test/browser/test_glut_resize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/browser/test_glut_resize.c b/test/browser/test_glut_resize.c index a6036f8f778b9..fdcae60b9efdf 100644 --- a/test/browser/test_glut_resize.c +++ b/test/browser/test_glut_resize.c @@ -205,4 +205,4 @@ int main(int argc, char *argv[]) { glutMainLoop(); return 0; -} \ No newline at end of file +} From da2632636eab5288148b15e1f9fa32436f2e0b29 Mon Sep 17 00:00:00 2001 From: erik-larsen Date: Mon, 21 Jul 2025 19:16:25 -0400 Subject: [PATCH 06/13] Comment about initial onResize call on glutMainLoop startup --- src/lib/libglut.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/libglut.js b/src/lib/libglut.js index c85783d2ae42d..b8f9e5c40304f 100644 --- a/src/lib/libglut.js +++ b/src/lib/libglut.js @@ -648,6 +648,7 @@ var LibraryGLUT = { glutMainLoop__proxy: 'sync', glutMainLoop__deps: ['$GLUT', 'glutPostRedisplay'], glutMainLoop: () => { + // Do an initial resize, since there's no window resize event on startup GLUT.onResize(); _glutPostRedisplay(); throw 'unwind'; From 75bbf019b2932d2fe475f75fa80b90dcd1103e39 Mon Sep 17 00:00:00 2001 From: erik-larsen Date: Fri, 25 Jul 2025 13:29:16 -0400 Subject: [PATCH 07/13] Automatic rebaseline of codesize expectations. NFC This is an automatic change generated by tools/maint/rebaseline_tests.py. The following (9) test expectation files were updated by running the tests with `--rebaseline`: ``` code_size/test_codesize_cxx_ctors1.json: 149256 => 149232 [-24 bytes / -0.02%] code_size/test_codesize_cxx_ctors2.json: 148662 => 148638 [-24 bytes / -0.02%] code_size/test_codesize_cxx_except.json: 194695 => 194671 [-24 bytes / -0.01%] code_size/test_codesize_cxx_mangle.json: 258786 => 258762 [-24 bytes / -0.01%] code_size/test_codesize_cxx_noexcept.json: 151674 => 151650 [-24 bytes / -0.02%] code_size/test_codesize_cxx_wasmfs.json: 176935 => 176911 [-24 bytes / -0.01%] code_size/test_codesize_hello_O0.json: 37467 => 37453 [-14 bytes / -0.04%] code_size/test_codesize_hello_dylink_all.json: 844590 => 844684 [+94 bytes / +0.01%] code_size/test_unoptimized_code_size.json: 175109 => 175067 [-42 bytes / -0.02%] Average change: -0.01% (-0.04% - +0.01%) ``` --- test/code_size/test_codesize_cxx_ctors1.json | 8 ++++---- test/code_size/test_codesize_cxx_ctors2.json | 8 ++++---- test/code_size/test_codesize_cxx_except.json | 8 ++++---- test/code_size/test_codesize_cxx_mangle.json | 8 ++++---- test/code_size/test_codesize_cxx_noexcept.json | 8 ++++---- test/code_size/test_codesize_cxx_wasmfs.json | 8 ++++---- test/code_size/test_codesize_hello_O0.json | 8 ++++---- .../test_codesize_hello_dylink_all.json | 6 +++--- test/code_size/test_unoptimized_code_size.json | 16 ++++++++-------- 9 files changed, 39 insertions(+), 39 deletions(-) diff --git a/test/code_size/test_codesize_cxx_ctors1.json b/test/code_size/test_codesize_cxx_ctors1.json index b418e3d75edb6..0ed99dc48662c 100644 --- a/test/code_size/test_codesize_cxx_ctors1.json +++ b/test/code_size/test_codesize_cxx_ctors1.json @@ -1,10 +1,10 @@ { "a.out.js": 19749, "a.out.js.gz": 8155, - "a.out.nodebug.wasm": 129507, - "a.out.nodebug.wasm.gz": 49234, - "total": 149256, - "total_gz": 57389, + "a.out.nodebug.wasm": 129483, + "a.out.nodebug.wasm.gz": 49230, + "total": 149232, + "total_gz": 57385, "sent": [ "__cxa_throw", "_abort_js", diff --git a/test/code_size/test_codesize_cxx_ctors2.json b/test/code_size/test_codesize_cxx_ctors2.json index 801e681f113d7..835d1f4613898 100644 --- a/test/code_size/test_codesize_cxx_ctors2.json +++ b/test/code_size/test_codesize_cxx_ctors2.json @@ -1,10 +1,10 @@ { "a.out.js": 19727, "a.out.js.gz": 8145, - "a.out.nodebug.wasm": 128935, - "a.out.nodebug.wasm.gz": 48881, - "total": 148662, - "total_gz": 57026, + "a.out.nodebug.wasm": 128911, + "a.out.nodebug.wasm.gz": 48876, + "total": 148638, + "total_gz": 57021, "sent": [ "__cxa_throw", "_abort_js", diff --git a/test/code_size/test_codesize_cxx_except.json b/test/code_size/test_codesize_cxx_except.json index 751caf61a7398..5c07f1bba92da 100644 --- a/test/code_size/test_codesize_cxx_except.json +++ b/test/code_size/test_codesize_cxx_except.json @@ -1,10 +1,10 @@ { "a.out.js": 23410, "a.out.js.gz": 9146, - "a.out.nodebug.wasm": 171285, - "a.out.nodebug.wasm.gz": 57342, - "total": 194695, - "total_gz": 66488, + "a.out.nodebug.wasm": 171261, + "a.out.nodebug.wasm.gz": 57337, + "total": 194671, + "total_gz": 66483, "sent": [ "__cxa_begin_catch", "__cxa_end_catch", diff --git a/test/code_size/test_codesize_cxx_mangle.json b/test/code_size/test_codesize_cxx_mangle.json index 90eb863f19f07..c8b13e2431068 100644 --- a/test/code_size/test_codesize_cxx_mangle.json +++ b/test/code_size/test_codesize_cxx_mangle.json @@ -1,10 +1,10 @@ { "a.out.js": 23460, "a.out.js.gz": 9162, - "a.out.nodebug.wasm": 235326, - "a.out.nodebug.wasm.gz": 78948, - "total": 258786, - "total_gz": 88110, + "a.out.nodebug.wasm": 235302, + "a.out.nodebug.wasm.gz": 78943, + "total": 258762, + "total_gz": 88105, "sent": [ "__cxa_begin_catch", "__cxa_end_catch", diff --git a/test/code_size/test_codesize_cxx_noexcept.json b/test/code_size/test_codesize_cxx_noexcept.json index 535c8e4f2c4e2..01a0bfa96e41c 100644 --- a/test/code_size/test_codesize_cxx_noexcept.json +++ b/test/code_size/test_codesize_cxx_noexcept.json @@ -1,10 +1,10 @@ { "a.out.js": 19749, "a.out.js.gz": 8155, - "a.out.nodebug.wasm": 131925, - "a.out.nodebug.wasm.gz": 50235, - "total": 151674, - "total_gz": 58390, + "a.out.nodebug.wasm": 131901, + "a.out.nodebug.wasm.gz": 50226, + "total": 151650, + "total_gz": 58381, "sent": [ "__cxa_throw", "_abort_js", diff --git a/test/code_size/test_codesize_cxx_wasmfs.json b/test/code_size/test_codesize_cxx_wasmfs.json index 5fe98825acf2d..2af06a51f1719 100644 --- a/test/code_size/test_codesize_cxx_wasmfs.json +++ b/test/code_size/test_codesize_cxx_wasmfs.json @@ -1,10 +1,10 @@ { "a.out.js": 7138, "a.out.js.gz": 3337, - "a.out.nodebug.wasm": 169797, - "a.out.nodebug.wasm.gz": 63081, - "total": 176935, - "total_gz": 66418, + "a.out.nodebug.wasm": 169773, + "a.out.nodebug.wasm.gz": 63074, + "total": 176911, + "total_gz": 66411, "sent": [ "__cxa_throw", "_abort_js", diff --git a/test/code_size/test_codesize_hello_O0.json b/test/code_size/test_codesize_hello_O0.json index e00020d494f68..ffbe5e9449c14 100644 --- a/test/code_size/test_codesize_hello_O0.json +++ b/test/code_size/test_codesize_hello_O0.json @@ -1,10 +1,10 @@ { "a.out.js": 22324, "a.out.js.gz": 8300, - "a.out.nodebug.wasm": 15143, - "a.out.nodebug.wasm.gz": 7452, - "total": 37467, - "total_gz": 15752, + "a.out.nodebug.wasm": 15129, + "a.out.nodebug.wasm.gz": 7440, + "total": 37453, + "total_gz": 15740, "sent": [ "fd_write" ], diff --git a/test/code_size/test_codesize_hello_dylink_all.json b/test/code_size/test_codesize_hello_dylink_all.json index 5fb028c0dec2e..d6fb019d69741 100644 --- a/test/code_size/test_codesize_hello_dylink_all.json +++ b/test/code_size/test_codesize_hello_dylink_all.json @@ -1,7 +1,7 @@ { - "a.out.js": 246735, - "a.out.nodebug.wasm": 597855, - "total": 844590, + "a.out.js": 246847, + "a.out.nodebug.wasm": 597837, + "total": 844684, "sent": [ "IMG_Init", "IMG_Load", diff --git a/test/code_size/test_unoptimized_code_size.json b/test/code_size/test_unoptimized_code_size.json index a5686154343b1..760dfc0215e75 100644 --- a/test/code_size/test_unoptimized_code_size.json +++ b/test/code_size/test_unoptimized_code_size.json @@ -1,16 +1,16 @@ { "hello_world.js": 53916, "hello_world.js.gz": 17076, - "hello_world.wasm": 15143, - "hello_world.wasm.gz": 7452, + "hello_world.wasm": 15129, + "hello_world.wasm.gz": 7440, "no_asserts.js": 26714, "no_asserts.js.gz": 8952, - "no_asserts.wasm": 12227, - "no_asserts.wasm.gz": 6008, + "no_asserts.wasm": 12213, + "no_asserts.wasm.gz": 5996, "strict.js": 51966, "strict.js.gz": 16409, - "strict.wasm": 15143, - "strict.wasm.gz": 7438, - "total": 175109, - "total_gz": 63335 + "strict.wasm": 15129, + "strict.wasm.gz": 7426, + "total": 175067, + "total_gz": 63299 } From 6a1a664407a9a834d099176986e7bf9674c68ee0 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 29 Jul 2025 09:35:48 -0700 Subject: [PATCH 08/13] Update test expectations --- test/code_size/test_codesize_cxx_ctors1.json | 8 ++++---- test/code_size/test_codesize_cxx_ctors2.json | 8 ++++---- test/code_size/test_codesize_cxx_except.json | 8 ++++---- test/code_size/test_codesize_cxx_mangle.json | 8 ++++---- test/code_size/test_codesize_cxx_noexcept.json | 8 ++++---- test/code_size/test_codesize_cxx_wasmfs.json | 8 ++++---- test/code_size/test_codesize_hello_O0.json | 8 ++++---- .../test_codesize_hello_dylink_all.json | 4 ++-- test/code_size/test_unoptimized_code_size.json | 16 ++++++++-------- 9 files changed, 38 insertions(+), 38 deletions(-) diff --git a/test/code_size/test_codesize_cxx_ctors1.json b/test/code_size/test_codesize_cxx_ctors1.json index 0ed99dc48662c..b418e3d75edb6 100644 --- a/test/code_size/test_codesize_cxx_ctors1.json +++ b/test/code_size/test_codesize_cxx_ctors1.json @@ -1,10 +1,10 @@ { "a.out.js": 19749, "a.out.js.gz": 8155, - "a.out.nodebug.wasm": 129483, - "a.out.nodebug.wasm.gz": 49230, - "total": 149232, - "total_gz": 57385, + "a.out.nodebug.wasm": 129507, + "a.out.nodebug.wasm.gz": 49234, + "total": 149256, + "total_gz": 57389, "sent": [ "__cxa_throw", "_abort_js", diff --git a/test/code_size/test_codesize_cxx_ctors2.json b/test/code_size/test_codesize_cxx_ctors2.json index 835d1f4613898..801e681f113d7 100644 --- a/test/code_size/test_codesize_cxx_ctors2.json +++ b/test/code_size/test_codesize_cxx_ctors2.json @@ -1,10 +1,10 @@ { "a.out.js": 19727, "a.out.js.gz": 8145, - "a.out.nodebug.wasm": 128911, - "a.out.nodebug.wasm.gz": 48876, - "total": 148638, - "total_gz": 57021, + "a.out.nodebug.wasm": 128935, + "a.out.nodebug.wasm.gz": 48881, + "total": 148662, + "total_gz": 57026, "sent": [ "__cxa_throw", "_abort_js", diff --git a/test/code_size/test_codesize_cxx_except.json b/test/code_size/test_codesize_cxx_except.json index 5c07f1bba92da..751caf61a7398 100644 --- a/test/code_size/test_codesize_cxx_except.json +++ b/test/code_size/test_codesize_cxx_except.json @@ -1,10 +1,10 @@ { "a.out.js": 23410, "a.out.js.gz": 9146, - "a.out.nodebug.wasm": 171261, - "a.out.nodebug.wasm.gz": 57337, - "total": 194671, - "total_gz": 66483, + "a.out.nodebug.wasm": 171285, + "a.out.nodebug.wasm.gz": 57342, + "total": 194695, + "total_gz": 66488, "sent": [ "__cxa_begin_catch", "__cxa_end_catch", diff --git a/test/code_size/test_codesize_cxx_mangle.json b/test/code_size/test_codesize_cxx_mangle.json index c8b13e2431068..90eb863f19f07 100644 --- a/test/code_size/test_codesize_cxx_mangle.json +++ b/test/code_size/test_codesize_cxx_mangle.json @@ -1,10 +1,10 @@ { "a.out.js": 23460, "a.out.js.gz": 9162, - "a.out.nodebug.wasm": 235302, - "a.out.nodebug.wasm.gz": 78943, - "total": 258762, - "total_gz": 88105, + "a.out.nodebug.wasm": 235326, + "a.out.nodebug.wasm.gz": 78948, + "total": 258786, + "total_gz": 88110, "sent": [ "__cxa_begin_catch", "__cxa_end_catch", diff --git a/test/code_size/test_codesize_cxx_noexcept.json b/test/code_size/test_codesize_cxx_noexcept.json index 01a0bfa96e41c..535c8e4f2c4e2 100644 --- a/test/code_size/test_codesize_cxx_noexcept.json +++ b/test/code_size/test_codesize_cxx_noexcept.json @@ -1,10 +1,10 @@ { "a.out.js": 19749, "a.out.js.gz": 8155, - "a.out.nodebug.wasm": 131901, - "a.out.nodebug.wasm.gz": 50226, - "total": 151650, - "total_gz": 58381, + "a.out.nodebug.wasm": 131925, + "a.out.nodebug.wasm.gz": 50235, + "total": 151674, + "total_gz": 58390, "sent": [ "__cxa_throw", "_abort_js", diff --git a/test/code_size/test_codesize_cxx_wasmfs.json b/test/code_size/test_codesize_cxx_wasmfs.json index 2af06a51f1719..5fe98825acf2d 100644 --- a/test/code_size/test_codesize_cxx_wasmfs.json +++ b/test/code_size/test_codesize_cxx_wasmfs.json @@ -1,10 +1,10 @@ { "a.out.js": 7138, "a.out.js.gz": 3337, - "a.out.nodebug.wasm": 169773, - "a.out.nodebug.wasm.gz": 63074, - "total": 176911, - "total_gz": 66411, + "a.out.nodebug.wasm": 169797, + "a.out.nodebug.wasm.gz": 63081, + "total": 176935, + "total_gz": 66418, "sent": [ "__cxa_throw", "_abort_js", diff --git a/test/code_size/test_codesize_hello_O0.json b/test/code_size/test_codesize_hello_O0.json index ffbe5e9449c14..e00020d494f68 100644 --- a/test/code_size/test_codesize_hello_O0.json +++ b/test/code_size/test_codesize_hello_O0.json @@ -1,10 +1,10 @@ { "a.out.js": 22324, "a.out.js.gz": 8300, - "a.out.nodebug.wasm": 15129, - "a.out.nodebug.wasm.gz": 7440, - "total": 37453, - "total_gz": 15740, + "a.out.nodebug.wasm": 15143, + "a.out.nodebug.wasm.gz": 7452, + "total": 37467, + "total_gz": 15752, "sent": [ "fd_write" ], diff --git a/test/code_size/test_codesize_hello_dylink_all.json b/test/code_size/test_codesize_hello_dylink_all.json index d6fb019d69741..1569ae8d1d823 100644 --- a/test/code_size/test_codesize_hello_dylink_all.json +++ b/test/code_size/test_codesize_hello_dylink_all.json @@ -1,7 +1,7 @@ { "a.out.js": 246847, - "a.out.nodebug.wasm": 597837, - "total": 844684, + "a.out.nodebug.wasm": 597855, + "total": 844702, "sent": [ "IMG_Init", "IMG_Load", diff --git a/test/code_size/test_unoptimized_code_size.json b/test/code_size/test_unoptimized_code_size.json index 760dfc0215e75..a5686154343b1 100644 --- a/test/code_size/test_unoptimized_code_size.json +++ b/test/code_size/test_unoptimized_code_size.json @@ -1,16 +1,16 @@ { "hello_world.js": 53916, "hello_world.js.gz": 17076, - "hello_world.wasm": 15129, - "hello_world.wasm.gz": 7440, + "hello_world.wasm": 15143, + "hello_world.wasm.gz": 7452, "no_asserts.js": 26714, "no_asserts.js.gz": 8952, - "no_asserts.wasm": 12213, - "no_asserts.wasm.gz": 5996, + "no_asserts.wasm": 12227, + "no_asserts.wasm.gz": 6008, "strict.js": 51966, "strict.js.gz": 16409, - "strict.wasm": 15129, - "strict.wasm.gz": 7426, - "total": 175067, - "total_gz": 63299 + "strict.wasm": 15143, + "strict.wasm.gz": 7438, + "total": 175109, + "total_gz": 63335 } From bcbf2f2db6d7454e0111ed7a89c62772e54994fa Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 29 Jul 2025 09:37:33 -0700 Subject: [PATCH 09/13] Strip whitespace --- test/browser/test_glut_resize.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/browser/test_glut_resize.c b/test/browser/test_glut_resize.c index fdcae60b9efdf..5ec461d1a033c 100644 --- a/test/browser/test_glut_resize.c +++ b/test/browser/test_glut_resize.c @@ -21,19 +21,19 @@ static rect_size_t glut_init_size = { 0, 0 }; static rect_size_t glut_reshape_size = { 0, 0 }; static rect_size_t target_size = { 0, 0 }; -/* +/* * Set run_async_verification to 0 for sync test cases, and 1 for async tests. * * Callback sequence for test case 1 & 2 (synchronous): * glutMainLoop -> GLUT.onSize -> Browser.setCanvasSize -> updateResizeListeners -> GLUT.reshapeFunc * glutResizeWindow -> Browser.setCanvasSize -> updateResizeListeners -> GLUT.reshapeFunc - * + * * Callback sequence for test cases 3-5 (async): * window resize -> async update -> GLUT.onSize -> Browser.setCanvasSize -> updateResizeListeners -> GLUT.reshapeFunc - * + * * Because window resize does not immediately call GLUT.onSize, we wait to run verification of a test until we get * confirmation in GLUT.reshapeFunc. And after verification is done, we move on to the next test. - * + * */ static int run_async_verification = 0; @@ -73,7 +73,7 @@ EM_JS(void, test_resize_with_CSS, (const char* position, const char* width, cons canvas.style.position = UTF8ToString(position); canvas.style.width = UTF8ToString(width); canvas.style.height = UTF8ToString(height); - + window.dispatchEvent(new UIEvent('resize')); }); @@ -132,7 +132,7 @@ void run_next_test() { /* 100% scale CSS */ target_size = browser_window_size; print_size_test(test_num, "100% window scale CSS: canvas == glutReshapeFunc == browser window size", target_size); - run_async_verification = 1; + run_async_verification = 1; test_resize_with_CSS("fixed", "100%", "100%"); /* fixed, so canvas is driven by window size */ break; } @@ -144,7 +144,7 @@ void run_next_test() { char css_width[16], css_height[16]; snprintf (css_width, 16, "%dpx", target_size.width); snprintf (css_height, 16, "%dpx", target_size.height); - run_async_verification = 1; + run_async_verification = 1; test_resize_with_CSS("static", css_width, css_height); /* static, canvas is driven by CSS size */ break; } @@ -153,7 +153,7 @@ void run_next_test() { target_size.width = browser_window_size.width; target_size.height = 100; print_size_test(test_num, "100% width, 100px height CSS: canvas == glutReshapeFunc == CSS mixed size", target_size); - run_async_verification = 1; + run_async_verification = 1; test_resize_with_CSS("fixed", "100%", "100px"); /* fixed, canvas width is driven by window size */ break; } @@ -192,7 +192,7 @@ int main(int argc, char *argv[]) { /* Make glut initial canvas size be 1/2 of browser window */ glut_init_size.width = browser_window_size.width / 2; glut_init_size.height = browser_window_size.height / 2; - + glutInit(&argc, argv); glutInitWindowSize(glut_init_size.width, glut_init_size.height); glutInitDisplayMode(GLUT_RGB); From 5ed8573ba88964019c47419ba320fa253ea60b77 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 29 Jul 2025 14:59:32 -0700 Subject: [PATCH 10/13] fix wasm64 --- test/browser/test_glut_resize.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/browser/test_glut_resize.c b/test/browser/test_glut_resize.c index 5ec461d1a033c..8cc9eb52af06d 100644 --- a/test/browser/test_glut_resize.c +++ b/test/browser/test_glut_resize.c @@ -49,20 +49,20 @@ int equal_size(rect_size_t rect_1, rect_size_t rect_2) { * Obtain various dimensions */ EM_JS(void, get_browser_window_size, (int32_t* width, int32_t* height), { - setValue(width, window.innerWidth, 'i32'); - setValue(height, window.innerHeight, 'i32'); + setValue(Number(width), window.innerWidth, 'i32'); + setValue(Number(height), window.innerHeight, 'i32'); }); EM_JS(void, get_canvas_client_size, (int32_t* width, int32_t* height), { const canvas = Module.canvas; - setValue(width, canvas.clientWidth, 'i32'); - setValue(height, canvas.clientHeight, 'i32'); + setValue(Number(width), canvas.clientWidth, 'i32'); + setValue(Number(height), canvas.clientHeight, 'i32'); }); EM_JS(void, get_canvas_size, (int32_t* width, int32_t* height), { const canvas = Module.canvas; - setValue(width, canvas.width, 'i32'); - setValue(height, canvas.height, 'i32'); + setValue(Number(width), canvas.width, 'i32'); + setValue(Number(height), canvas.height, 'i32'); }); /** From 6657b98ba3ed6c89e3834bf79643038e6c189dfe Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 29 Jul 2025 16:25:18 -0700 Subject: [PATCH 11/13] more wasm64 fixes --- test/browser/test_glut_resize.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/browser/test_glut_resize.c b/test/browser/test_glut_resize.c index 8cc9eb52af06d..f8d568cc75d6d 100644 --- a/test/browser/test_glut_resize.c +++ b/test/browser/test_glut_resize.c @@ -70,9 +70,9 @@ EM_JS(void, get_canvas_size, (int32_t* width, int32_t* height), { */ EM_JS(void, test_resize_with_CSS, (const char* position, const char* width, const char* height), { const canvas = Module.canvas; - canvas.style.position = UTF8ToString(position); - canvas.style.width = UTF8ToString(width); - canvas.style.height = UTF8ToString(height); + canvas.style.position = UTF8ToString(Number(position)); + canvas.style.width = UTF8ToString(Number(width)); + canvas.style.height = UTF8ToString(Number(height)); window.dispatchEvent(new UIEvent('resize')); }); From 51f963843417f0108205c1cb739625253c22901b Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 29 Jul 2025 16:46:32 -0700 Subject: [PATCH 12/13] rebaseline --- test/code_size/test_codesize_hello_dylink_all.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/code_size/test_codesize_hello_dylink_all.json b/test/code_size/test_codesize_hello_dylink_all.json index 1569ae8d1d823..fdcc2515565ed 100644 --- a/test/code_size/test_codesize_hello_dylink_all.json +++ b/test/code_size/test_codesize_hello_dylink_all.json @@ -1,7 +1,7 @@ { "a.out.js": 246847, - "a.out.nodebug.wasm": 597855, - "total": 844702, + "a.out.nodebug.wasm": 597848, + "total": 844695, "sent": [ "IMG_Init", "IMG_Load", From ae81a124e9b945125a54f5706a82ef1c5029be97 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 30 Jul 2025 15:15:41 -0700 Subject: [PATCH 13/13] rebase --- test/code_size/test_codesize_hello_dylink_all.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/code_size/test_codesize_hello_dylink_all.json b/test/code_size/test_codesize_hello_dylink_all.json index fdcc2515565ed..5be31a28cbd31 100644 --- a/test/code_size/test_codesize_hello_dylink_all.json +++ b/test/code_size/test_codesize_hello_dylink_all.json @@ -1,7 +1,7 @@ { "a.out.js": 246847, - "a.out.nodebug.wasm": 597848, - "total": 844695, + "a.out.nodebug.wasm": 597852, + "total": 844699, "sent": [ "IMG_Init", "IMG_Load",