-- render.lua -- paint the cell-grid test pattern and snapshot the window. The -- PNG is the evidence render.sh keeps. local dir = (debug.getinfo(1, "S").source:gsub("^@", ""):match("^(.*)/") or ".") local H = dofile(dir .. "/harness.lua") local RENDER_MARK = tonumber(os.getenv("RENDER_MARK") or "0x01A08000") local X11P = tonumber(os.getenv("X11_PROGRESS") or "0") H.result_dump(function() print(string.format("RENDER: magic=%08X dpy=%08X win=%08X gc=%08X flus=%08X progress=%08X", H.r32(RENDER_MARK), H.r32(RENDER_MARK + 0x20), H.r32(RENDER_MARK + 0x40), H.r32(RENDER_MARK + 0x60), H.r32(RENDER_MARK + 0x80), X11P ~= 0 and H.r32(X11P) or 0)) print(string.format("RENDER: pending=%d", H.r32(RENDER_MARK + 0xA0))) end) H.run()