mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 00:15:46 -07:00
Add USE_DRAW_POLYGON_FALLBACK build option for testing.
This new option, when enabled, forces the in-tree front ends (Emcscripten, GTK, NestedVM, OS X, and Windows) to use the recently introduced draw_polygon_fallback() in place of their native draw_poly(). This will enable easy testing of this function in the future. This new option is off by default. To enable it, run CMake as: $ cmake -DUSE_DRAW_POLYGON_FALLBACK=on Note that I did _not_ update the Postscript frontend (ps.c) to use this new option, as I don't think draw_polygon_fallback() would work at all in Postscript, where the drawing units are no longer guaranteed to be pixels. The envisioned use case for this option is a developer testing changes to this function for sanity and/or performance, which I only foresee happening on a standard GUI front end.
This commit is contained in:

committed by
Simon Tatham

parent
989df5d2bf
commit
a8b544d2aa
@ -9,6 +9,11 @@ set(build_icons FALSE)
|
||||
set(need_c_icons FALSE)
|
||||
option(BUILD_SDL_PROGRAMS "build test programs requiring SDL" FALSE)
|
||||
|
||||
option(USE_DRAW_POLYGON_FALLBACK "force frontend to use fallback software polygon rasterizer" off)
|
||||
if(USE_DRAW_POLYGON_FALLBACK)
|
||||
add_compile_definitions(USE_DRAW_POLYGON_FALLBACK)
|
||||
endif()
|
||||
|
||||
# Don't disable assertions, even in release mode. Our assertions
|
||||
# generally aren't expensive and protect against more annoying crashes
|
||||
# and memory corruption.
|
||||
|
Reference in New Issue
Block a user