@shopify/react-native-skia 0.1.213 → 0.1.215
Sign up to get free protection for your applications and to get access to all the features.
- package/android/cpp/rnskia-android/SkiaOpenGLHelper.h +3 -2
- package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.cpp +9 -2
- package/cpp/api/JsiSkMatrix.h +31 -0
- package/cpp/api/JsiSkPath.h +15 -7
- package/cpp/api/JsiSkSurface.h +4 -1
- package/cpp/skia/include/android/GrAHardwareBufferUtils.h +99 -0
- package/cpp/skia/include/android/SkHeifDecoder.h +10 -3
- package/cpp/skia/include/codec/SkAvifDecoder.h +1 -0
- package/cpp/skia/include/codec/SkBmpDecoder.h +1 -0
- package/cpp/skia/include/codec/SkCodec.h +4 -3
- package/cpp/skia/include/codec/SkEncodedImageFormat.h +0 -3
- package/cpp/skia/include/codec/SkGifDecoder.h +1 -0
- package/cpp/skia/include/codec/SkIcoDecoder.h +1 -0
- package/cpp/skia/include/codec/SkJpegDecoder.h +1 -0
- package/cpp/skia/include/codec/SkJpegxlDecoder.h +1 -0
- package/cpp/skia/include/codec/SkPngDecoder.h +1 -0
- package/cpp/skia/include/codec/SkRawDecoder.h +1 -0
- package/cpp/skia/include/codec/SkWbmpDecoder.h +1 -0
- package/cpp/skia/include/codec/SkWebpDecoder.h +1 -0
- package/cpp/skia/include/config/SkUserConfig.h +0 -2
- package/cpp/skia/include/core/SkBitmap.h +8 -8
- package/cpp/skia/include/core/SkCanvas.h +37 -50
- package/cpp/skia/include/core/SkCapabilities.h +2 -7
- package/cpp/skia/include/core/SkColor.h +1 -1
- package/cpp/skia/include/core/SkColorFilter.h +6 -0
- package/cpp/skia/include/core/SkColorTable.h +3 -0
- package/cpp/skia/include/core/SkColorType.h +2 -0
- package/cpp/skia/include/core/SkContourMeasure.h +12 -8
- package/cpp/skia/include/core/SkDocument.h +1 -0
- package/cpp/skia/include/core/SkFont.h +11 -2
- package/cpp/skia/include/core/SkFontMgr.h +2 -3
- package/cpp/skia/include/core/SkGraphics.h +3 -13
- package/cpp/skia/include/core/SkImage.h +57 -111
- package/cpp/skia/include/core/SkImageFilter.h +6 -1
- package/cpp/skia/include/core/SkImageGenerator.h +8 -0
- package/cpp/skia/include/core/SkImageInfo.h +0 -2
- package/cpp/skia/include/core/SkM44.h +7 -3
- package/cpp/skia/include/core/SkMallocPixelRef.h +4 -1
- package/cpp/skia/include/core/SkMatrix.h +17 -17
- package/cpp/skia/include/core/SkMesh.h +71 -61
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkOverdrawCanvas.h +25 -0
- package/cpp/skia/include/core/SkPaint.h +1 -1
- package/cpp/skia/include/core/SkPath.h +12 -4
- package/cpp/skia/include/core/SkPathMeasure.h +3 -4
- package/cpp/skia/include/core/SkPicture.h +19 -6
- package/cpp/skia/include/core/SkPictureRecorder.h +6 -6
- package/cpp/skia/include/core/SkPixmap.h +2 -3
- package/cpp/skia/include/core/SkRRect.h +1 -1
- package/cpp/skia/include/core/SkRect.h +107 -110
- package/cpp/skia/include/core/SkRefCnt.h +1 -1
- package/cpp/skia/include/core/SkRegion.h +7 -1
- package/cpp/skia/include/core/SkSerialProcs.h +14 -0
- package/cpp/skia/include/core/SkShader.h +9 -0
- package/cpp/skia/include/core/SkStream.h +9 -9
- package/cpp/skia/include/core/SkString.h +1 -1
- package/cpp/skia/include/core/SkSurface.h +14 -25
- package/cpp/skia/include/core/SkTextBlob.h +17 -4
- package/cpp/skia/include/core/SkTiledImageUtils.h +28 -0
- package/cpp/skia/include/core/SkTypeface.h +7 -2
- package/cpp/skia/include/core/SkTypes.h +4 -12
- package/cpp/skia/include/docs/SkPDFDocument.h +17 -3
- package/cpp/skia/include/effects/SkImageFilters.h +73 -24
- package/cpp/skia/include/effects/SkRuntimeEffect.h +20 -51
- package/cpp/skia/include/gpu/GpuTypes.h +13 -0
- package/cpp/skia/include/gpu/GrBackendSurface.h +95 -262
- package/cpp/skia/include/gpu/GrContextOptions.h +7 -1
- package/cpp/skia/include/gpu/GrDirectContext.h +138 -128
- package/cpp/skia/include/gpu/GrRecordingContext.h +9 -4
- package/cpp/skia/include/gpu/GrSurfaceInfo.h +0 -24
- package/cpp/skia/include/gpu/GrTypes.h +16 -1
- package/cpp/skia/include/gpu/GrYUVABackendTextures.h +4 -4
- package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +2 -2
- package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +44 -12
- package/cpp/skia/include/gpu/ganesh/SkMeshGanesh.h +57 -0
- package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +2 -1
- package/cpp/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h +58 -0
- package/cpp/skia/include/gpu/ganesh/gl/GrGLDirectContext.h +29 -0
- package/cpp/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h +1 -1
- package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h +67 -0
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -2
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +14 -3
- package/cpp/skia/include/gpu/graphite/Context.h +93 -13
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +19 -8
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +23 -0
- package/cpp/skia/include/gpu/graphite/Image.h +56 -0
- package/cpp/skia/include/gpu/graphite/ImageProvider.h +5 -0
- package/cpp/skia/include/gpu/graphite/Recorder.h +26 -9
- package/cpp/skia/include/gpu/graphite/Recording.h +7 -5
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +8 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +2 -2
- package/cpp/skia/include/gpu/mtl/GrMtlTypes.h +2 -2
- package/cpp/skia/include/gpu/vk/GrVkTypes.h +4 -3
- package/cpp/skia/include/ports/SkCFObject.h +1 -1
- package/cpp/skia/include/private/SkGainmapInfo.h +4 -13
- package/cpp/skia/include/private/SkJpegGainmapEncoder.h +1 -24
- package/cpp/skia/include/private/SkWeakRefCnt.h +1 -1
- package/cpp/skia/include/private/base/SkAnySubclass.h +73 -0
- package/cpp/skia/include/private/base/SkAssert.h +106 -12
- package/cpp/skia/include/private/base/SkAttributes.h +0 -12
- package/cpp/skia/include/private/base/SkFeatures.h +0 -3
- package/cpp/skia/include/private/base/SkFloatingPoint.h +58 -105
- package/cpp/skia/include/private/base/SkSpan_impl.h +18 -12
- package/cpp/skia/include/private/base/SkTArray.h +22 -17
- package/cpp/skia/include/private/base/SkTDArray.h +5 -6
- package/cpp/skia/include/private/base/SkTemplates.h +50 -30
- package/cpp/skia/include/private/chromium/GrDeferredDisplayListRecorder.h +5 -2
- package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +2 -2
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +13 -8
- package/cpp/skia/include/private/chromium/SkDiscardableMemory.h +1 -1
- package/cpp/skia/include/private/chromium/SkImageChromium.h +16 -3
- package/cpp/skia/include/private/chromium/Slug.h +11 -4
- package/cpp/skia/include/private/gpu/ganesh/GrD3DTypesMinimal.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +6 -9
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +29 -13
- package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +2 -28
- package/cpp/skia/include/private/gpu/graphite/ContextOptionsPriv.h +34 -0
- package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +6 -0
- package/cpp/skia/include/private/gpu/graphite/MtlGraphiteTypesPriv.h +8 -0
- package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +10 -0
- package/cpp/skia/include/utils/SkBase64.h +2 -2
- package/cpp/skia/include/utils/SkNWayCanvas.h +1 -11
- package/cpp/skia/include/utils/SkNoDrawCanvas.h +0 -2
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +1 -2
- package/cpp/skia/include/utils/SkShadowUtils.h +15 -1
- package/cpp/skia/include/utils/SkTextUtils.h +1 -1
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +107 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +3 -2
- package/cpp/skia/modules/skparagraph/include/ParagraphStyle.h +4 -0
- package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +5 -3
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +4 -0
- package/cpp/skia/src/core/SkChecksum.h +2 -1
- package/cpp/skia/src/core/SkPathPriv.h +1 -1
- package/cpp/skia/src/core/SkTHash.h +19 -9
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +3 -1
- package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm +1 -1
- package/lib/commonjs/animation/functions/interpolatePaths.d.ts +1 -1
- package/lib/commonjs/animation/functions/interpolatePaths.js +4 -4
- package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js +5 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/commonjs/external/reanimated/index.d.ts +3 -1
- package/lib/commonjs/external/reanimated/index.js +30 -4
- package/lib/commonjs/external/reanimated/index.js.map +1 -1
- package/lib/commonjs/external/reanimated/interpolators.d.ts +9 -0
- package/lib/commonjs/external/reanimated/interpolators.js +56 -0
- package/lib/commonjs/external/reanimated/interpolators.js.map +1 -0
- package/lib/commonjs/external/reanimated/moduleWrapper.d.ts +8 -6
- package/lib/commonjs/external/reanimated/moduleWrapper.js +8 -18
- package/lib/commonjs/external/reanimated/moduleWrapper.js.map +1 -1
- package/lib/commonjs/external/reanimated/renderHelpers.js +46 -1
- package/lib/commonjs/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/commonjs/external/reanimated/useAnimatedImageValue.d.ts +2 -0
- package/lib/commonjs/external/reanimated/useAnimatedImageValue.js +53 -0
- package/lib/commonjs/external/reanimated/useAnimatedImageValue.js.map +1 -0
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.d.ts +1 -0
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js +27 -0
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js.map +1 -0
- package/lib/commonjs/mock/index.js +8 -0
- package/lib/commonjs/mock/index.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +5 -5
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/skia/core/AnimatedImage.d.ts +0 -1
- package/lib/commonjs/skia/core/AnimatedImage.js +1 -45
- package/lib/commonjs/skia/core/AnimatedImage.js.map +1 -1
- package/lib/commonjs/skia/types/MaskFilter.js +4 -0
- package/lib/commonjs/skia/types/MaskFilter.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix.d.ts +4 -0
- package/lib/commonjs/skia/types/Matrix.js.map +1 -1
- package/lib/commonjs/skia/types/Path/Path.d.ts +10 -9
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMatrix.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js +33 -5
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPath.d.ts +9 -9
- package/lib/commonjs/skia/web/JsiSkPath.js +15 -2
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js +2 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.js +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
- package/lib/commonjs/views/types.js +3 -0
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/module/animation/functions/interpolatePaths.d.ts +1 -1
- package/lib/module/animation/functions/interpolatePaths.js +4 -4
- package/lib/module/animation/functions/interpolatePaths.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Rect.js +5 -1
- package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/module/external/reanimated/index.d.ts +3 -1
- package/lib/module/external/reanimated/index.js +3 -1
- package/lib/module/external/reanimated/index.js.map +1 -1
- package/lib/module/external/reanimated/interpolators.d.ts +9 -0
- package/lib/module/external/reanimated/interpolators.js +34 -0
- package/lib/module/external/reanimated/interpolators.js.map +1 -0
- package/lib/module/external/reanimated/moduleWrapper.d.ts +8 -6
- package/lib/module/external/reanimated/moduleWrapper.js +5 -16
- package/lib/module/external/reanimated/moduleWrapper.js.map +1 -1
- package/lib/module/external/reanimated/renderHelpers.js +48 -2
- package/lib/module/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/module/external/reanimated/useAnimatedImageValue.d.ts +2 -0
- package/lib/module/external/reanimated/useAnimatedImageValue.js +41 -0
- package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -0
- package/lib/module/external/reanimated/useDerivedValueOnJS.d.ts +1 -0
- package/lib/module/external/reanimated/useDerivedValueOnJS.js +16 -0
- package/lib/module/external/reanimated/useDerivedValueOnJS.js.map +1 -0
- package/lib/module/mock/index.js +8 -0
- package/lib/module/mock/index.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +1 -1
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/skia/core/AnimatedImage.d.ts +0 -1
- package/lib/module/skia/core/AnimatedImage.js +0 -40
- package/lib/module/skia/core/AnimatedImage.js.map +1 -1
- package/lib/module/skia/types/MaskFilter.js +3 -0
- package/lib/module/skia/types/MaskFilter.js.map +1 -1
- package/lib/module/skia/types/Matrix.d.ts +4 -0
- package/lib/module/skia/types/Matrix.js.map +1 -1
- package/lib/module/skia/types/Path/Path.d.ts +10 -9
- package/lib/module/skia/types/Path/Path.js.map +1 -1
- package/lib/module/skia/web/JsiSkMatrix.d.ts +6 -0
- package/lib/module/skia/web/JsiSkMatrix.js +33 -5
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/module/skia/web/JsiSkPath.d.ts +9 -9
- package/lib/module/skia/web/JsiSkPath.js +15 -2
- package/lib/module/skia/web/JsiSkPath.js.map +1 -1
- package/lib/module/views/types.js +3 -0
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/jestEnv.d.mts +5 -0
- package/lib/typescript/jestSetup.d.mts +1 -0
- package/lib/typescript/src/animation/functions/interpolatePaths.d.ts +1 -1
- package/lib/typescript/src/external/reanimated/index.d.ts +3 -1
- package/lib/typescript/src/external/reanimated/interpolators.d.ts +9 -0
- package/lib/typescript/src/external/reanimated/moduleWrapper.d.ts +8 -6
- package/lib/typescript/src/external/reanimated/useAnimatedImageValue.d.ts +2 -0
- package/lib/typescript/src/external/reanimated/useDerivedValueOnJS.d.ts +1 -0
- package/lib/typescript/src/skia/core/AnimatedImage.d.ts +0 -1
- package/lib/typescript/src/skia/types/Matrix.d.ts +4 -0
- package/lib/typescript/src/skia/types/Path/Path.d.ts +10 -9
- package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkPath.d.ts +9 -9
- 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.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.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.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.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/Info.plist +5 -5
- 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/libskparagraph.xcframework/Info.plist +5 -5
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.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/libskunicode.xcframework/Info.plist +5 -5
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.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 +4 -3
- package/react-native-skia.podspec +1 -1
- package/src/animation/functions/interpolatePaths.ts +7 -4
- package/src/dom/nodes/datatypes/Rect.ts +6 -2
- package/src/external/reanimated/index.ts +3 -1
- package/src/external/reanimated/interpolators.ts +89 -0
- package/src/external/reanimated/moduleWrapper.ts +38 -25
- package/src/external/reanimated/renderHelpers.ts +42 -2
- package/src/external/reanimated/useAnimatedImageValue.ts +51 -0
- package/src/external/reanimated/useDerivedValueOnJS.ts +25 -0
- package/src/mock/index.ts +5 -0
- package/src/renderer/HostConfig.ts +1 -1
- package/src/skia/core/AnimatedImage.ts +0 -47
- package/src/skia/types/Matrix.ts +4 -0
- package/src/skia/types/Path/Path.ts +10 -9
- package/src/skia/web/JsiSkMatrix.ts +33 -27
- package/src/skia/web/JsiSkPath.ts +15 -2
- package/cpp/skia/include/core/SkDeferredDisplayList.h +0 -15
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +0 -15
- package/cpp/skia/include/core/SkPromiseImageTexture.h +0 -20
- package/cpp/skia/include/core/SkSurfaceCharacterization.h +0 -15
- package/cpp/skia/include/core/SkTime.h +0 -63
- package/cpp/skia/include/effects/SkOpPathEffect.h +0 -43
- package/cpp/skia/include/effects/SkStrokeAndFillPathEffect.h +0 -28
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +0 -32
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +0 -95
- package/cpp/skia/include/private/SkBitmaskEnum.h +0 -59
- package/cpp/skia/include/private/SkSLDefines.h +0 -64
- package/cpp/skia/include/private/SkShadowFlags.h +0 -27
- package/cpp/skia/include/private/gpu/ganesh/GrDawnTypesPriv.h +0 -26
- package/globalJestSetup.js +0 -6
- package/lib/commonjs/external/reanimated/useSharedValueEffect.d.ts +0 -8
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js +0 -52
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js.map +0 -1
- package/lib/module/external/reanimated/useSharedValueEffect.d.ts +0 -8
- package/lib/module/external/reanimated/useSharedValueEffect.js +0 -42
- package/lib/module/external/reanimated/useSharedValueEffect.js.map +0 -1
- package/lib/typescript/globalJestSetup.d.ts +0 -2
- package/lib/typescript/src/external/reanimated/useSharedValueEffect.d.ts +0 -8
- package/src/external/reanimated/useSharedValueEffect.ts +0 -58
- /package/cpp/skia/{include/private/base → src/core}/SkPathEnums.h +0 -0
@@ -17,6 +17,10 @@ class SkData;
|
|
17
17
|
class SkImage;
|
18
18
|
class SkPicture;
|
19
19
|
class SkTypeface;
|
20
|
+
class SkReadBuffer;
|
21
|
+
namespace sktext::gpu {
|
22
|
+
class Slug;
|
23
|
+
}
|
20
24
|
|
21
25
|
/**
|
22
26
|
* A serial-proc is asked to serialize the specified object (e.g. picture or image).
|
@@ -49,6 +53,13 @@ using SkDeserialPictureProc = sk_sp<SkPicture> (*)(const void* data, size_t leng
|
|
49
53
|
*/
|
50
54
|
using SkDeserialImageProc = sk_sp<SkImage> (*)(const void* data, size_t length, void* ctx);
|
51
55
|
|
56
|
+
/**
|
57
|
+
* Slugs are currently only deserializable with a GPU backend. Clients will not be able to
|
58
|
+
* provide a custom mechanism here, but can enable Slug deserialization by calling
|
59
|
+
* sktext::gpu::AddDeserialProcs to add Skia's implementation.
|
60
|
+
*/
|
61
|
+
using SkSlugProc = sk_sp<sktext::gpu::Slug> (*)(SkReadBuffer&, void* ctx);
|
62
|
+
|
52
63
|
/**
|
53
64
|
* Called with the encoded form of a typeface (previously written with a custom
|
54
65
|
* SkSerialTypefaceProc proc). Return a typeface object, or nullptr indicating failure.
|
@@ -73,6 +84,9 @@ struct SK_API SkDeserialProcs {
|
|
73
84
|
SkDeserialImageProc fImageProc = nullptr;
|
74
85
|
void* fImageCtx = nullptr;
|
75
86
|
|
87
|
+
SkSlugProc fSlugProc = nullptr;
|
88
|
+
void* fSlugCtx = nullptr;
|
89
|
+
|
76
90
|
SkDeserialTypefaceProc fTypefaceProc = nullptr;
|
77
91
|
void* fTypefaceCtx = nullptr;
|
78
92
|
|
@@ -67,6 +67,15 @@ public:
|
|
67
67
|
*/
|
68
68
|
sk_sp<SkShader> makeWithColorFilter(sk_sp<SkColorFilter>) const;
|
69
69
|
|
70
|
+
/**
|
71
|
+
* Return a shader that will compute this shader in a specific color space.
|
72
|
+
* By default, all shaders operate in the destination (surface) color space.
|
73
|
+
* The results of a shader are still always converted to the destination - this
|
74
|
+
* API has no impact on simple shaders or images. Primarily, it impacts shaders
|
75
|
+
* that perform mathematical operations, like Blend shaders, or runtime shaders.
|
76
|
+
*/
|
77
|
+
sk_sp<SkShader> makeWithWorkingColorSpace(sk_sp<SkColorSpace>) const;
|
78
|
+
|
70
79
|
private:
|
71
80
|
SkShader() = default;
|
72
81
|
friend class SkShaderBase;
|
@@ -86,22 +86,22 @@ public:
|
|
86
86
|
*/
|
87
87
|
virtual bool isAtEnd() const = 0;
|
88
88
|
|
89
|
-
bool
|
90
|
-
bool
|
91
|
-
bool
|
89
|
+
[[nodiscard]] bool readS8(int8_t*);
|
90
|
+
[[nodiscard]] bool readS16(int16_t*);
|
91
|
+
[[nodiscard]] bool readS32(int32_t*);
|
92
92
|
|
93
|
-
bool
|
94
|
-
bool
|
95
|
-
bool
|
93
|
+
[[nodiscard]] bool readU8(uint8_t* i) { return this->readS8((int8_t*)i); }
|
94
|
+
[[nodiscard]] bool readU16(uint16_t* i) { return this->readS16((int16_t*)i); }
|
95
|
+
[[nodiscard]] bool readU32(uint32_t* i) { return this->readS32((int32_t*)i); }
|
96
96
|
|
97
|
-
bool
|
97
|
+
[[nodiscard]] bool readBool(bool* b) {
|
98
98
|
uint8_t i;
|
99
99
|
if (!this->readU8(&i)) { return false; }
|
100
100
|
*b = (i != 0);
|
101
101
|
return true;
|
102
102
|
}
|
103
|
-
bool
|
104
|
-
bool
|
103
|
+
[[nodiscard]] bool readScalar(SkScalar*);
|
104
|
+
[[nodiscard]] bool readPackedUInt(size_t*);
|
105
105
|
|
106
106
|
//SkStreamRewindable
|
107
107
|
/** Rewinds to the beginning of the stream. Returns true if the stream is known
|
@@ -39,12 +39,6 @@ namespace skgpu::graphite {
|
|
39
39
|
class Recorder;
|
40
40
|
}
|
41
41
|
|
42
|
-
#if !defined(SK_DISABLE_LEGACY_SKSURFACE_FLUSH)
|
43
|
-
enum class GrSemaphoresSubmitted : bool;
|
44
|
-
struct GrFlushInfo;
|
45
|
-
namespace skgpu { class MutableTextureState; }
|
46
|
-
#endif
|
47
|
-
|
48
42
|
namespace SkSurfaces {
|
49
43
|
|
50
44
|
enum class BackendSurfaceAccess {
|
@@ -555,6 +549,20 @@ public:
|
|
555
549
|
ReadPixelsCallback callback,
|
556
550
|
ReadPixelsContext context);
|
557
551
|
|
552
|
+
/**
|
553
|
+
* Identical to asyncRescaleAndReadPixelsYUV420 but a fourth plane is returned in the
|
554
|
+
* AsyncReadResult passed to 'callback'. The fourth plane contains the alpha chanel at the
|
555
|
+
* same full resolution as the Y plane.
|
556
|
+
*/
|
557
|
+
void asyncRescaleAndReadPixelsYUVA420(SkYUVColorSpace yuvColorSpace,
|
558
|
+
sk_sp<SkColorSpace> dstColorSpace,
|
559
|
+
const SkIRect& srcRect,
|
560
|
+
const SkISize& dstSize,
|
561
|
+
RescaleGamma rescaleGamma,
|
562
|
+
RescaleMode rescaleMode,
|
563
|
+
ReadPixelsCallback callback,
|
564
|
+
ReadPixelsContext context);
|
565
|
+
|
558
566
|
/** Copies SkRect of pixels from the src SkPixmap to the SkSurface.
|
559
567
|
|
560
568
|
Source SkRect corners are (0, 0) and (src.width(), src.height()).
|
@@ -643,25 +651,6 @@ private:
|
|
643
651
|
uint32_t fGenerationID;
|
644
652
|
|
645
653
|
using INHERITED = SkRefCnt;
|
646
|
-
|
647
|
-
public:
|
648
|
-
#if !defined(SK_DISABLE_LEGACY_SKSURFACE_FLUSH) && defined(SK_GANESH)
|
649
|
-
using BackendSurfaceAccess = SkSurfaces::BackendSurfaceAccess;
|
650
|
-
GrSemaphoresSubmitted flush(BackendSurfaceAccess access, const GrFlushInfo& info);
|
651
|
-
GrSemaphoresSubmitted flush(const GrFlushInfo& info,
|
652
|
-
const skgpu::MutableTextureState* newState = nullptr);
|
653
|
-
void resolveMSAA();
|
654
|
-
#endif
|
655
|
-
|
656
|
-
#if !defined(SK_DISABLE_LEGACY_SKSURFACE_FLUSH)
|
657
|
-
void flushAndSubmit(bool syncCpu = false);
|
658
|
-
void flush();
|
659
|
-
#endif
|
660
|
-
|
661
|
-
#if !defined(SK_DISABLE_LEGACY_SKSURFACE_AS_IMAGE) && defined(SK_GRAPHITE)
|
662
|
-
sk_sp<SkImage> asImage();
|
663
|
-
#endif
|
664
|
-
|
665
654
|
};
|
666
655
|
|
667
656
|
#endif
|
@@ -9,16 +9,25 @@
|
|
9
9
|
#define SkTextBlob_DEFINED
|
10
10
|
|
11
11
|
#include "include/core/SkFont.h"
|
12
|
-
#include "include/core/
|
12
|
+
#include "include/core/SkFontTypes.h"
|
13
|
+
#include "include/core/SkRect.h"
|
13
14
|
#include "include/core/SkRefCnt.h"
|
14
|
-
#include "include/core/
|
15
|
+
#include "include/core/SkScalar.h"
|
16
|
+
#include "include/core/SkTypes.h"
|
17
|
+
#include "include/private/base/SkDebug.h"
|
15
18
|
#include "include/private/base/SkTemplates.h"
|
16
19
|
|
17
20
|
#include <atomic>
|
21
|
+
#include <cstdint>
|
22
|
+
#include <cstring>
|
18
23
|
|
24
|
+
class SkData;
|
25
|
+
class SkPaint;
|
26
|
+
class SkTypeface;
|
27
|
+
struct SkDeserialProcs;
|
28
|
+
struct SkPoint;
|
19
29
|
struct SkRSXform;
|
20
30
|
struct SkSerialProcs;
|
21
|
-
struct SkDeserialProcs;
|
22
31
|
|
23
32
|
namespace sktext {
|
24
33
|
class GlyphRunList;
|
@@ -248,10 +257,13 @@ private:
|
|
248
257
|
|
249
258
|
static unsigned ScalarsPerGlyph(GlyphPositioning pos);
|
250
259
|
|
260
|
+
using PurgeDelegate = void (*)(uint32_t blobID, uint32_t cacheID);
|
261
|
+
|
251
262
|
// Call when this blob is part of the key to a cache entry. This allows the cache
|
252
263
|
// to know automatically those entries can be purged when this SkTextBlob is deleted.
|
253
|
-
void notifyAddedToCache(uint32_t cacheID) const {
|
264
|
+
void notifyAddedToCache(uint32_t cacheID, PurgeDelegate purgeDelegate) const {
|
254
265
|
fCacheID.store(cacheID);
|
266
|
+
fPurgeDelegate.store(purgeDelegate);
|
255
267
|
}
|
256
268
|
|
257
269
|
friend class sktext::GlyphRunList;
|
@@ -262,6 +274,7 @@ private:
|
|
262
274
|
const SkRect fBounds;
|
263
275
|
const uint32_t fUniqueID;
|
264
276
|
mutable std::atomic<uint32_t> fCacheID;
|
277
|
+
mutable std::atomic<PurgeDelegate> fPurgeDelegate;
|
265
278
|
|
266
279
|
SkDEBUGCODE(size_t fStorageSize;)
|
267
280
|
|
@@ -15,8 +15,18 @@
|
|
15
15
|
#include "include/core/SkSamplingOptions.h"
|
16
16
|
#include "include/core/SkScalar.h"
|
17
17
|
#include "include/private/base/SkAPI.h"
|
18
|
+
|
19
|
+
#include <cstdint>
|
20
|
+
|
18
21
|
class SkPaint;
|
19
22
|
|
23
|
+
/** \namespace SkTiledImageUtils
|
24
|
+
SkTiledImageUtils' DrawImage/DrawImageRect methods are intended to be direct replacements
|
25
|
+
for their SkCanvas equivalents. The SkTiledImageUtils calls will break SkBitmap-backed
|
26
|
+
SkImages into smaller tiles and draw them if the original image is too large to be
|
27
|
+
uploaded to the GPU. If the original image doesn't need tiling or is already gpu-backed
|
28
|
+
the DrawImage/DrawImageRect calls will fall through to the matching SkCanvas call.
|
29
|
+
*/
|
20
30
|
namespace SkTiledImageUtils {
|
21
31
|
|
22
32
|
SK_API void DrawImageRect(SkCanvas* canvas,
|
@@ -92,6 +102,24 @@ inline void DrawImage(SkCanvas* canvas,
|
|
92
102
|
DrawImage(canvas, image.get(), x, y, sampling, paint, constraint);
|
93
103
|
}
|
94
104
|
|
105
|
+
static constexpr int kNumImageKeyValues = 6;
|
106
|
+
|
107
|
+
/** Retrieves a set of values that can be used as part of a cache key for the provided image.
|
108
|
+
|
109
|
+
Unfortunately, SkImage::uniqueID isn't sufficient as an SkImage cache key. In particular,
|
110
|
+
SkBitmap-backed SkImages can share a single SkBitmap and refer to different subsets of it.
|
111
|
+
In this situation the optimal key is based on the SkBitmap's generation ID and the subset
|
112
|
+
rectangle.
|
113
|
+
For Picture-backed images this method will attempt to generate a concise internally-based
|
114
|
+
key (i.e., containing picture ID, matrix translation, width and height, etc.). For complicated
|
115
|
+
Picture-backed images (i.e., those w/ a paint or a full matrix) it will fall back to
|
116
|
+
using 'image's unique key.
|
117
|
+
|
118
|
+
@param image The image for which key values are desired
|
119
|
+
@param keyValues The resulting key values
|
120
|
+
*/
|
121
|
+
SK_API void GetImageKeyValues(const SkImage* image, uint32_t keyValues[kNumImageKeyValues]);
|
122
|
+
|
95
123
|
} // namespace SkTiledImageUtils
|
96
124
|
|
97
125
|
#endif // SkTiledImageUtils_DEFINED
|
@@ -11,20 +11,25 @@
|
|
11
11
|
#include "include/core/SkFontArguments.h"
|
12
12
|
#include "include/core/SkFontParameters.h"
|
13
13
|
#include "include/core/SkFontStyle.h"
|
14
|
-
#include "include/core/SkFontTypes.h"
|
15
14
|
#include "include/core/SkRect.h"
|
15
|
+
#include "include/core/SkRefCnt.h"
|
16
16
|
#include "include/core/SkString.h"
|
17
|
+
#include "include/core/SkTypes.h"
|
17
18
|
#include "include/private/SkWeakRefCnt.h"
|
18
19
|
#include "include/private/base/SkOnce.h"
|
19
20
|
|
21
|
+
#include <cstddef>
|
22
|
+
#include <cstdint>
|
23
|
+
#include <memory>
|
24
|
+
|
20
25
|
class SkData;
|
21
26
|
class SkDescriptor;
|
22
|
-
class SkFontData;
|
23
27
|
class SkFontDescriptor;
|
24
28
|
class SkScalerContext;
|
25
29
|
class SkStream;
|
26
30
|
class SkStreamAsset;
|
27
31
|
class SkWStream;
|
32
|
+
enum class SkTextEncoding;
|
28
33
|
struct SkAdvancedTypefaceMetrics;
|
29
34
|
struct SkScalerContextEffects;
|
30
35
|
struct SkScalerContextRec;
|
@@ -26,11 +26,7 @@
|
|
26
26
|
#include <climits>
|
27
27
|
#include <cstdint>
|
28
28
|
|
29
|
-
#if defined(SK_GANESH)
|
30
|
-
# if !defined(SK_ENABLE_SKSL)
|
31
|
-
# define SK_ENABLE_SKSL
|
32
|
-
# endif
|
33
|
-
#else
|
29
|
+
#if !defined(SK_GANESH) && !defined(SK_GRAPHITE)
|
34
30
|
# undef SK_GL
|
35
31
|
# undef SK_VULKAN
|
36
32
|
# undef SK_METAL
|
@@ -90,11 +86,6 @@
|
|
90
86
|
#define SK_GAMMA_EXPONENT (0.0f) // SRGB
|
91
87
|
#endif
|
92
88
|
|
93
|
-
#ifndef GR_TEST_UTILS
|
94
|
-
# define GR_TEST_UTILS 0
|
95
|
-
#endif
|
96
|
-
|
97
|
-
|
98
89
|
#if defined(SK_HISTOGRAM_ENUMERATION) || \
|
99
90
|
defined(SK_HISTOGRAM_BOOLEAN) || \
|
100
91
|
defined(SK_HISTOGRAM_EXACT_LINEAR) || \
|
@@ -142,7 +133,8 @@
|
|
142
133
|
#endif
|
143
134
|
|
144
135
|
/**
|
145
|
-
*
|
136
|
+
* These defines are set to 0 or 1, rather than being undefined or defined
|
137
|
+
* TODO: consider updating these for consistency
|
146
138
|
*/
|
147
139
|
|
148
140
|
#if !defined(GR_CACHE_STATS)
|
@@ -154,7 +146,7 @@
|
|
154
146
|
#endif
|
155
147
|
|
156
148
|
#if !defined(GR_GPU_STATS)
|
157
|
-
#if defined(SK_DEBUG) || defined(SK_DUMP_STATS) || GR_TEST_UTILS
|
149
|
+
#if defined(SK_DEBUG) || defined(SK_DUMP_STATS) || defined(GR_TEST_UTILS)
|
158
150
|
#define GR_GPU_STATS 1
|
159
151
|
#else
|
160
152
|
#define GR_GPU_STATS 0
|
@@ -11,8 +11,8 @@
|
|
11
11
|
#include "include/core/SkMilestone.h"
|
12
12
|
#include "include/core/SkScalar.h"
|
13
13
|
#include "include/core/SkString.h"
|
14
|
-
#include "include/core/SkTime.h"
|
15
14
|
#include "include/private/base/SkNoncopyable.h"
|
15
|
+
#include "src/base/SkTime.h"
|
16
16
|
|
17
17
|
#define SKPDF_STRING(X) SKPDF_STRING_IMPL(X)
|
18
18
|
#define SKPDF_STRING_IMPL(X) #X
|
@@ -63,6 +63,20 @@ struct StructureElementNode {
|
|
63
63
|
SkString fLang;
|
64
64
|
};
|
65
65
|
|
66
|
+
struct DateTime {
|
67
|
+
int16_t fTimeZoneMinutes; // The number of minutes that this
|
68
|
+
// is ahead of or behind UTC.
|
69
|
+
uint16_t fYear; //!< e.g. 2005
|
70
|
+
uint8_t fMonth; //!< 1..12
|
71
|
+
uint8_t fDayOfWeek; //!< 0..6, 0==Sunday
|
72
|
+
uint8_t fDay; //!< 1..31
|
73
|
+
uint8_t fHour; //!< 0..23
|
74
|
+
uint8_t fMinute; //!< 0..59
|
75
|
+
uint8_t fSecond; //!< 0..59
|
76
|
+
|
77
|
+
void toISO8601(SkString* dst) const;
|
78
|
+
};
|
79
|
+
|
66
80
|
/** Optional metadata to be passed into the PDF factory function.
|
67
81
|
*/
|
68
82
|
struct Metadata {
|
@@ -96,12 +110,12 @@ struct Metadata {
|
|
96
110
|
/** The date and time the document was created.
|
97
111
|
The zero default value represents an unknown/unset time.
|
98
112
|
*/
|
99
|
-
|
113
|
+
DateTime fCreation = {0, 0, 0, 0, 0, 0, 0, 0};
|
100
114
|
|
101
115
|
/** The date and time the document was most recently modified.
|
102
116
|
The zero default value represents an unknown/unset time.
|
103
117
|
*/
|
104
|
-
|
118
|
+
DateTime fModified = {0, 0, 0, 0, 0, 0, 0, 0};
|
105
119
|
|
106
120
|
/** The DPI (pixels-per-inch) at which features without native PDF support
|
107
121
|
will be rasterized (e.g. draw image with perspective, draw text with
|
@@ -8,52 +8,69 @@
|
|
8
8
|
#ifndef SkImageFilters_DEFINED
|
9
9
|
#define SkImageFilters_DEFINED
|
10
10
|
|
11
|
-
#include "include/core/SkBlendMode.h"
|
12
11
|
#include "include/core/SkColor.h"
|
13
12
|
#include "include/core/SkImage.h"
|
14
13
|
#include "include/core/SkImageFilter.h"
|
15
14
|
#include "include/core/SkPicture.h"
|
16
15
|
#include "include/core/SkRect.h"
|
16
|
+
#include "include/core/SkRefCnt.h"
|
17
|
+
#include "include/core/SkScalar.h"
|
18
|
+
#include "include/core/SkShader.h"
|
17
19
|
#include "include/core/SkTileMode.h"
|
18
20
|
#include "include/core/SkTypes.h"
|
19
|
-
#include "include/effects/SkRuntimeEffect.h"
|
20
21
|
|
21
22
|
#include <cstddef>
|
23
|
+
#include <optional>
|
24
|
+
#include <string_view>
|
25
|
+
#include <utility>
|
22
26
|
|
23
27
|
class SkBlender;
|
24
28
|
class SkColorFilter;
|
25
|
-
class
|
26
|
-
class
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
class SkMatrix;
|
30
|
+
class SkRuntimeShaderBuilder;
|
31
|
+
enum class SkBlendMode;
|
32
|
+
struct SkIPoint;
|
33
|
+
struct SkISize;
|
34
|
+
struct SkPoint3;
|
35
|
+
struct SkSamplingOptions;
|
32
36
|
|
33
37
|
// A set of factory functions providing useful SkImageFilter effects. For image filters that take an
|
34
38
|
// input filter, providing nullptr means it will automatically use the dynamic source image. This
|
35
39
|
// source depends on how the filter is applied, but is either the contents of a saved layer when
|
36
|
-
// drawing with SkCanvas, or an explicit SkImage if using
|
40
|
+
// drawing with SkCanvas, or an explicit SkImage if using one of the SkImages::MakeWithFilter
|
41
|
+
// factories.
|
37
42
|
class SK_API SkImageFilters {
|
38
43
|
public:
|
39
44
|
// This is just a convenience type to allow passing SkIRects, SkRects, and optional pointers
|
40
45
|
// to those types as a crop rect for the image filter factories. It's not intended to be used
|
41
46
|
// directly.
|
42
|
-
struct CropRect {
|
43
|
-
CropRect()
|
47
|
+
struct CropRect : public std::optional<SkRect> {
|
48
|
+
CropRect() {}
|
44
49
|
// Intentionally not explicit so callers don't have to use this type but can use SkIRect or
|
45
50
|
// SkRect as desired.
|
46
|
-
CropRect(
|
47
|
-
CropRect(const
|
48
|
-
CropRect(const SkRect
|
49
|
-
CropRect(const
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
CropRect(const SkIRect& crop) : std::optional<SkRect>(SkRect::Make(crop)) {}
|
52
|
+
CropRect(const SkRect& crop) : std::optional<SkRect>(crop) {}
|
53
|
+
CropRect(const std::optional<SkRect>& crop) : std::optional<SkRect>(crop) {}
|
54
|
+
CropRect(const std::nullopt_t&) : std::optional<SkRect>() {}
|
55
|
+
|
56
|
+
// Backwards compatibility for when the APIs used to explicitly accept "const SkRect*"
|
57
|
+
CropRect(std::nullptr_t) {}
|
58
|
+
CropRect(const SkIRect* optionalCrop) {
|
59
|
+
if (optionalCrop) {
|
60
|
+
*this = SkRect::Make(*optionalCrop);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
CropRect(const SkRect* optionalCrop) {
|
64
|
+
if (optionalCrop) {
|
65
|
+
*this = *optionalCrop;
|
66
|
+
}
|
67
|
+
}
|
55
68
|
|
56
|
-
|
69
|
+
// std::optional doesn't define == when comparing to another optional...
|
70
|
+
bool operator==(const CropRect& o) const {
|
71
|
+
return this->has_value() == o.has_value() &&
|
72
|
+
(!this->has_value() || this->value() == *o);
|
73
|
+
}
|
57
74
|
};
|
58
75
|
|
59
76
|
/**
|
@@ -128,6 +145,27 @@ public:
|
|
128
145
|
*/
|
129
146
|
static sk_sp<SkImageFilter> Compose(sk_sp<SkImageFilter> outer, sk_sp<SkImageFilter> inner);
|
130
147
|
|
148
|
+
/**
|
149
|
+
* Create a filter that applies a crop to the result of the 'input' filter. Pixels within the
|
150
|
+
* crop rectangle are unmodified from what 'input' produced. Pixels outside of crop match the
|
151
|
+
* provided SkTileMode (defaulting to kDecal).
|
152
|
+
*
|
153
|
+
* NOTE: The optional CropRect argument for many of the factories is equivalent to creating the
|
154
|
+
* filter without a CropRect and then wrapping it in ::Crop(rect, kDecal). Explicitly adding
|
155
|
+
* Crop filters lets you control their tiling and use different geometry for the input and the
|
156
|
+
* output of another filter.
|
157
|
+
*
|
158
|
+
* @param rect The cropping geometry
|
159
|
+
* @param tileMode The tilemode applied to pixels *outside* of 'crop'
|
160
|
+
* @param input The input filter that is cropped, uses source image if this is null
|
161
|
+
*/
|
162
|
+
static sk_sp<SkImageFilter> Crop(const SkRect& rect,
|
163
|
+
SkTileMode tileMode,
|
164
|
+
sk_sp<SkImageFilter> input);
|
165
|
+
static sk_sp<SkImageFilter> Crop(const SkRect& rect, sk_sp<SkImageFilter> input) {
|
166
|
+
return Crop(rect, SkTileMode::kDecal, std::move(input));
|
167
|
+
}
|
168
|
+
|
131
169
|
/**
|
132
170
|
* Create a filter that moves each pixel in its color input based on an (x,y) vector encoded
|
133
171
|
* in its displacement input filter. Two color components of the displacement image are
|
@@ -179,6 +217,11 @@ public:
|
|
179
217
|
SkColor color, sk_sp<SkImageFilter> input,
|
180
218
|
const CropRect& cropRect = {});
|
181
219
|
|
220
|
+
/**
|
221
|
+
* Create a filter that always produces transparent black.
|
222
|
+
*/
|
223
|
+
static sk_sp<SkImageFilter> Empty();
|
224
|
+
|
182
225
|
/**
|
183
226
|
* Create a filter that draws the 'srcRect' portion of image into 'dstRect' using the given
|
184
227
|
* filter quality. Similar to SkCanvas::drawImageRect. The returned image filter evaluates
|
@@ -311,7 +354,6 @@ public:
|
|
311
354
|
return Picture(std::move(pic), target);
|
312
355
|
}
|
313
356
|
|
314
|
-
#ifdef SK_ENABLE_SKSL
|
315
357
|
/**
|
316
358
|
* Create a filter that fills the output with the per-pixel evaluation of the SkShader produced
|
317
359
|
* by the SkRuntimeShaderBuilder. The shader is defined in the image filter's local coordinate
|
@@ -320,6 +362,8 @@ public:
|
|
320
362
|
* This variant assumes that the runtime shader samples 'childShaderName' with the same input
|
321
363
|
* coordinate passed to to shader.
|
322
364
|
*
|
365
|
+
* This requires a GPU backend or SkSL to be compiled in.
|
366
|
+
*
|
323
367
|
* @param builder The builder used to produce the runtime shader, that will in turn
|
324
368
|
* fill the result image
|
325
369
|
* @param childShaderName The name of the child shader defined in the builder that will be
|
@@ -343,6 +387,8 @@ public:
|
|
343
387
|
*
|
344
388
|
* This allows Skia to provide sampleable values for the image filter without worrying about
|
345
389
|
* boundary conditions.
|
390
|
+
*
|
391
|
+
* This requires a GPU backend or SkSL to be compiled in.
|
346
392
|
*/
|
347
393
|
static sk_sp<SkImageFilter> RuntimeShader(const SkRuntimeShaderBuilder& builder,
|
348
394
|
SkScalar sampleRadius,
|
@@ -354,6 +400,8 @@ public:
|
|
354
400
|
* by the SkRuntimeShaderBuilder. The shader is defined in the image filter's local coordinate
|
355
401
|
* system, so it will automatically be affected by SkCanvas' transform.
|
356
402
|
*
|
403
|
+
* This requires a GPU backend or SkSL to be compiled in.
|
404
|
+
*
|
357
405
|
* @param builder The builder used to produce the runtime shader, that will in turn
|
358
406
|
* fill the result image
|
359
407
|
* @param childShaderNames The names of the child shaders defined in the builder that will be
|
@@ -378,13 +426,14 @@ public:
|
|
378
426
|
* inform Skia that the runtime shader guarantees that all dynamic children (defined in
|
379
427
|
* childShaderNames) will be evaluated with coordinates at most 'maxSampleRadius' away from the
|
380
428
|
* coordinate provided to the runtime shader itself.
|
429
|
+
*
|
430
|
+
* This requires a GPU backend or SkSL to be compiled in.
|
381
431
|
*/
|
382
432
|
static sk_sp<SkImageFilter> RuntimeShader(const SkRuntimeShaderBuilder& builder,
|
383
433
|
SkScalar maxSampleRadius,
|
384
434
|
std::string_view childShaderNames[],
|
385
435
|
const sk_sp<SkImageFilter> inputs[],
|
386
436
|
int inputCount);
|
387
|
-
#endif // SK_ENABLE_SKSL
|
388
437
|
|
389
438
|
enum class Dither : bool {
|
390
439
|
kNo = false,
|