diff options
author | Mikhail Burakov <mburakov@mailbox.org> | 2023-03-24 07:47:29 +0100 |
---|---|---|
committer | Mikhail Burakov <mburakov@mailbox.org> | 2023-03-24 07:47:29 +0100 |
commit | c26b6ef574fe2fdab1d1cd8cd4bce8fb1645e2f7 (patch) | |
tree | 6896754bcf3ed8da5eff65097a4eb3cdf38149ad /main.c | |
parent | 844143e0c6cc1efa90bd27c9aa0cade7f7dd7930 (diff) |
Precreate window buffers on surfaces allocation
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -35,18 +35,18 @@ int main(int argc, char* argv[]) { (void)argc; (void)argv; - struct AUTO(DecodeContext)* decode_context = DecodeContextCreate(); - if (!decode_context) { - LOG("Failed to create decode context"); - return EXIT_FAILURE; - } - struct AUTO(Window)* window = WindowCreate(); if (!window) { LOG("Failed to create window"); return EXIT_FAILURE; } + struct AUTO(DecodeContext)* decode_context = DecodeContextCreate(window); + if (!decode_context) { + LOG("Failed to create decode context"); + return EXIT_FAILURE; + } + int events_fd = WindowGetEventsFd(window); if (events_fd == -1) { LOG("Failed to get events fd"); @@ -84,11 +84,6 @@ int main(int argc, char* argv[]) { LOG("Failed to process window events"); return EXIT_FAILURE; } - const struct Frame* frame = DecodeContextGetFrame(decode_context); - if (frame && !WindowRenderFrame(window, frame)) { - LOG("Failed to render frame"); - return EXIT_FAILURE; - } } return EXIT_SUCCESS; |