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

Test sdl2_gl_frames_swap with PROXY_TO_PTHREAD #8282

Closed
Closed
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
14 changes: 11 additions & 3 deletions tests/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3128,15 +3128,23 @@ def test_sdl2_unwasteful(self):
def test_sdl2_canvas_write(self):
self.btest('sdl2_canvas_write.cpp', expected='0', args=['-s', 'USE_SDL=2'])

@requires_graphics_hardware
def test_sdl2_gl_frames_swap(self):
def _test_sdl2_gl_frames_swap_base(self, *args):
def post_build(*args):
self.post_manual_reftest(*args)
html = open('test.html').read()
html2 = html.replace('''Module['postRun'] = doReftest;''', '') # we don't want the very first frame
assert html != html2
create_test_file('test.html', html2)
self.btest('sdl2_gl_frames_swap.c', reference='sdl2_gl_frames_swap.png', args=['--proxy-to-worker', '-s', 'GL_TESTING=1', '-s', 'USE_SDL=2'], manual_reference=True, post_build=post_build)
self.btest('sdl2_gl_frames_swap.c', reference='sdl2_gl_frames_swap.png', args=['-s', 'GL_TESTING=1', '-s', 'USE_SDL=2'] + list(args), manual_reference=True, post_build=post_build)

@requires_graphics_hardware
def test_sdl2_gl_frames_swap_with_proxy_to_worker(self):
self._test_sdl2_gl_frames_swap_base('--proxy-to-worker')

@requires_threads
@requires_graphics_hardware
def test_sdl2_gl_frames_swap_with_proxy_to_pthread(self):
self._test_sdl2_gl_frames_swap_base('-s', 'USE_PTHREADS=1', '-s', 'PROXY_TO_PTHREAD=1')

@requires_graphics_hardware
def test_sdl2_ttf(self):
Expand Down