@shopify/react-native-skia 2.0.0-next.3 → 2.0.0-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apple/RNSkApplePlatformContext.h +2 -1
- package/apple/RNSkApplePlatformContext.mm +6 -4
- package/apple/RNSkAppleView.h +1 -1
- package/apple/RNSkAppleView.mm +1 -1
- package/apple/SkiaManager.mm +2 -1
- package/apple/SkiaUIView.h +1 -1
- package/cpp/api/JsiSkCanvas.h +29 -25
- package/cpp/api/recorder/Drawings.h +13 -17
- package/cpp/api/recorder/Shaders.h +21 -32
- package/cpp/skia/include/codec/SkCodec.h +39 -1
- package/cpp/skia/include/config/SkUserConfig.h +1 -10
- package/cpp/skia/include/core/SkCanvas.h +8 -4
- package/cpp/skia/include/core/SkContourMeasure.h +2 -2
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkPaint.h +8 -5
- package/cpp/skia/include/core/SkStream.h +8 -3
- package/cpp/skia/include/core/SkTextBlob.h +9 -9
- package/cpp/skia/include/core/SkTypeface.h +4 -6
- package/cpp/skia/include/core/SkTypes.h +5 -0
- package/cpp/skia/include/docs/SkPDFDocument.h +47 -2
- package/cpp/skia/include/docs/SkPDFJpegHelpers.h +41 -0
- package/cpp/skia/include/effects/SkRuntimeEffect.h +5 -1
- package/cpp/skia/include/effects/SkTableMaskFilter.h +4 -0
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +0 -2
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +17 -0
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +21 -18
- package/cpp/skia/include/gpu/graphite/PrecompileContext.h +24 -0
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +87 -42
- package/cpp/skia/include/gpu/graphite/YUVABackendTextures.h +13 -4
- package/cpp/skia/include/gpu/graphite/dawn/DawnBackendContext.h +9 -0
- package/cpp/skia/include/gpu/graphite/dawn/DawnGraphiteTypes.h +166 -0
- package/cpp/skia/include/gpu/graphite/dawn/DawnTypes.h +3 -141
- package/cpp/skia/include/gpu/graphite/dawn/DawnUtils.h +2 -21
- package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +4 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +30 -6
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypesUtils.h +4 -42
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes_cpp.h +50 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteUtils.h +2 -20
- package/cpp/skia/include/gpu/graphite/precompile/Precompile.h +14 -4
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileShader.h +14 -6
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteContext.h +31 -0
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +36 -14
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteUtils.h +3 -21
- package/cpp/skia/include/ports/SkTypeface_fontations.h +3 -0
- package/cpp/skia/include/private/SkJpegMetadataDecoder.h +7 -0
- package/cpp/skia/include/private/base/SkAnySubclass.h +6 -0
- package/cpp/skia/include/private/chromium/SkPMColor.h +38 -0
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +2 -2
- package/cpp/skia/modules/skunicode/include/SkUnicode.h +10 -6
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +1 -3
- package/cpp/skia/src/base/SkTInternalLList.h +1 -1
- package/cpp/skia/src/core/SkLRUCache.h +6 -3
- package/lib/commonjs/external/reanimated/textures.d.ts +2 -4
- package/lib/commonjs/external/reanimated/textures.js +8 -15
- package/lib/commonjs/external/reanimated/textures.js.map +1 -1
- package/lib/commonjs/sksg/HostConfig.js +2 -1
- package/lib/commonjs/sksg/HostConfig.js.map +1 -1
- package/lib/module/external/reanimated/textures.d.ts +2 -4
- package/lib/module/external/reanimated/textures.js +7 -12
- package/lib/module/external/reanimated/textures.js.map +1 -1
- package/lib/module/sksg/HostConfig.js +2 -1
- package/lib/module/sksg/HostConfig.js.map +1 -1
- package/lib/typescript/lib/commonjs/external/reanimated/textures.d.ts +1 -3
- package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +1 -1
- package/lib/typescript/lib/module/external/reanimated/textures.d.ts +1 -3
- package/lib/typescript/lib/module/sksg/HostConfig.d.ts +1 -1
- package/lib/typescript/src/external/reanimated/textures.d.ts +2 -4
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libskottie.a +0 -0
- package/libs/android/arm64-v8a/libskparagraph.a +0 -0
- package/libs/android/arm64-v8a/libsksg.a +0 -0
- package/libs/android/arm64-v8a/libskshaper.a +0 -0
- package/libs/android/arm64-v8a/libskunicode_icu.a +0 -0
- package/libs/android/arm64-v8a/libsvg.a +0 -0
- package/libs/android/armeabi-v7a/libskia.a +0 -0
- package/libs/android/armeabi-v7a/libskottie.a +0 -0
- package/libs/android/armeabi-v7a/libskparagraph.a +0 -0
- package/libs/android/armeabi-v7a/libsksg.a +0 -0
- package/libs/android/armeabi-v7a/libskshaper.a +0 -0
- package/libs/android/armeabi-v7a/libskunicode_icu.a +0 -0
- package/libs/android/armeabi-v7a/libsvg.a +0 -0
- package/libs/android/x86/libskia.a +0 -0
- package/libs/android/x86/libskottie.a +0 -0
- package/libs/android/x86/libskparagraph.a +0 -0
- package/libs/android/x86/libsksg.a +0 -0
- package/libs/android/x86/libskshaper.a +0 -0
- package/libs/android/x86/libskunicode_icu.a +0 -0
- package/libs/android/x86/libsvg.a +0 -0
- package/libs/android/x86_64/libskia.a +0 -0
- package/libs/android/x86_64/libskottie.a +0 -0
- package/libs/android/x86_64/libskparagraph.a +0 -0
- package/libs/android/x86_64/libsksg.a +0 -0
- package/libs/android/x86_64/libskshaper.a +0 -0
- package/libs/android/x86_64/libskunicode_icu.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/apple/libskia.xcframework/Info.plist +15 -15
- package/libs/apple/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/apple/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/apple/libskia.xcframework/macos-arm64_x86_64/libskia.a +0 -0
- package/libs/apple/libskia.xcframework/tvos-arm64_arm64e/libskia.a +0 -0
- package/libs/apple/libskia.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/apple/libskottie.xcframework/Info.plist +7 -7
- package/libs/apple/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
- package/libs/apple/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/apple/libskottie.xcframework/macos-arm64_x86_64/libskottie.a +0 -0
- package/libs/apple/libskottie.xcframework/tvos-arm64_arm64e/libskottie.a +0 -0
- package/libs/apple/libskottie.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/apple/libskparagraph.xcframework/Info.plist +13 -13
- package/libs/apple/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/apple/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/apple/libskparagraph.xcframework/macos-arm64_x86_64/libskparagraph.a +0 -0
- package/libs/apple/libskparagraph.xcframework/tvos-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/apple/libskparagraph.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/apple/libsksg.xcframework/Info.plist +13 -13
- package/libs/apple/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
- package/libs/apple/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/apple/libsksg.xcframework/macos-arm64_x86_64/libsksg.a +0 -0
- package/libs/apple/libsksg.xcframework/tvos-arm64_arm64e/libsksg.a +0 -0
- package/libs/apple/libsksg.xcframework/tvos-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/apple/libskshaper.xcframework/Info.plist +14 -14
- package/libs/apple/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/apple/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/apple/libskshaper.xcframework/macos-arm64_x86_64/libskshaper.a +0 -0
- package/libs/apple/libskshaper.xcframework/tvos-arm64_arm64e/libskshaper.a +0 -0
- package/libs/apple/libskshaper.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/apple/libskunicode_core.xcframework/Info.plist +12 -12
- package/libs/apple/libskunicode_core.xcframework/ios-arm64_arm64e/libskunicode_core.a +0 -0
- package/libs/apple/libskunicode_core.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
- package/libs/apple/libskunicode_core.xcframework/macos-arm64_x86_64/libskunicode_core.a +0 -0
- package/libs/apple/libskunicode_core.xcframework/tvos-arm64_arm64e/libskunicode_core.a +0 -0
- package/libs/apple/libskunicode_core.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
- package/libs/apple/libskunicode_libgrapheme.xcframework/Info.plist +15 -15
- package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
- package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
- package/libs/apple/libskunicode_libgrapheme.xcframework/macos-arm64_x86_64/libskunicode_libgrapheme.a +0 -0
- package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
- package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
- package/libs/apple/libsvg.xcframework/Info.plist +8 -8
- package/libs/apple/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/apple/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/libs/apple/libsvg.xcframework/macos-arm64_x86_64/libsvg.a +0 -0
- package/libs/apple/libsvg.xcframework/tvos-arm64_arm64e/libsvg.a +0 -0
- package/libs/apple/libsvg.xcframework/tvos-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +1 -1
- package/src/external/reanimated/textures.tsx +12 -20
- package/src/sksg/HostConfig.ts +2 -1
- package/cpp/skia/include/core/SkColorPriv.h +0 -165
- package/cpp/skia/include/private/SkColorData.h +0 -385
@@ -0,0 +1,166 @@
|
|
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_DawnTypes_DEFINED
|
9
|
+
#define skgpu_graphite_DawnTypes_DEFINED
|
10
|
+
|
11
|
+
#include "include/core/SkSize.h"
|
12
|
+
#include "include/gpu/graphite/GraphiteTypes.h"
|
13
|
+
#include "include/gpu/graphite/TextureInfo.h"
|
14
|
+
#include "include/private/base/SkAPI.h"
|
15
|
+
|
16
|
+
#include "webgpu/webgpu_cpp.h" // NO_G3_REWRITE
|
17
|
+
|
18
|
+
class SkStream;
|
19
|
+
class SkWStream;
|
20
|
+
|
21
|
+
namespace skgpu::graphite {
|
22
|
+
class BackendTexture;
|
23
|
+
|
24
|
+
class SK_API DawnTextureInfo final : public TextureInfo::Data {
|
25
|
+
public:
|
26
|
+
// wgpu::TextureDescriptor properties
|
27
|
+
wgpu::TextureFormat fFormat = wgpu::TextureFormat::Undefined;
|
28
|
+
// `fViewFormat` for multiplanar formats corresponds to the plane TextureView's format.
|
29
|
+
wgpu::TextureFormat fViewFormat = wgpu::TextureFormat::Undefined;
|
30
|
+
wgpu::TextureUsage fUsage = wgpu::TextureUsage::None;
|
31
|
+
// TODO(b/308944094): Migrate aspect information to BackendTextureViews.
|
32
|
+
wgpu::TextureAspect fAspect = wgpu::TextureAspect::All;
|
33
|
+
uint32_t fSlice = 0;
|
34
|
+
|
35
|
+
#if !defined(__EMSCRIPTEN__)
|
36
|
+
// The descriptor of the YCbCr info (if any) for this texture. Dawn's YCbCr
|
37
|
+
// sampling will be used for this texture if this info is set. Setting the
|
38
|
+
// info is supported only on Android and only if using Vulkan as the
|
39
|
+
// underlying GPU driver.
|
40
|
+
wgpu::YCbCrVkDescriptor fYcbcrVkDescriptor = {};
|
41
|
+
#endif
|
42
|
+
|
43
|
+
wgpu::TextureFormat getViewFormat() const {
|
44
|
+
return fViewFormat != wgpu::TextureFormat::Undefined ? fViewFormat : fFormat;
|
45
|
+
}
|
46
|
+
|
47
|
+
DawnTextureInfo() = default;
|
48
|
+
|
49
|
+
DawnTextureInfo(WGPUTexture texture);
|
50
|
+
|
51
|
+
DawnTextureInfo(uint32_t sampleCount,
|
52
|
+
Mipmapped mipmapped,
|
53
|
+
wgpu::TextureFormat format,
|
54
|
+
wgpu::TextureUsage usage,
|
55
|
+
wgpu::TextureAspect aspect)
|
56
|
+
: DawnTextureInfo(sampleCount,
|
57
|
+
mipmapped,
|
58
|
+
/*format=*/format,
|
59
|
+
/*viewFormat=*/format,
|
60
|
+
usage,
|
61
|
+
aspect,
|
62
|
+
/*slice=*/0) {}
|
63
|
+
|
64
|
+
DawnTextureInfo(uint32_t sampleCount,
|
65
|
+
Mipmapped mipmapped,
|
66
|
+
wgpu::TextureFormat format,
|
67
|
+
wgpu::TextureFormat viewFormat,
|
68
|
+
wgpu::TextureUsage usage,
|
69
|
+
wgpu::TextureAspect aspect,
|
70
|
+
uint32_t slice)
|
71
|
+
: Data(sampleCount, mipmapped)
|
72
|
+
, fFormat(format)
|
73
|
+
, fViewFormat(viewFormat)
|
74
|
+
, fUsage(usage)
|
75
|
+
, fAspect(aspect)
|
76
|
+
, fSlice(slice) {}
|
77
|
+
|
78
|
+
#if !defined(__EMSCRIPTEN__)
|
79
|
+
DawnTextureInfo(uint32_t sampleCount,
|
80
|
+
Mipmapped mipmapped,
|
81
|
+
wgpu::TextureFormat format,
|
82
|
+
wgpu::TextureFormat viewFormat,
|
83
|
+
wgpu::TextureUsage usage,
|
84
|
+
wgpu::TextureAspect aspect,
|
85
|
+
uint32_t slice,
|
86
|
+
wgpu::YCbCrVkDescriptor ycbcrVkDescriptor)
|
87
|
+
: Data(sampleCount, mipmapped)
|
88
|
+
, fFormat(format)
|
89
|
+
, fViewFormat(viewFormat)
|
90
|
+
, fUsage(usage)
|
91
|
+
, fAspect(aspect)
|
92
|
+
, fSlice(slice)
|
93
|
+
, fYcbcrVkDescriptor(ycbcrVkDescriptor) {}
|
94
|
+
#endif
|
95
|
+
|
96
|
+
private:
|
97
|
+
friend class TextureInfo;
|
98
|
+
friend class TextureInfoPriv;
|
99
|
+
|
100
|
+
// Non-virtual template API for TextureInfo::Data accessed directly when backend type is known.
|
101
|
+
static constexpr skgpu::BackendApi kBackend = skgpu::BackendApi::kDawn;
|
102
|
+
|
103
|
+
Protected isProtected() const { return Protected::kNo; }
|
104
|
+
TextureFormat viewFormat() const;
|
105
|
+
|
106
|
+
bool serialize(SkWStream*) const;
|
107
|
+
bool deserialize(SkStream*);
|
108
|
+
|
109
|
+
// Virtual API when the specific backend type is not available.
|
110
|
+
SkString toBackendString() const override;
|
111
|
+
|
112
|
+
void copyTo(TextureInfo::AnyTextureInfoData& dstData) const override {
|
113
|
+
dstData.emplace<DawnTextureInfo>(*this);
|
114
|
+
}
|
115
|
+
bool isCompatible(const TextureInfo& that, bool requireExact) const override;
|
116
|
+
};
|
117
|
+
|
118
|
+
namespace TextureInfos {
|
119
|
+
SK_API TextureInfo MakeDawn(const DawnTextureInfo& dawnInfo);
|
120
|
+
|
121
|
+
SK_API bool GetDawnTextureInfo(const TextureInfo&, DawnTextureInfo*);
|
122
|
+
} // namespace TextureInfos
|
123
|
+
|
124
|
+
namespace BackendTextures {
|
125
|
+
// Create a BackendTexture from a WGPUTexture. Texture info will be queried from the texture.
|
126
|
+
//
|
127
|
+
// This is the recommended way of specifying a BackendTexture for Dawn. See the note below on
|
128
|
+
// the constructor that takes a WGPUTextureView for a fuller explanation.
|
129
|
+
//
|
130
|
+
// The BackendTexture will not call retain or release on the passed in WGPUTexture. Thus, the
|
131
|
+
// client must keep the WGPUTexture valid until they are no longer using the BackendTexture.
|
132
|
+
// However, any SkImage or SkSurface that wraps the BackendTexture *will* retain and release
|
133
|
+
// the WGPUTexture.
|
134
|
+
SK_API BackendTexture MakeDawn(WGPUTexture);
|
135
|
+
|
136
|
+
// Create a BackendTexture from a WGPUTexture. Texture planeDimensions, plane aspect and
|
137
|
+
// info have to be provided. This is intended to be used only when accessing a plane
|
138
|
+
// of a WGPUTexture.
|
139
|
+
//
|
140
|
+
// The BackendTexture will not call retain or release on the passed in WGPUTexture. Thus, the
|
141
|
+
// client must keep the WGPUTexture valid until they are no longer using the BackendTexture.
|
142
|
+
// However, any SkImage or SkSurface that wraps the BackendTexture *will* retain and release
|
143
|
+
// the WGPUTexture.
|
144
|
+
SK_API BackendTexture MakeDawn(SkISize planeDimensions, const DawnTextureInfo&, WGPUTexture);
|
145
|
+
|
146
|
+
// Create a BackendTexture from a WGPUTextureView. Texture dimensions and
|
147
|
+
// info have to be provided.
|
148
|
+
//
|
149
|
+
// Using a WGPUTextureView rather than a WGPUTexture is less effecient for operations that
|
150
|
+
// require buffer transfers to or from the texture (e.g. methods on graphite::Context that read
|
151
|
+
// pixels or SkSurface::writePixels). In such cases an intermediate copy to or from a
|
152
|
+
// WGPUTexture is required. Thus, it is recommended to use this functionality only for cases
|
153
|
+
// where a WGPUTexture is unavailable, in particular when using wgpu::SwapChain.
|
154
|
+
//
|
155
|
+
// The BackendTexture will not call retain or release on the passed in WGPUTextureView. Thus,
|
156
|
+
// the client must keep the WGPUTextureView valid until they are no longer using the
|
157
|
+
// BackendTexture. However, any SkImage or SkSurface that wraps the BackendTexture *will* retain
|
158
|
+
// and release the WGPUTextureView.
|
159
|
+
SK_API BackendTexture MakeDawn(SkISize dimensions,
|
160
|
+
const DawnTextureInfo& info,
|
161
|
+
WGPUTextureView textureView);
|
162
|
+
} // namespace BackendTextures
|
163
|
+
|
164
|
+
} // namespace skgpu::graphite
|
165
|
+
|
166
|
+
#endif // skgpu_graphite_DawnTypes_DEFINED
|
@@ -1,147 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright 2022 Google LLC
|
2
|
+
* Copyright 2022 Google LLC
|
3
3
|
*
|
4
4
|
* Use of this source code is governed by a BSD-style license that can be
|
5
5
|
* found in the LICENSE file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
|
9
|
-
#
|
10
|
-
|
11
|
-
#include "include/core/SkSize.h"
|
12
|
-
#include "include/gpu/graphite/GraphiteTypes.h"
|
13
|
-
#include "include/private/base/SkAPI.h"
|
14
|
-
|
15
|
-
#include "webgpu/webgpu_cpp.h" // NO_G3_REWRITE
|
16
|
-
|
17
|
-
namespace skgpu::graphite {
|
18
|
-
class BackendTexture;
|
19
|
-
class TextureInfo;
|
20
|
-
|
21
|
-
struct DawnTextureInfo {
|
22
|
-
uint32_t fSampleCount = 1;
|
23
|
-
Mipmapped fMipmapped = Mipmapped::kNo;
|
24
|
-
|
25
|
-
// wgpu::TextureDescriptor properties
|
26
|
-
wgpu::TextureFormat fFormat = wgpu::TextureFormat::Undefined;
|
27
|
-
// `fViewFormat` for multiplanar formats corresponds to the plane TextureView's format.
|
28
|
-
wgpu::TextureFormat fViewFormat = wgpu::TextureFormat::Undefined;
|
29
|
-
wgpu::TextureUsage fUsage = wgpu::TextureUsage::None;
|
30
|
-
// TODO(b/308944094): Migrate aspect information to BackendTextureViews.
|
31
|
-
wgpu::TextureAspect fAspect = wgpu::TextureAspect::All;
|
32
|
-
uint32_t fSlice = 0;
|
33
|
-
|
34
|
-
#if !defined(__EMSCRIPTEN__)
|
35
|
-
// The descriptor of the YCbCr info (if any) for this texture. Dawn's YCbCr
|
36
|
-
// sampling will be used for this texture if this info is set. Setting the
|
37
|
-
// info is supported only on Android and only if using Vulkan as the
|
38
|
-
// underlying GPU driver.
|
39
|
-
wgpu::YCbCrVkDescriptor fYcbcrVkDescriptor = {};
|
40
|
-
#endif
|
41
|
-
|
42
|
-
wgpu::TextureFormat getViewFormat() const {
|
43
|
-
return fViewFormat != wgpu::TextureFormat::Undefined ? fViewFormat : fFormat;
|
44
|
-
}
|
45
|
-
|
46
|
-
DawnTextureInfo() = default;
|
47
|
-
|
48
|
-
DawnTextureInfo(uint32_t sampleCount,
|
49
|
-
Mipmapped mipmapped,
|
50
|
-
wgpu::TextureFormat format,
|
51
|
-
wgpu::TextureUsage usage,
|
52
|
-
wgpu::TextureAspect aspect)
|
53
|
-
: DawnTextureInfo(sampleCount,
|
54
|
-
mipmapped,
|
55
|
-
/*format=*/format,
|
56
|
-
/*viewFormat=*/format,
|
57
|
-
usage,
|
58
|
-
aspect,
|
59
|
-
/*slice=*/0) {}
|
60
|
-
|
61
|
-
DawnTextureInfo(uint32_t sampleCount,
|
62
|
-
Mipmapped mipmapped,
|
63
|
-
wgpu::TextureFormat format,
|
64
|
-
wgpu::TextureFormat viewFormat,
|
65
|
-
wgpu::TextureUsage usage,
|
66
|
-
wgpu::TextureAspect aspect,
|
67
|
-
uint32_t slice)
|
68
|
-
: fSampleCount(sampleCount)
|
69
|
-
, fMipmapped(mipmapped)
|
70
|
-
, fFormat(format)
|
71
|
-
, fViewFormat(viewFormat)
|
72
|
-
, fUsage(usage)
|
73
|
-
, fAspect(aspect)
|
74
|
-
, fSlice(slice) {}
|
75
|
-
|
76
|
-
#if !defined(__EMSCRIPTEN__)
|
77
|
-
DawnTextureInfo(uint32_t sampleCount,
|
78
|
-
Mipmapped mipmapped,
|
79
|
-
wgpu::TextureFormat format,
|
80
|
-
wgpu::TextureFormat viewFormat,
|
81
|
-
wgpu::TextureUsage usage,
|
82
|
-
wgpu::TextureAspect aspect,
|
83
|
-
uint32_t slice,
|
84
|
-
wgpu::YCbCrVkDescriptor ycbcrVkDescriptor)
|
85
|
-
: fSampleCount(sampleCount)
|
86
|
-
, fMipmapped(mipmapped)
|
87
|
-
, fFormat(format)
|
88
|
-
, fViewFormat(viewFormat)
|
89
|
-
, fUsage(usage)
|
90
|
-
, fAspect(aspect)
|
91
|
-
, fSlice(slice)
|
92
|
-
, fYcbcrVkDescriptor(ycbcrVkDescriptor) {}
|
93
|
-
#endif
|
94
|
-
};
|
95
|
-
|
96
|
-
namespace TextureInfos {
|
97
|
-
SK_API TextureInfo MakeDawn(const DawnTextureInfo& dawnInfo);
|
98
|
-
|
99
|
-
SK_API bool GetDawnTextureInfo(const TextureInfo&, DawnTextureInfo*);
|
100
|
-
} // namespace TextureInfos
|
101
|
-
|
102
|
-
namespace BackendTextures {
|
103
|
-
// Create a BackendTexture from a WGPUTexture. Texture info will be queried from the texture.
|
104
|
-
//
|
105
|
-
// This is the recommended way of specifying a BackendTexture for Dawn. See the note below on
|
106
|
-
// the constructor that takes a WGPUTextureView for a fuller explanation.
|
107
|
-
//
|
108
|
-
// The BackendTexture will not call retain or release on the passed in WGPUTexture. Thus, the
|
109
|
-
// client must keep the WGPUTexture valid until they are no longer using the BackendTexture.
|
110
|
-
// However, any SkImage or SkSurface that wraps the BackendTexture *will* retain and release
|
111
|
-
// the WGPUTexture.
|
112
|
-
SK_API BackendTexture MakeDawn(WGPUTexture);
|
113
|
-
|
114
|
-
// Create a BackendTexture from a WGPUTexture. Texture planeDimensions, plane aspect and
|
115
|
-
// info have to be provided. This is intended to be used only when accessing a plane
|
116
|
-
// of a WGPUTexture.
|
117
|
-
//
|
118
|
-
// The BackendTexture will not call retain or release on the passed in WGPUTexture. Thus, the
|
119
|
-
// client must keep the WGPUTexture valid until they are no longer using the BackendTexture.
|
120
|
-
// However, any SkImage or SkSurface that wraps the BackendTexture *will* retain and release
|
121
|
-
// the WGPUTexture.
|
122
|
-
SK_API BackendTexture MakeDawn(SkISize planeDimensions, const DawnTextureInfo&, WGPUTexture);
|
123
|
-
|
124
|
-
// Create a BackendTexture from a WGPUTextureView. Texture dimensions and
|
125
|
-
// info have to be provided.
|
126
|
-
//
|
127
|
-
// Using a WGPUTextureView rather than a WGPUTexture is less effecient for operations that
|
128
|
-
// require buffer transfers to or from the texture (e.g. methods on graphite::Context that read
|
129
|
-
// pixels or SkSurface::writePixels). In such cases an intermediate copy to or from a
|
130
|
-
// WGPUTexture is required. Thus, it is recommended to use this functionality only for cases
|
131
|
-
// where a WGPUTexture is unavailable, in particular when using wgpu::SwapChain.
|
132
|
-
//
|
133
|
-
// The BackendTexture will not call retain or release on the passed in WGPUTextureView. Thus,
|
134
|
-
// the client must keep the WGPUTextureView valid until they are no longer using the
|
135
|
-
// BackendTexture. However, any SkImage or SkSurface that wraps the BackendTexture *will* retain
|
136
|
-
// and release the WGPUTextureView.
|
137
|
-
SK_API BackendTexture MakeDawn(SkISize dimensions,
|
138
|
-
const DawnTextureInfo& info,
|
139
|
-
WGPUTextureView textureView);
|
140
|
-
|
141
|
-
} // namespace BackendTextures
|
142
|
-
|
143
|
-
} // namespace skgpu::graphite
|
144
|
-
|
145
|
-
#endif // skgpu_graphite_DawnTypes_DEFINED
|
146
|
-
|
147
|
-
|
8
|
+
// DEPRECRATED: DawnTypes.h will be removed in the future, please include DawnGraphiteTypes.h
|
9
|
+
#include "include/gpu/graphite/dawn/DawnGraphiteTypes.h"
|
@@ -5,24 +5,5 @@
|
|
5
5
|
* found in the LICENSE file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
|
9
|
-
#
|
10
|
-
|
11
|
-
#include <memory>
|
12
|
-
|
13
|
-
#include "include/private/base/SkAPI.h"
|
14
|
-
|
15
|
-
namespace skgpu::graphite {
|
16
|
-
|
17
|
-
class Context;
|
18
|
-
struct ContextOptions;
|
19
|
-
struct DawnBackendContext;
|
20
|
-
|
21
|
-
namespace ContextFactory {
|
22
|
-
SK_API std::unique_ptr<Context> MakeDawn(const DawnBackendContext&, const ContextOptions&);
|
23
|
-
} // namespace ContextFactory
|
24
|
-
|
25
|
-
} // namespace skgpu::graphite
|
26
|
-
|
27
|
-
|
28
|
-
#endif // skgpu_graphite_DawnUtils_DEFINED
|
8
|
+
// DEPRECRATED: DawnUtils.h will be removed in the future, please include DawnBackendContext.h
|
9
|
+
#include "include/gpu/graphite/dawn/DawnBackendContext.h"
|
@@ -23,6 +23,10 @@ struct SK_API MtlBackendContext {
|
|
23
23
|
sk_cfp<CFTypeRef> fQueue;
|
24
24
|
};
|
25
25
|
|
26
|
+
namespace ContextFactory {
|
27
|
+
SK_API std::unique_ptr<Context> MakeMetal(const MtlBackendContext&, const ContextOptions&);
|
28
|
+
} // namespace ContextFactory
|
29
|
+
|
26
30
|
} // namespace skgpu::graphite
|
27
31
|
|
28
32
|
#endif // skgpu_graphite_MtlBackendContext_DEFINED
|
@@ -13,18 +13,21 @@
|
|
13
13
|
#include "include/core/SkTypes.h"
|
14
14
|
|
15
15
|
#include "include/gpu/graphite/GraphiteTypes.h"
|
16
|
-
#include "include/gpu/graphite/
|
16
|
+
#include "include/gpu/graphite/TextureInfo.h"
|
17
|
+
#include "include/gpu/graphite/mtl/MtlGraphiteTypes_cpp.h"
|
17
18
|
#include "include/private/base/SkAPI.h"
|
18
19
|
|
19
20
|
#import <CoreFoundation/CoreFoundation.h>
|
20
21
|
#import <Metal/Metal.h>
|
21
22
|
#import <TargetConditionals.h>
|
22
23
|
|
24
|
+
class SkStream;
|
25
|
+
class SkWStream;
|
26
|
+
|
23
27
|
namespace skgpu::graphite {
|
24
|
-
struct SK_API MtlTextureInfo {
|
25
|
-
uint32_t fSampleCount = 1;
|
26
|
-
skgpu::Mipmapped fMipmapped = skgpu::Mipmapped::kNo;
|
27
28
|
|
29
|
+
class SK_API MtlTextureInfo final : public TextureInfo::Data {
|
30
|
+
public:
|
28
31
|
MTLPixelFormat fFormat = MTLPixelFormatInvalid;
|
29
32
|
MTLTextureUsage fUsage = MTLTextureUsageUnknown;
|
30
33
|
MTLStorageMode fStorageMode = MTLStorageModeShared;
|
@@ -38,13 +41,34 @@ struct SK_API MtlTextureInfo {
|
|
38
41
|
MTLTextureUsage usage,
|
39
42
|
MTLStorageMode storageMode,
|
40
43
|
bool framebufferOnly)
|
41
|
-
:
|
42
|
-
, fMipmapped(mipmapped)
|
44
|
+
: Data(sampleCount, mipmapped)
|
43
45
|
, fFormat(format)
|
44
46
|
, fUsage(usage)
|
45
47
|
, fStorageMode(storageMode)
|
46
48
|
, fFramebufferOnly(framebufferOnly) {}
|
49
|
+
|
50
|
+
private:
|
51
|
+
friend class TextureInfo;
|
52
|
+
friend class TextureInfoPriv;
|
53
|
+
|
54
|
+
// Non-virtual template API for TextureInfo::Data accessed directly when backend type is known.
|
55
|
+
static constexpr skgpu::BackendApi kBackend = skgpu::BackendApi::kMetal;
|
56
|
+
|
57
|
+
Protected isProtected() const { return Protected::kNo; }
|
58
|
+
TextureFormat viewFormat() const;
|
59
|
+
|
60
|
+
bool serialize(SkWStream*) const;
|
61
|
+
bool deserialize(SkStream*);
|
62
|
+
|
63
|
+
// Virtual API when the specific backend type is not available.
|
64
|
+
SkString toBackendString() const override;
|
65
|
+
|
66
|
+
void copyTo(TextureInfo::AnyTextureInfoData& dstData) const override {
|
67
|
+
dstData.emplace<MtlTextureInfo>(*this);
|
68
|
+
}
|
69
|
+
bool isCompatible(const TextureInfo& that, bool requireExact) const override;
|
47
70
|
};
|
71
|
+
|
48
72
|
} // namespace skgpu::graphite
|
49
73
|
|
50
74
|
#endif // __OBJC__
|
@@ -1,48 +1,10 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright
|
2
|
+
* Copyright 2022 Google LLC
|
3
3
|
*
|
4
4
|
* Use of this source code is governed by a BSD-style license that can be
|
5
5
|
* found in the LICENSE file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
#include "include/core/SkTypes.h"
|
12
|
-
|
13
|
-
#include "include/gpu/graphite/BackendTexture.h"
|
14
|
-
#include "include/gpu/graphite/TextureInfo.h"
|
15
|
-
#include "include/private/base/SkAPI.h"
|
16
|
-
|
17
|
-
#import <CoreFoundation/CoreFoundation.h>
|
18
|
-
|
19
|
-
namespace skgpu::graphite {
|
20
|
-
|
21
|
-
struct SK_API MtlTextureInfo;
|
22
|
-
|
23
|
-
namespace TextureInfos {
|
24
|
-
SK_API TextureInfo MakeMetal(const MtlTextureInfo&);
|
25
|
-
SK_API TextureInfo MakeMetal(CFTypeRef mtlTexture);
|
26
|
-
|
27
|
-
SK_API bool GetMtlTextureInfo(const TextureInfo&, MtlTextureInfo*);
|
28
|
-
} // namespace TextureInfos
|
29
|
-
|
30
|
-
namespace BackendTextures {
|
31
|
-
// The BackendTexture will not call retain or release on the passed in CFTypeRef. Thus the
|
32
|
-
// client must keep the CFTypeRef valid until they are no longer using the BackendTexture.
|
33
|
-
SK_API BackendTexture MakeMetal(SkISize dimensions, CFTypeRef mtlTexture);
|
34
|
-
|
35
|
-
SK_API CFTypeRef GetMtlTexture(const BackendTexture&);
|
36
|
-
} // namespace BackendTextures
|
37
|
-
|
38
|
-
namespace BackendSemaphores {
|
39
|
-
// TODO(b/286088355) Determine creator's responsibility for setting refcnt.
|
40
|
-
SK_API BackendSemaphore MakeMetal(CFTypeRef mtlEvent, uint64_t value);
|
41
|
-
|
42
|
-
SK_API CFTypeRef GetMtlEvent(const BackendSemaphore&);
|
43
|
-
SK_API uint64_t GetMtlValue(const BackendSemaphore&);
|
44
|
-
} // namespace BackendSemaphores
|
45
|
-
|
46
|
-
} // namespace skgpu::graphite
|
47
|
-
|
48
|
-
#endif // skgpu_graphite_MtlGraphiteTypesUtils_DEFINED
|
8
|
+
// DEPRECRATED: MtlGraphiteTypesUtils.h will be removed in the future, please include
|
9
|
+
// MtlGraphiteTypes_cpp.h
|
10
|
+
#include "include/gpu/graphite/mtl/MtlGraphiteTypes_cpp.h"
|
@@ -0,0 +1,50 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2024 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_MtlGraphiteTypesUtils_DEFINED
|
9
|
+
#define skgpu_graphite_MtlGraphiteTypesUtils_DEFINED
|
10
|
+
|
11
|
+
#include "include/core/SkTypes.h"
|
12
|
+
|
13
|
+
#include "include/gpu/graphite/BackendTexture.h"
|
14
|
+
#include "include/gpu/graphite/TextureInfo.h"
|
15
|
+
#include "include/private/base/SkAPI.h"
|
16
|
+
|
17
|
+
#import <CoreFoundation/CoreFoundation.h>
|
18
|
+
|
19
|
+
namespace skgpu::graphite {
|
20
|
+
|
21
|
+
// MtlTextureInfo requires compiling with Objective-C, so this header is split to allow invoking
|
22
|
+
// the various backend wrapping APIs from a C++-only compilation unit.
|
23
|
+
class SK_API MtlTextureInfo;
|
24
|
+
|
25
|
+
namespace TextureInfos {
|
26
|
+
SK_API TextureInfo MakeMetal(const MtlTextureInfo&);
|
27
|
+
SK_API TextureInfo MakeMetal(CFTypeRef mtlTexture);
|
28
|
+
|
29
|
+
SK_API bool GetMtlTextureInfo(const TextureInfo&, MtlTextureInfo*);
|
30
|
+
} // namespace TextureInfos
|
31
|
+
|
32
|
+
namespace BackendTextures {
|
33
|
+
// The BackendTexture will not call retain or release on the passed in CFTypeRef. Thus the
|
34
|
+
// client must keep the CFTypeRef valid until they are no longer using the BackendTexture.
|
35
|
+
SK_API BackendTexture MakeMetal(SkISize dimensions, CFTypeRef mtlTexture);
|
36
|
+
|
37
|
+
SK_API CFTypeRef GetMtlTexture(const BackendTexture&);
|
38
|
+
} // namespace BackendTextures
|
39
|
+
|
40
|
+
namespace BackendSemaphores {
|
41
|
+
// TODO(b/286088355) Determine creator's responsibility for setting refcnt.
|
42
|
+
SK_API BackendSemaphore MakeMetal(CFTypeRef mtlEvent, uint64_t value);
|
43
|
+
|
44
|
+
SK_API CFTypeRef GetMtlEvent(const BackendSemaphore&);
|
45
|
+
SK_API uint64_t GetMtlValue(const BackendSemaphore&);
|
46
|
+
} // namespace BackendSemaphores
|
47
|
+
|
48
|
+
} // namespace skgpu::graphite
|
49
|
+
|
50
|
+
#endif // skgpu_graphite_MtlGraphiteTypesUtils_DEFINED
|
@@ -5,23 +5,5 @@
|
|
5
5
|
* found in the LICENSE file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
|
9
|
-
#
|
10
|
-
|
11
|
-
#include <memory>
|
12
|
-
|
13
|
-
#include "include/private/base/SkAPI.h"
|
14
|
-
|
15
|
-
namespace skgpu::graphite {
|
16
|
-
|
17
|
-
class Context;
|
18
|
-
struct ContextOptions;
|
19
|
-
struct MtlBackendContext;
|
20
|
-
|
21
|
-
namespace ContextFactory {
|
22
|
-
SK_API std::unique_ptr<Context> MakeMetal(const MtlBackendContext&, const ContextOptions&);
|
23
|
-
} // namespace ContextFactory
|
24
|
-
|
25
|
-
} // namespace skgpu::graphite
|
26
|
-
|
27
|
-
#endif // skgpu_graphite_MtlGraphiteUtils_DEFINED
|
8
|
+
// DEPRECRATED: MtlGraphiteUtils.h will be removed in the future, please include MtlBackendContext.h
|
9
|
+
#include "include/gpu/graphite/mtl/MtlBackendContext.h"
|
@@ -8,12 +8,13 @@
|
|
8
8
|
#ifndef skgpu_graphite_precompile_Precompile_DEFINED
|
9
9
|
#define skgpu_graphite_precompile_Precompile_DEFINED
|
10
10
|
|
11
|
+
#include "include/core/SkColorSpace.h"
|
12
|
+
#include "include/core/SkColorType.h"
|
11
13
|
#include "include/core/SkSpan.h"
|
12
14
|
#include "include/gpu/graphite/GraphiteTypes.h"
|
13
15
|
|
14
16
|
namespace skgpu::graphite {
|
15
17
|
|
16
|
-
class Context;
|
17
18
|
class PaintOptions;
|
18
19
|
class PrecompileContext;
|
19
20
|
|
@@ -23,9 +24,18 @@ class PrecompileContext;
|
|
23
24
|
* a pipeline.
|
24
25
|
*/
|
25
26
|
struct SK_API RenderPassProperties {
|
26
|
-
|
27
|
-
|
28
|
-
|
27
|
+
bool operator==(const RenderPassProperties& other) const {
|
28
|
+
return fDSFlags == other.fDSFlags &&
|
29
|
+
fDstCT == other.fDstCT &&
|
30
|
+
fRequiresMSAA == other.fRequiresMSAA &&
|
31
|
+
SkColorSpace::Equals(fDstCS.get(), other.fDstCS.get());
|
32
|
+
}
|
33
|
+
bool operator!= (const RenderPassProperties& other) const { return !(*this == other); }
|
34
|
+
|
35
|
+
DepthStencilFlags fDSFlags = DepthStencilFlags::kNone;
|
36
|
+
SkColorType fDstCT = kRGBA_8888_SkColorType;
|
37
|
+
sk_sp<SkColorSpace> fDstCS = nullptr;
|
38
|
+
bool fRequiresMSAA = false;
|
29
39
|
};
|
30
40
|
|
31
41
|
/**
|
@@ -11,6 +11,8 @@
|
|
11
11
|
#include "include/gpu/graphite/precompile/PrecompileBase.h"
|
12
12
|
|
13
13
|
#include "include/core/SkBlendMode.h"
|
14
|
+
#include "include/core/SkImageInfo.h"
|
15
|
+
#include "include/effects/SkGradientShader.h"
|
14
16
|
|
15
17
|
class SkColorSpace;
|
16
18
|
|
@@ -109,11 +111,13 @@ namespace PrecompileShaders {
|
|
109
111
|
// time this entry point allows the equivalent precompilation program structure to be created.
|
110
112
|
// Note that this factory is for non-YUV SkImages, the YUVImage factory (below) should be used
|
111
113
|
// to represent the shading and sampling required for YUV images.
|
112
|
-
SK_API sk_sp<PrecompileShader> Image(
|
114
|
+
SK_API sk_sp<PrecompileShader> Image(SkSpan<const SkColorInfo> = {},
|
115
|
+
SkSpan<const SkTileMode> = {});
|
113
116
|
// As with the above Image call, raw ImageShaders are usually created via an
|
114
117
|
// SkImage::makeRawShader call. The RawImage call allows the equivalent precompilation
|
115
118
|
// program structure to be created without needing the SkImage.
|
116
|
-
SK_API sk_sp<PrecompileShader> RawImage(
|
119
|
+
SK_API sk_sp<PrecompileShader> RawImage(SkSpan<const SkColorInfo> = {},
|
120
|
+
SkSpan<const SkTileMode> = {});
|
117
121
|
|
118
122
|
// In the main Skia API, the specifics of the SkImage used for the SkImage::makeShader call
|
119
123
|
// can determine whether normal or YUV sampling is required. This entry point allows clients
|
@@ -126,10 +130,14 @@ namespace PrecompileShaders {
|
|
126
130
|
SK_API sk_sp<PrecompileShader> MakeTurbulence();
|
127
131
|
|
128
132
|
// --- This block of four matches all the factories in SkGradientShader (SkGradientShader.h)
|
129
|
-
SK_API sk_sp<PrecompileShader> LinearGradient(
|
130
|
-
|
131
|
-
SK_API sk_sp<PrecompileShader>
|
132
|
-
|
133
|
+
SK_API sk_sp<PrecompileShader> LinearGradient(
|
134
|
+
SkGradientShader::Interpolation = SkGradientShader::Interpolation());
|
135
|
+
SK_API sk_sp<PrecompileShader> RadialGradient(
|
136
|
+
SkGradientShader::Interpolation = SkGradientShader::Interpolation());
|
137
|
+
SK_API sk_sp<PrecompileShader> TwoPointConicalGradient(
|
138
|
+
SkGradientShader::Interpolation = SkGradientShader::Interpolation());
|
139
|
+
SK_API sk_sp<PrecompileShader> SweepGradient(
|
140
|
+
SkGradientShader::Interpolation = SkGradientShader::Interpolation());
|
133
141
|
|
134
142
|
// Normally, SkPicture shaders are only created via SkPicture::makeShader. Since the
|
135
143
|
// SkPicture to be drawn, most likely, won't be available at precompilation time, this
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2022 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_VulkanGraphiteUtils_DEFINED
|
9
|
+
#define skgpu_graphite_VulkanGraphiteUtils_DEFINED
|
10
|
+
|
11
|
+
#include <memory>
|
12
|
+
|
13
|
+
#include "include/private/base/SkAPI.h"
|
14
|
+
|
15
|
+
// NOTE: Because there is already a VulkanBackendContext header shared between Ganesh and Graphite,
|
16
|
+
// this is named VulkanGraphiteContext.h to supply just the factory function (differing from the
|
17
|
+
// public headers exposed by other backends).
|
18
|
+
namespace skgpu { struct VulkanBackendContext; }
|
19
|
+
|
20
|
+
namespace skgpu::graphite {
|
21
|
+
|
22
|
+
class Context;
|
23
|
+
struct ContextOptions;
|
24
|
+
|
25
|
+
namespace ContextFactory {
|
26
|
+
SK_API std::unique_ptr<Context> MakeVulkan(const VulkanBackendContext&, const ContextOptions&);
|
27
|
+
} // namespace ContextFactory
|
28
|
+
|
29
|
+
} // namespace skgpu::graphite
|
30
|
+
|
31
|
+
#endif // skgpu_graphite_VulkanGraphiteUtils_DEFINED
|