| 1 |
load("//bazel:skia_rules.bzl", "skia_cc_library", "skia_filegroup", "split_srcs_and_hdrs") |
| 2 |
|
| 3 |
package( |
| 4 |
default_applicable_licenses = ["//:license"], |
| 5 |
) |
| 6 |
|
| 7 |
licenses(["notice"]) |
| 8 |
|
| 9 |
CORE_FILES = [ |
| 10 |
"GrGLAssembleGLESInterfaceAutogen.cpp", |
| 11 |
"GrGLAssembleGLInterfaceAutogen.cpp", |
| 12 |
"GrGLAssembleHelpers.cpp", |
| 13 |
"GrGLAssembleInterface.cpp", |
| 14 |
"GrGLAssembleWebGLInterfaceAutogen.cpp", |
| 15 |
"GrGLAttachment.cpp", |
| 16 |
"GrGLAttachment.h", |
| 17 |
"GrGLBuffer.cpp", |
| 18 |
"GrGLBuffer.h", |
| 19 |
"GrGLCaps.cpp", |
| 20 |
"GrGLCaps.h", |
| 21 |
"GrGLContext.cpp", |
| 22 |
"GrGLContext.h", |
| 23 |
"GrGLCoreFunctions.h", |
| 24 |
"GrGLDefines.h", |
| 25 |
"GrGLDirectContext.cpp", |
| 26 |
"GrGLExtensions.cpp", |
| 27 |
"GrGLBackendSurface.cpp", |
| 28 |
"GrGLBackendSurfacePriv.h", |
| 29 |
"GrGLFinishCallbacks.cpp", |
| 30 |
"GrGLFinishCallbacks.h", |
| 31 |
"GrGLGLSL.cpp", |
| 32 |
"GrGLGLSL.h", |
| 33 |
"GrGLGpu.cpp", |
| 34 |
"GrGLGpu.h", |
| 35 |
"GrGLGpuProgramCache.cpp", |
| 36 |
"GrGLInterfaceAutogen.cpp", |
| 37 |
"GrGLOpsRenderPass.cpp", |
| 38 |
"GrGLOpsRenderPass.h", |
| 39 |
"GrGLProgram.cpp", |
| 40 |
"GrGLProgram.h", |
| 41 |
"GrGLProgramDataManager.cpp", |
| 42 |
"GrGLProgramDataManager.h", |
| 43 |
"GrGLRenderTarget.cpp", |
| 44 |
"GrGLRenderTarget.h", |
| 45 |
"GrGLSemaphore.cpp", |
| 46 |
"GrGLSemaphore.h", |
| 47 |
"GrGLTexture.cpp", |
| 48 |
"GrGLTexture.h", |
| 49 |
"GrGLTextureRenderTarget.cpp", |
| 50 |
"GrGLTextureRenderTarget.h", |
| 51 |
"GrGLTypesPriv.cpp", |
| 52 |
"GrGLTypesPriv.h", |
| 53 |
"GrGLUniformHandler.cpp", |
| 54 |
"GrGLUniformHandler.h", |
| 55 |
"GrGLUtil.cpp", |
| 56 |
"GrGLUtil.h", |
| 57 |
"GrGLVaryingHandler.h", |
| 58 |
"GrGLVertexArray.cpp", |
| 59 |
"GrGLVertexArray.h", |
| 60 |
] |
| 61 |
|
| 62 |
split_srcs_and_hdrs( |
| 63 |
name = "core", |
| 64 |
files = CORE_FILES, |
| 65 |
) |
| 66 |
|
| 67 |
# In own group for mapping to //gn/gpu.gni:skia_null_gpu_sources. |
| 68 |
skia_filegroup( |
| 69 |
name = "native_interface_none", |
| 70 |
srcs = ["GrGLMakeNativeInterface_none.cpp"], |
| 71 |
) |
| 72 |
|
| 73 |
skia_filegroup( |
| 74 |
name = "android_srcs", |
| 75 |
srcs = ["AHardwareBufferGL.cpp"], |
| 76 |
) |
| 77 |
|
| 78 |
skia_cc_library( |
| 79 |
name = "ganesh_gl", |
| 80 |
srcs = [ |
| 81 |
":core_hdrs", |
| 82 |
":core_srcs", |
| 83 |
"//src/gpu/ganesh/gl/builders:builder_hdrs", |
| 84 |
"//src/gpu/ganesh/gl/builders:builder_srcs", |
| 85 |
], |
| 86 |
hdrs = [ |
| 87 |
"//include/gpu:shared_gpu_hdrs", |
| 88 |
"//include/gpu/ganesh:ganesh_hdrs", |
| 89 |
"//include/gpu/ganesh/gl:public_hdrs", |
| 90 |
], |
| 91 |
defines = [ |
| 92 |
"SK_DISABLE_LEGACY_GL_MAKE_NATIVE_INTERFACE", |
| 93 |
"SK_GL", |
| 94 |
], |
| 95 |
features = ["layering_check"], |
| 96 |
visibility = ["//:__pkg__"], |
| 97 |
deps = [ |
| 98 |
"//:core", |
| 99 |
"//src/base", |
| 100 |
"//src/core:core_priv", |
| 101 |
"//src/gpu", |
| 102 |
"//src/gpu/ganesh", |
| 103 |
"//src/sksl/codegen:glsl", |
| 104 |
"//src/utils:shader_utils", |
| 105 |
], |
| 106 |
) |
| 107 |
|
| 108 |
skia_cc_library( |
| 109 |
name = "ganesh_gl_TEST_UTIL", |
| 110 |
testonly = True, |
| 111 |
srcs = [ |
| 112 |
":core_hdrs", |
| 113 |
":core_srcs", |
| 114 |
"//src/gpu/ganesh/gl/builders:builder_hdrs", |
| 115 |
"//src/gpu/ganesh/gl/builders:builder_srcs", |
| 116 |
], |
| 117 |
hdrs = [ |
| 118 |
"//include/gpu:shared_gpu_hdrs", |
| 119 |
"//include/gpu/ganesh:ganesh_hdrs", |
| 120 |
"//include/gpu/ganesh/gl:public_hdrs", |
| 121 |
], |
| 122 |
defines = [ |
| 123 |
"SK_DISABLE_LEGACY_GL_MAKE_NATIVE_INTERFACE", |
| 124 |
"GPU_TEST_UTILS", |
| 125 |
"SK_GL", |
| 126 |
], |
| 127 |
features = ["layering_check"], |
| 128 |
visibility = [ |
| 129 |
"//modules/skottie:__pkg__", |
| 130 |
"//src/gpu/ganesh/gl:__subpackages__", |
| 131 |
"//tools:__subpackages__", |
| 132 |
], |
| 133 |
deps = [ |
| 134 |
"//:core", |
| 135 |
"//src/base", |
| 136 |
"//src/core:core_priv", |
| 137 |
"//src/gpu", |
| 138 |
"//src/gpu/ganesh:ganesh_TEST_UTIL", |
| 139 |
"//src/sksl/codegen:glsl", |
| 140 |
"//src/utils:shader_utils", |
| 141 |
], |
| 142 |
) |