@shopify/react-native-skia 0.1.197 → 0.1.200
Sign up to get free protection for your applications and to get access to all the features.
- package/android/CMakeLists.txt +32 -31
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.cpp +4 -2
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +3 -0
- package/cpp/api/JsiSkShaderFactory.h +4 -4
- package/cpp/api/JsiSkSurfaceFactory.h +2 -1
- package/cpp/rnskia/dom/nodes/JsiShaderNodes.h +2 -2
- package/cpp/skia/include/android/SkCanvasAndroid.h +20 -0
- package/cpp/skia/include/android/SkHeifDecoder.h +43 -0
- package/cpp/skia/include/android/SkSurfaceAndroid.h +50 -0
- package/cpp/skia/include/codec/SkAvifDecoder.h +43 -0
- package/cpp/skia/include/codec/SkBmpDecoder.h +43 -0
- package/cpp/skia/include/codec/SkCodec.h +25 -1
- package/cpp/skia/include/codec/SkGifDecoder.h +43 -0
- package/cpp/skia/include/codec/SkIcoDecoder.h +43 -0
- package/cpp/skia/include/codec/SkJpegDecoder.h +43 -0
- package/cpp/skia/include/codec/SkJpegxlDecoder.h +43 -0
- package/cpp/skia/include/codec/SkPngDecoder.h +43 -0
- package/cpp/skia/include/codec/SkRawDecoder.h +49 -0
- package/cpp/skia/include/codec/SkWbmpDecoder.h +43 -0
- package/cpp/skia/include/codec/SkWebpDecoder.h +43 -0
- package/cpp/skia/include/core/SkBBHFactory.h +5 -1
- package/cpp/skia/include/core/SkBlender.h +0 -2
- package/cpp/skia/include/core/SkCanvas.h +4 -23
- package/cpp/skia/include/core/SkColorFilter.h +14 -1
- package/cpp/skia/include/core/SkColorTable.h +59 -0
- package/cpp/skia/include/core/SkContourMeasure.h +3 -0
- package/cpp/skia/include/core/SkDeferredDisplayList.h +8 -104
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +8 -91
- package/cpp/skia/include/core/SkDrawable.h +5 -2
- package/cpp/skia/include/core/SkGraphics.h +7 -19
- package/cpp/skia/include/core/SkImage.h +157 -249
- package/cpp/skia/include/core/SkImageGenerator.h +0 -31
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkPathMeasure.h +3 -3
- package/cpp/skia/include/core/SkPictureRecorder.h +1 -1
- package/cpp/skia/include/core/SkPoint.h +5 -563
- package/cpp/skia/include/core/SkPoint3.h +1 -0
- package/cpp/skia/include/core/SkPromiseImageTexture.h +4 -30
- package/cpp/skia/include/core/SkRect.h +8 -8
- package/cpp/skia/include/core/SkSamplingOptions.h +4 -2
- package/cpp/skia/include/core/SkScalar.h +1 -1
- package/cpp/skia/include/core/SkSerialProcs.h +5 -1
- package/cpp/skia/include/core/SkShader.h +14 -21
- package/cpp/skia/include/core/SkString.h +2 -0
- package/cpp/skia/include/core/SkSurface.h +169 -701
- package/cpp/skia/include/core/SkSurfaceCharacterization.h +8 -256
- package/cpp/skia/include/core/SkTiledImageUtils.h +97 -0
- package/cpp/skia/include/core/SkTypes.h +4 -2
- package/cpp/skia/include/core/SkYUVAPixmaps.h +0 -5
- package/cpp/skia/include/effects/SkGradientShader.h +10 -1
- package/cpp/skia/include/effects/SkImageFilters.h +62 -37
- package/cpp/skia/include/effects/SkPerlinNoiseShader.h +28 -29
- package/cpp/skia/include/effects/SkRuntimeEffect.h +17 -12
- package/cpp/skia/include/gpu/GrBackendSurface.h +12 -39
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +6 -0
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +3 -3
- package/cpp/skia/include/gpu/GrDirectContext.h +103 -3
- package/cpp/skia/include/gpu/GrRecordingContext.h +10 -19
- package/cpp/skia/include/gpu/MutableTextureState.h +4 -0
- package/cpp/skia/include/gpu/ganesh/GrExternalTextureGenerator.h +54 -0
- package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +20 -76
- package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +217 -0
- package/cpp/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h +73 -0
- package/cpp/skia/include/gpu/gl/GrGLTypes.h +13 -2
- package/cpp/skia/include/gpu/graphite/BackendSemaphore.h +78 -0
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +1 -0
- package/cpp/skia/include/gpu/graphite/Image.h +277 -0
- package/cpp/skia/include/gpu/graphite/ImageProvider.h +1 -1
- package/cpp/skia/include/gpu/graphite/Recording.h +1 -4
- package/cpp/skia/include/gpu/graphite/Surface.h +81 -0
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +5 -7
- package/cpp/skia/include/gpu/graphite/YUVABackendTextures.h +2 -2
- package/cpp/skia/include/gpu/mock/GrMockTypes.h +23 -8
- package/cpp/skia/include/ports/SkTypeface_fontations.h +21 -0
- package/cpp/skia/include/private/SkGainmapInfo.h +2 -0
- package/cpp/skia/include/private/SkGainmapShader.h +1 -0
- package/cpp/skia/include/private/SkJpegMetadataDecoder.h +19 -1
- package/cpp/skia/include/private/SkPathRef.h +13 -15
- package/cpp/skia/include/private/SkXmp.h +53 -0
- package/cpp/skia/include/private/base/SkFeatures.h +0 -4
- package/cpp/skia/include/private/base/SkFloatingPoint.h +11 -5
- package/cpp/skia/include/private/base/SkPoint_impl.h +569 -0
- package/cpp/skia/include/private/base/SkSpan_impl.h +3 -7
- package/cpp/skia/include/private/base/SkTArray.h +11 -11
- package/cpp/skia/include/private/chromium/GrDeferredDisplayList.h +120 -0
- package/cpp/skia/include/private/chromium/GrDeferredDisplayListRecorder.h +98 -0
- package/cpp/skia/include/private/chromium/GrPromiseImageTexture.h +43 -0
- package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +215 -0
- package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +6 -6
- package/cpp/skia/include/private/chromium/SkImageChromium.h +104 -0
- package/cpp/skia/include/private/chromium/Slug.h +7 -3
- package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +7 -3
- package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +2 -0
- package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +3 -2
- package/cpp/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h +10 -2
- package/cpp/skia/include/{gpu → private/gpu}/ganesh/GrTextureGenerator.h +2 -13
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +1 -1
- package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +7 -0
- package/cpp/skia/include/private/gpu/graphite/MtlGraphiteTypesPriv.h +19 -6
- package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +13 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +0 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +14 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +999 -79
- package/cpp/skia/modules/skcms/src/Transform_inl.h +36 -236
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +2 -0
- package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +16 -0
- package/cpp/skia/modules/skparagraph/include/TextStyle.h +6 -2
- package/cpp/skia/modules/skresources/include/SkResources.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGCircle.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGClipPath.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGContainer.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGDefs.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGEllipse.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFe.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeImage.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFilter.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGG.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGGradient.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGHiddenContainer.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGImage.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGLine.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGLinearGradient.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGMask.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGNode.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGPath.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGPattern.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGPoly.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGRect.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
- package/cpp/skia/modules/svg/include/SkSVGSVG.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGShape.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGStop.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGTypes.h +21 -21
- package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGValue.h +2 -2
- package/cpp/skia/{include/private → src/core}/SkChecksum.h +32 -17
- package/cpp/skia/src/core/SkTHash.h +1 -1
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +3 -1
- package/ios/RNSkia-iOS/SkiaMetalRenderer.mm +3 -1
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libskottie.a +0 -0
- package/libs/android/arm64-v8a/libsksg.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/libsksg.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/libsksg.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/libsksg.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/ios/libsksg.xcframework/Info.plist +5 -5
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/libsvg.xcframework/Info.plist +5 -5
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +1 -3
- package/cpp/skia/include/effects/SkTableColorFilter.h +0 -29
- package/cpp/skia/include/private/SkOpts_spi.h +0 -23
- package/cpp/skia/include/private/SkSpinlock.h +0 -57
- package/cpp/skia/include/private/chromium/GrSlug.h +0 -16
- package/scripts/install-npm.js +0 -33
@@ -8,17 +8,21 @@
|
|
8
8
|
#ifndef sktext_gpu_Slug_DEFINED
|
9
9
|
#define sktext_gpu_Slug_DEFINED
|
10
10
|
|
11
|
-
#include "include/core/SkData.h"
|
12
11
|
#include "include/core/SkRect.h"
|
13
12
|
#include "include/core/SkRefCnt.h"
|
13
|
+
#include "include/private/base/SkAPI.h"
|
14
|
+
|
15
|
+
#include <cstddef>
|
16
|
+
#include <cstdint>
|
14
17
|
|
15
18
|
class SkCanvas;
|
16
|
-
class
|
19
|
+
class SkData;
|
17
20
|
class SkPaint;
|
18
|
-
class SkTextBlob;
|
19
21
|
class SkReadBuffer;
|
20
22
|
class SkStrikeClient;
|
23
|
+
class SkTextBlob;
|
21
24
|
class SkWriteBuffer;
|
25
|
+
struct SkPoint;
|
22
26
|
|
23
27
|
namespace sktext::gpu {
|
24
28
|
// Slug encapsulates an SkTextBlob at a specific origin, using a specific paint. It can be
|
@@ -9,9 +9,10 @@
|
|
9
9
|
#define GrContext_Base_DEFINED
|
10
10
|
|
11
11
|
#include "include/core/SkRefCnt.h"
|
12
|
-
#include "include/gpu/GrBackendSurface.h"
|
13
|
-
#include "include/gpu/GrContextOptions.h"
|
14
12
|
#include "include/gpu/GrTypes.h"
|
13
|
+
#include "include/private/base/SkAPI.h"
|
14
|
+
|
15
|
+
#include <cstdint>
|
15
16
|
|
16
17
|
class GrBaseContextPriv;
|
17
18
|
class GrCaps;
|
@@ -19,7 +20,10 @@ class GrContextThreadSafeProxy;
|
|
19
20
|
class GrDirectContext;
|
20
21
|
class GrImageContext;
|
21
22
|
class GrRecordingContext;
|
23
|
+
enum SkColorType : int;
|
22
24
|
enum class SkTextureCompressionType;
|
25
|
+
struct GrContextOptions;
|
26
|
+
class GrBackendFormat;
|
23
27
|
|
24
28
|
class GrContext_Base : public SkRefCnt {
|
25
29
|
public:
|
@@ -38,7 +42,7 @@ public:
|
|
38
42
|
/*
|
39
43
|
* Retrieve the default GrBackendFormat for a given SkColorType and renderability.
|
40
44
|
* It is guaranteed that this backend format will be the one used by the GrContext
|
41
|
-
* SkColorType and
|
45
|
+
* SkColorType and GrSurfaceCharacterization-based createBackendTexture methods.
|
42
46
|
*
|
43
47
|
* The caller should check that the returned format is valid.
|
44
48
|
*/
|
@@ -8,9 +8,12 @@
|
|
8
8
|
#ifndef GrImageContext_DEFINED
|
9
9
|
#define GrImageContext_DEFINED
|
10
10
|
|
11
|
+
#include "include/core/SkRefCnt.h"
|
11
12
|
#include "include/private/base/SingleOwner.h"
|
13
|
+
#include "include/private/base/SkAPI.h"
|
12
14
|
#include "include/private/gpu/ganesh/GrContext_Base.h"
|
13
15
|
|
16
|
+
class GrContextThreadSafeProxy;
|
14
17
|
class GrImageContextPriv;
|
15
18
|
|
16
19
|
// This is now just a view on a ThreadSafeProxy, that SkImages can attempt to
|
@@ -48,8 +51,6 @@ private:
|
|
48
51
|
// GrSurfaceDrawContexts. It is also passed to the GrResourceProvider and SkGpuDevice.
|
49
52
|
// TODO: Move this down to GrRecordingContext.
|
50
53
|
mutable skgpu::SingleOwner fSingleOwner;
|
51
|
-
|
52
|
-
using INHERITED = GrContext_Base;
|
53
54
|
};
|
54
55
|
|
55
56
|
#endif
|
@@ -18,7 +18,11 @@
|
|
18
18
|
#include <TargetConditionals.h>
|
19
19
|
|
20
20
|
#if defined(SK_BUILD_FOR_MAC)
|
21
|
-
#if __MAC_OS_X_VERSION_MAX_ALLOWED >=
|
21
|
+
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 130000
|
22
|
+
#define GR_METAL_SDK_VERSION 300
|
23
|
+
#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
|
24
|
+
#define GR_METAL_SDK_VERSION 240
|
25
|
+
#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
|
22
26
|
#define GR_METAL_SDK_VERSION 230
|
23
27
|
#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
|
24
28
|
#define GR_METAL_SDK_VERSION 220
|
@@ -28,7 +32,11 @@
|
|
28
32
|
#error Must use at least 10.14 SDK to build Metal backend for MacOS
|
29
33
|
#endif
|
30
34
|
#else
|
31
|
-
#if __IPHONE_OS_VERSION_MAX_ALLOWED >=
|
35
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 160000 || __TV_OS_VERSION_MAX_ALLOWED >= 160000
|
36
|
+
#define GR_METAL_SDK_VERSION 300
|
37
|
+
#elif __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000 || __TV_OS_VERSION_MAX_ALLOWED >= 150000
|
38
|
+
#define GR_METAL_SDK_VERSION 240
|
39
|
+
#elif __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000 || __TV_OS_VERSION_MAX_ALLOWED >= 140000
|
32
40
|
#define GR_METAL_SDK_VERSION 230
|
33
41
|
#elif __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000
|
34
42
|
#define GR_METAL_SDK_VERSION 220
|
@@ -9,16 +9,13 @@
|
|
9
9
|
#define GrTextureGenerator_DEFINED
|
10
10
|
|
11
11
|
#include "include/core/SkImageGenerator.h"
|
12
|
-
#include "include/core/SkRefCnt.h"
|
13
12
|
#include "include/gpu/GrTypes.h"
|
14
13
|
#include "include/private/base/SkAPI.h"
|
15
14
|
|
16
15
|
#include <cstdint>
|
17
|
-
#include <memory>
|
18
16
|
|
19
17
|
class GrRecordingContext;
|
20
18
|
class GrSurfaceProxyView;
|
21
|
-
class SkImage;
|
22
19
|
enum class GrImageTexGenPolicy : int;
|
23
20
|
namespace skgpu { enum class Mipmapped : bool; }
|
24
21
|
struct SkImageInfo;
|
@@ -51,6 +48,8 @@ public:
|
|
51
48
|
skgpu::Mipmapped mipmapped,
|
52
49
|
GrImageTexGenPolicy);
|
53
50
|
|
51
|
+
// External clients should override GrExternalTextureGenerator instead of trying to implement
|
52
|
+
// this (which uses private Skia types)
|
54
53
|
virtual GrSurfaceProxyView onGenerateTexture(GrRecordingContext*, const SkImageInfo&,
|
55
54
|
skgpu::Mipmapped, GrImageTexGenPolicy) = 0;
|
56
55
|
|
@@ -64,14 +63,4 @@ protected:
|
|
64
63
|
GrTextureGenerator(const SkImageInfo& info, uint32_t uniqueId = kNeedNewImageUniqueID);
|
65
64
|
};
|
66
65
|
|
67
|
-
namespace SkImages {
|
68
|
-
/**
|
69
|
-
* Like SkImages::DeferredFromGenerator except allows for the use of SkGaneshTextureGenerator.
|
70
|
-
*
|
71
|
-
* @param gen producer of textures
|
72
|
-
* @return created SkImage, or nullptr
|
73
|
-
*/
|
74
|
-
SK_API sk_sp<SkImage> DeferredFromTextureGenerator(std::unique_ptr<GrTextureGenerator> gen);
|
75
|
-
}
|
76
|
-
|
77
66
|
#endif // GrTextureGenerator_DEFINED
|
@@ -465,7 +465,7 @@ constexpr static int kGrInternalTextureFlagsMask = static_cast<int>(
|
|
465
465
|
// require that both the surface and proxy have matching values for this flag. Instead we require
|
466
466
|
// if the proxy has it set then the surface must also have it set. All other flags listed here must
|
467
467
|
// match on the proxy and surface.
|
468
|
-
// TODO: Add back kFramebufferOnly flag here once we update
|
468
|
+
// TODO: Add back kFramebufferOnly flag here once we update GrSurfaceCharacterization to take it
|
469
469
|
// as a flag. skbug.com/10672
|
470
470
|
constexpr static int kGrInternalRenderTargetFlagsMask = static_cast<int>(
|
471
471
|
GrInternalSurfaceFlags::kGLRTFBOIDIs0 |
|
@@ -8,6 +8,7 @@
|
|
8
8
|
#ifndef skgpu_graphite_DawnTypesPriv_DEFINED
|
9
9
|
#define skgpu_graphite_DawnTypesPriv_DEFINED
|
10
10
|
|
11
|
+
#include "include/core/SkString.h"
|
11
12
|
#include "include/gpu/graphite/dawn/DawnTypes.h"
|
12
13
|
|
13
14
|
namespace skgpu::graphite {
|
@@ -25,6 +26,12 @@ struct DawnTextureSpec {
|
|
25
26
|
fFormat == that.fFormat;
|
26
27
|
}
|
27
28
|
|
29
|
+
SkString toString() const {
|
30
|
+
return SkStringPrintf("format=0x%08X,usage=0x%08X",
|
31
|
+
static_cast<unsigned int>(fFormat),
|
32
|
+
static_cast<unsigned int>(fUsage));
|
33
|
+
}
|
34
|
+
|
28
35
|
wgpu::TextureFormat fFormat;
|
29
36
|
wgpu::TextureUsage fUsage;
|
30
37
|
};
|
@@ -8,6 +8,7 @@
|
|
8
8
|
#ifndef skgpu_graphite_MtlGraphiteTypesPriv_DEFINED
|
9
9
|
#define skgpu_graphite_MtlGraphiteTypesPriv_DEFINED
|
10
10
|
|
11
|
+
#include "include/core/SkString.h"
|
11
12
|
#include "include/gpu/graphite/GraphiteTypes.h"
|
12
13
|
#include "include/gpu/graphite/mtl/MtlGraphiteTypes.h"
|
13
14
|
|
@@ -19,18 +20,22 @@
|
|
19
20
|
|
20
21
|
// We're using the MSL version as shorthand for the Metal SDK version here
|
21
22
|
#if defined(SK_BUILD_FOR_MAC)
|
22
|
-
#if __MAC_OS_X_VERSION_MAX_ALLOWED >=
|
23
|
-
#define
|
23
|
+
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 130000
|
24
|
+
#define SKGPU_GRAPHITE_METAL_SDK_VERSION 300
|
24
25
|
#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
|
25
|
-
#define
|
26
|
+
#define SKGPU_GRAPHITE_METAL_SDK_VERSION 240
|
27
|
+
#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
|
28
|
+
#define SKGPU_GRAPHITE_METAL_SDK_VERSION 230
|
26
29
|
#else
|
27
30
|
#error Must use at least 11.00 SDK to build Metal backend for MacOS
|
28
31
|
#endif
|
29
32
|
#else
|
30
|
-
#if __IPHONE_OS_VERSION_MAX_ALLOWED >=
|
31
|
-
#define
|
33
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 160000 || __TV_OS_VERSION_MAX_ALLOWED >= 160000
|
34
|
+
#define SKGPU_GRAPHITE_METAL_SDK_VERSION 300
|
32
35
|
#elif __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000 || __TV_OS_VERSION_MAX_ALLOWED >= 150000
|
33
|
-
#define
|
36
|
+
#define SKGPU_GRAPHITE_METAL_SDK_VERSION 240
|
37
|
+
#elif __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000 || __TV_OS_VERSION_MAX_ALLOWED >= 140000
|
38
|
+
#define SKGPU_GRAPHITE_METAL_SDK_VERSION 230
|
34
39
|
#else
|
35
40
|
#error Must use at least 14.00 SDK to build Metal backend for iOS
|
36
41
|
#endif
|
@@ -59,6 +64,14 @@ struct MtlTextureSpec {
|
|
59
64
|
fFramebufferOnly == that.fFramebufferOnly;
|
60
65
|
}
|
61
66
|
|
67
|
+
SkString toString() const {
|
68
|
+
return SkStringPrintf("format=%u,usage=0x%04X,storageMode=%d,framebufferOnly=%d",
|
69
|
+
fFormat,
|
70
|
+
fUsage,
|
71
|
+
fStorageMode,
|
72
|
+
fFramebufferOnly);
|
73
|
+
}
|
74
|
+
|
62
75
|
MtlPixelFormat fFormat;
|
63
76
|
MtlTextureUsage fUsage;
|
64
77
|
MtlStorageMode fStorageMode;
|
@@ -8,6 +8,7 @@
|
|
8
8
|
#ifndef skgpu_graphite_VulkanGraphiteTypesPriv_DEFINED
|
9
9
|
#define skgpu_graphite_VulkanGraphiteTypesPriv_DEFINED
|
10
10
|
|
11
|
+
#include "include/core/SkString.h"
|
11
12
|
#include "include/gpu/graphite/vk/VulkanGraphiteTypes.h"
|
12
13
|
|
13
14
|
namespace skgpu::graphite {
|
@@ -37,6 +38,18 @@ struct VulkanTextureSpec {
|
|
37
38
|
fAspectMask == that.fAspectMask;
|
38
39
|
}
|
39
40
|
|
41
|
+
SkString toString() const {
|
42
|
+
return SkStringPrintf(
|
43
|
+
"flags=0x%08X,format=%d,imageTiling=%d,imageUsageFlags=0x%08X,sharingMode=%d,"
|
44
|
+
"aspectMask=%d",
|
45
|
+
fFlags,
|
46
|
+
fFormat,
|
47
|
+
fImageTiling,
|
48
|
+
fImageUsageFlags,
|
49
|
+
fSharingMode,
|
50
|
+
fAspectMask);
|
51
|
+
}
|
52
|
+
|
40
53
|
VkImageCreateFlags fFlags;
|
41
54
|
VkFormat fFormat;
|
42
55
|
VkImageTiling fImageTiling;
|
@@ -44,7 +44,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
|
|
44
44
|
|
45
45
|
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
46
46
|
struct AHardwareBuffer;
|
47
|
-
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION
|
47
|
+
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 4
|
48
48
|
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
|
49
49
|
typedef struct VkAndroidHardwareBufferUsageANDROID {
|
50
50
|
VkStructureType sType;
|
@@ -90,6 +90,19 @@ typedef struct VkExternalFormatANDROID {
|
|
90
90
|
uint64_t externalFormat;
|
91
91
|
} VkExternalFormatANDROID;
|
92
92
|
|
93
|
+
typedef struct VkAndroidHardwareBufferFormatProperties2ANDROID {
|
94
|
+
VkStructureType sType;
|
95
|
+
void* pNext;
|
96
|
+
VkFormat format;
|
97
|
+
uint64_t externalFormat;
|
98
|
+
VkFormatFeatureFlags2KHR formatFeatures;
|
99
|
+
VkComponentMapping samplerYcbcrConversionComponents;
|
100
|
+
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
101
|
+
VkSamplerYcbcrRange suggestedYcbcrRange;
|
102
|
+
VkChromaLocation suggestedXChromaOffset;
|
103
|
+
VkChromaLocation suggestedYChromaOffset;
|
104
|
+
} VkAndroidHardwareBufferFormatProperties2ANDROID;
|
105
|
+
|
93
106
|
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
94
107
|
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
|
95
108
|
|