Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
WindowContextFactory_unix.h
Go to the documentation of this file.
1
2/*
3 * Copyright 2016 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9#ifndef WindowContextFactory_unix_DEFINED
10#define WindowContextFactory_unix_DEFINED
11
12// webgpu_cpp.h and X.h don't get along. Include this first, before X11 defines None, Success etc.
13#ifdef SK_DAWN
14#include "webgpu/webgpu_cpp.h" // NO_G3_REWRITE
15#endif
16#include <X11/Xlib.h>
17#include <GL/glx.h>
18
19#include <memory>
20
22
23namespace skwindow {
24
25class WindowContext;
26struct DisplayParams;
27
29 Display* fDisplay;
31 GLXFBConfig* fFBConfig;
32 XVisualInfo* fVisualInfo;
33 int fWidth;
35};
36
37#ifdef SK_VULKAN
38std::unique_ptr<WindowContext> MakeVulkanForXlib(const XlibWindowInfo&, const DisplayParams&);
39#if defined(SK_GRAPHITE)
40std::unique_ptr<WindowContext> MakeGraphiteVulkanForXlib(const XlibWindowInfo&,
41 const DisplayParams&);
42#endif
43#endif
44
45#ifdef SK_GL
46std::unique_ptr<WindowContext> MakeGLForXlib(const XlibWindowInfo&, const DisplayParams&);
47#endif
48
49#if defined(SK_DAWN) && defined(SK_GRAPHITE)
50std::unique_ptr<WindowContext> MakeGraphiteDawnVulkanForXlib(const XlibWindowInfo&,
51 const DisplayParams&);
52#endif
53
54std::unique_ptr<WindowContext> MakeRasterForXlib(const XlibWindowInfo&, const DisplayParams&);
55
56} // namespace skwindow
57
58#endif
Window XWindow
std::unique_ptr< WindowContext > MakeGraphiteVulkanForXlib(const XlibWindowInfo &info, const DisplayParams &displayParams)
std::unique_ptr< WindowContext > MakeRasterForXlib(const XlibWindowInfo &info, const DisplayParams &params)
std::unique_ptr< WindowContext > MakeVulkanForXlib(const XlibWindowInfo &info, const DisplayParams &displayParams)