Debian Codegraph @

include/gpu/graphite/vk/precompile/VulkanPrecompileShader.h

raw
1 /*
2 * Copyright 2025 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef skgpu_graphite_vk_precompile_PrecompileShader_DEFINED
9 #define skgpu_graphite_vk_precompile_PrecompileShader_DEFINED
10
11 #include "include/gpu/graphite/precompile/PrecompileShader.h"
12
13 namespace skgpu {
14 struct VulkanYcbcrConversionInfo;
15 }
16
17 namespace skgpu::graphite {
18
19 namespace PrecompileShaders {
20
21 /**
22 In the main Skia API YCbCr Images are usually created by wrapping a BackendTexture.
23 Such backend textures are, in turn, created by a backend-specific entry point like:
24 BackendTextures::MakeVulkan(SkISize, const VulkanTextureInfo&, ...)
25 where the VulkanTextureInfo contains additional YCbCr information. This API cuts right to
26 providing the backend-specific YCbCr information (i.e., the VulkanYcbcrConversionInfo).
27
28 @return A precompile shader for a specific type of YCbCr image
29 */
30 SK_API sk_sp<PrecompileShader> VulkanYCbCrImage(const skgpu::VulkanYcbcrConversionInfo& YCbCrInfo,
31 ImageShaderFlags = ImageShaderFlags::kAll,
32 SkSpan<const SkColorInfo> = {},
33 SkSpan<const SkTileMode> = { kAllTileModes });
34
35 } // namespace PrecompileShaders
36
37 } // namespace skgpu::graphite
38
39 #endif // skgpu_graphite_vk_precompile_PrecompileShader_DEFINED