Context.h 554 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2023, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Assertions.h>
  8. #include <AK/OwnPtr.h>
  9. #ifndef AK_OS_MACOS
  10. // Make sure egl.h doesn't give us definitions from X11 headers
  11. # define EGL_NO_X11
  12. # include <EGL/egl.h>
  13. # undef EGL_NO_X11
  14. #endif
  15. namespace AccelGfx {
  16. class Context {
  17. public:
  18. static ErrorOr<NonnullOwnPtr<Context>> create();
  19. Context()
  20. {
  21. }
  22. virtual ~Context()
  23. {
  24. }
  25. virtual void activate() = 0;
  26. };
  27. }