optimization

This commit is contained in:
2026-07-18 10:06:53 +05:00
parent 7d91df3c6b
commit 2c166a40e3
7 changed files with 108 additions and 121 deletions

View File

@@ -117,7 +117,7 @@ int main(int argc, char **argv)
.height = height,
.fps = 10,
.transparent = opaque ? 0 : 1,
/* GPU rendering must still use the private Xvfb and produce a frame. */
/* GPU rendering must still produce an invisible captured frame. */
.hardware_acceleration = 1,
.url_length = (uint32_t)strlen(url),
.css_length = (uint32_t)strlen(css),
@@ -179,8 +179,11 @@ int main(int argc, char **argv)
munmap(shared, shared_size);
close(shared_fd);
kill(child, SIGTERM);
while (waitpid(child, NULL, 0) < 0 && errno == EINTR) {
int child_status = 0;
while (waitpid(child, &child_status, 0) < 0 && errno == EINTR) {
}
if (WIFEXITED(child_status) && WEXITSTATUS(child_status) == 5)
return 77;
if (!found_red) {
if (external_url) {
fprintf(stderr, "renderer kept the external page uniformly colored: %s\n", url);