xref: /aosp_15_r20/external/angle/src/libANGLE/renderer/gl/gl_backend.gni (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1# Copyright 2022 The ANGLE Project Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("../../../../gni/angle.gni")
6
7declare_args() {
8  angle_enable_gl_null = true
9}
10
11gl_backend_sources = [
12  "BlitGL.cpp",
13  "BlitGL.h",
14  "BufferGL.cpp",
15  "BufferGL.h",
16  "ClearMultiviewGL.cpp",
17  "ClearMultiviewGL.h",
18  "CompilerGL.cpp",
19  "CompilerGL.h",
20  "ContextGL.cpp",
21  "ContextGL.h",
22  "DispatchTableGL_autogen.cpp",
23  "DispatchTableGL_autogen.h",
24  "DisplayGL.cpp",
25  "DisplayGL.h",
26  "FenceNVGL.cpp",
27  "FenceNVGL.h",
28  "FramebufferGL.cpp",
29  "FramebufferGL.h",
30  "FunctionsGL.cpp",
31  "FunctionsGL.h",
32  "ImageGL.cpp",
33  "ImageGL.h",
34  "MemoryObjectGL.cpp",
35  "MemoryObjectGL.h",
36  "ProgramExecutableGL.cpp",
37  "ProgramExecutableGL.h",
38  "ProgramGL.cpp",
39  "ProgramGL.h",
40  "ProgramPipelineGL.cpp",
41  "ProgramPipelineGL.h",
42  "QueryGL.cpp",
43  "QueryGL.h",
44  "RenderbufferGL.cpp",
45  "RenderbufferGL.h",
46  "RendererGL.cpp",
47  "RendererGL.h",
48  "SamplerGL.cpp",
49  "SamplerGL.h",
50  "SemaphoreGL.cpp",
51  "SemaphoreGL.h",
52  "ShaderGL.cpp",
53  "ShaderGL.h",
54  "StateManagerGL.cpp",
55  "StateManagerGL.h",
56  "SurfaceGL.cpp",
57  "SurfaceGL.h",
58  "SyncGL.cpp",
59  "SyncGL.h",
60  "TextureGL.cpp",
61  "TextureGL.h",
62  "TransformFeedbackGL.cpp",
63  "TransformFeedbackGL.h",
64  "VertexArrayGL.cpp",
65  "VertexArrayGL.h",
66  "formatutilsgl.cpp",
67  "formatutilsgl.h",
68  "functionsgl_enums.h",
69  "functionsgl_typedefs.h",
70  "renderergl_utils.cpp",
71  "renderergl_utils.h",
72]
73
74if (is_win) {
75  gl_backend_sources += [
76    "../../../third_party/khronos/GL/wglext.h",
77    "wgl/ContextWGL.cpp",
78    "wgl/ContextWGL.h",
79    "wgl/D3DTextureSurfaceWGL.cpp",
80    "wgl/D3DTextureSurfaceWGL.h",
81    "wgl/DXGISwapChainWindowSurfaceWGL.cpp",
82    "wgl/DXGISwapChainWindowSurfaceWGL.h",
83    "wgl/DisplayWGL.cpp",
84    "wgl/DisplayWGL.h",
85    "wgl/FunctionsWGL.cpp",
86    "wgl/FunctionsWGL.h",
87    "wgl/PbufferSurfaceWGL.cpp",
88    "wgl/PbufferSurfaceWGL.h",
89    "wgl/RendererWGL.cpp",
90    "wgl/RendererWGL.h",
91    "wgl/SurfaceWGL.h",
92    "wgl/WindowSurfaceWGL.cpp",
93    "wgl/WindowSurfaceWGL.h",
94    "wgl/functionswgl_typedefs.h",
95    "wgl/wgl_utils.cpp",
96    "wgl/wgl_utils.h",
97  ]
98}
99
100if (angle_use_x11) {
101  gl_backend_sources += [
102    "glx/DisplayGLX.cpp",
103    "glx/DisplayGLX.h",
104    "glx/DisplayGLX_api.h",
105    "glx/FunctionsGLX.cpp",
106    "glx/FunctionsGLX.h",
107    "glx/PbufferSurfaceGLX.cpp",
108    "glx/PbufferSurfaceGLX.h",
109    "glx/PixmapSurfaceGLX.cpp",
110    "glx/PixmapSurfaceGLX.h",
111    "glx/SurfaceGLX.h",
112    "glx/WindowSurfaceGLX.cpp",
113    "glx/WindowSurfaceGLX.h",
114    "glx/functionsglx_typedefs.h",
115    "glx/glx_utils.cpp",
116    "glx/glx_utils.h",
117    "glx/platform_glx.h",
118  ]
119}
120
121if (is_android || is_linux || is_chromeos) {
122  gl_backend_sources += [
123    "egl/ContextEGL.cpp",
124    "egl/ContextEGL.h",
125    "egl/DeviceEGL.cpp",
126    "egl/DeviceEGL.h",
127    "egl/DisplayEGL.cpp",
128    "egl/DisplayEGL.h",
129    "egl/DmaBufImageSiblingEGL.cpp",
130    "egl/DmaBufImageSiblingEGL.h",
131    "egl/ExternalImageSiblingEGL.h",
132    "egl/FunctionsEGL.cpp",
133    "egl/FunctionsEGL.h",
134    "egl/FunctionsEGLDL.cpp",
135    "egl/FunctionsEGLDL.h",
136    "egl/ImageEGL.cpp",
137    "egl/ImageEGL.h",
138    "egl/PbufferSurfaceEGL.cpp",
139    "egl/PbufferSurfaceEGL.h",
140    "egl/RendererEGL.cpp",
141    "egl/RendererEGL.h",
142    "egl/SurfaceEGL.cpp",
143    "egl/SurfaceEGL.h",
144    "egl/SyncEGL.cpp",
145    "egl/SyncEGL.h",
146    "egl/WindowSurfaceEGL.cpp",
147    "egl/WindowSurfaceEGL.h",
148    "egl/egl_utils.cpp",
149    "egl/egl_utils.h",
150    "egl/functionsegl_typedefs.h",
151  ]
152}
153
154if (is_android) {
155  gl_backend_sources += [
156    "egl/android/DisplayAndroid.cpp",
157    "egl/android/DisplayAndroid.h",
158    "egl/android/NativeBufferImageSiblingAndroid.cpp",
159    "egl/android/NativeBufferImageSiblingAndroid.h",
160  ]
161}
162
163if (angle_enable_cgl) {
164  gl_backend_sources += [
165    "cgl/ContextCGL.cpp",
166    "cgl/ContextCGL.h",
167    "cgl/DeviceCGL.cpp",
168    "cgl/DeviceCGL.h",
169    "cgl/DisplayCGL.h",
170    "cgl/DisplayCGL.mm",
171    "cgl/IOSurfaceSurfaceCGL.cpp",
172    "cgl/IOSurfaceSurfaceCGL.h",
173    "cgl/PbufferSurfaceCGL.cpp",
174    "cgl/PbufferSurfaceCGL.h",
175    "cgl/WindowSurfaceCGL.h",
176    "cgl/WindowSurfaceCGL.mm",
177  ]
178}
179
180if (angle_enable_gl_null) {
181  gl_backend_sources += [
182    "null_functions.cpp",
183    "null_functions.h",
184  ]
185}
186