Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dummy emscripten_set_offscreencanvas_size. NFC #23279

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/library_html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -2297,8 +2297,6 @@ var LibraryHTML5 = {
},

#if OFFSCREENCANVAS_SUPPORT
_emscripten_set_offscreencanvas_size: 'emscripten_set_canvas_element_size',

$setOffscreenCanvasSizeOnTargetThread__deps: ['$stringToNewUTF8', '_emscripten_set_offscreencanvas_size_on_thread'],
$setOffscreenCanvasSizeOnTargetThread: (targetThread, targetCanvas, width, height) => {
targetCanvas = targetCanvas ? UTF8ToString(targetCanvas) : '';
Expand Down Expand Up @@ -2414,15 +2412,6 @@ var LibraryHTML5 = {
},
#endif

#if !PTHREADS || !OFFSCREENCANVAS_SUPPORT
_emscripten_set_offscreencanvas_size: (target, width, height) => {
#if ASSERTIONS
err('emscripten_set_offscreencanvas_size: Build with -sOFFSCREENCANVAS_SUPPORT=1 to enable transferring canvases to pthreads.');
#endif
return {{{ cDefs.EMSCRIPTEN_RESULT_NOT_SUPPORTED }}};
},
#endif

// JavaScript-friendly API, returns pair [width, height]
$getCanvasElementSize__deps: ['emscripten_get_canvas_element_size', '$stackSave', '$stackRestore', '$stringToUTF8OnStack'],
$getCanvasElementSize: (target) => {
Expand Down
1 change: 0 additions & 1 deletion src/library_sigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ sigs = {
_emscripten_push_uncounted_main_loop_blocker__sig: 'vppp',
_emscripten_receive_on_main_thread_js__sig: 'dippip',
_emscripten_runtime_keepalive_clear__sig: 'v',
_emscripten_set_offscreencanvas_size__sig: 'ipii',
_emscripten_system__sig: 'ip',
_emscripten_thread_cleanup__sig: 'vp',
_emscripten_thread_exit_joinable__sig: 'vp',
Expand Down
2 changes: 1 addition & 1 deletion system/lib/html5/offscreencanvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ typedef struct set_cavas_size_t {

static void do_set_size(void* arg) {
set_cavas_size_t* args = (set_cavas_size_t*)arg;
_emscripten_set_offscreencanvas_size(args->target, args->width, args->height);
emscripten_set_canvas_element_size(args->target, args->width, args->height);
free((char *) args->target);
free(arg);
}
Expand Down
2 changes: 0 additions & 2 deletions system/lib/libc/emscripten_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ size_t _emscripten_fetch_get_response_headers_length(int32_t fetchID);
size_t _emscripten_fetch_get_response_headers(int32_t fetchID, char *dst, size_t dstSizeBytes);
void _emscripten_fetch_free(unsigned int);

EMSCRIPTEN_RESULT _emscripten_set_offscreencanvas_size(const char *target, int width, int height);

// Internal implementation function in JavaScript side that emscripten_create_wasm_worker() calls to
// to perform the wasm worker creation.
emscripten_wasm_worker_t _emscripten_create_wasm_worker(void *stackLowestAddress, uint32_t stackSize);
Expand Down
Loading