| 107 | // #define TRANSFER_TO_CHAINED_THREAD_FROM_MAIN_THREAD |
| 108 | |
| 109 | int main() |
| 110 | { |
| 111 | #ifdef TEST_CHAINED_WEBGL_CONTEXT_PASSING |
| 112 | pthread_attr_t attr; |
| 113 | pthread_attr_init(&attr); |
| 114 | #ifndef TRANSFER_TO_CHAINED_THREAD_FROM_MAIN_THREAD |
| 115 | emscripten_pthread_attr_settransferredcanvases(&attr, "#canvas"); |
| 116 | #endif |
| 117 | int rc = pthread_create(&thread, &attr, mymain, 0); |
| 118 | if (rc == ENOSYS) |
| 119 | { |
| 120 | printf("Test Skipped! OffscreenCanvas is not supported!\n"); |
| 121 | #ifdef REPORT_RESULT |
| 122 | REPORT_RESULT(1); // But report success, so that runs on non-supporting browsers don't raise noisy errors. |
| 123 | #endif |
| 124 | exit(0); |
| 125 | } |
| 126 | emscripten_exit_with_live_runtime(); |
| 127 | #else |
| 128 | mymain(0); |
| 129 | #endif |
| 130 | return 0; |
| 131 | } |
nothing calls this directly
no test coverage detected