@shopify/react-native-skia 1.3.13 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/android/CMakeLists.txt +9 -4
- package/android/cpp/rnskia-android/RNSkAndroidPlatformContext.h +6 -0
- package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.cpp +81 -0
- package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.h +40 -0
- package/cpp/api/JsiSkApi.h +2 -0
- package/cpp/api/JsiSkPath.h +29 -19
- package/cpp/api/JsiSkRuntimeEffect.h +7 -0
- package/cpp/api/JsiSkiaContext.h +79 -0
- package/cpp/rnskia/RNSkPlatformContext.h +4 -0
- package/cpp/rnskia/SkiaContext.h +22 -0
- package/cpp/skia/include/android/GrAHardwareBufferUtils.h +2 -2
- package/cpp/skia/include/android/SkImageAndroid.h +1 -1
- package/cpp/skia/include/android/SkSurfaceAndroid.h +1 -1
- package/cpp/skia/include/codec/SkAndroidCodec.h +13 -9
- package/cpp/skia/include/codec/SkCodec.h +28 -5
- package/cpp/skia/include/core/SkArc.h +69 -0
- package/cpp/skia/include/core/SkBitmap.h +10 -0
- package/cpp/skia/include/core/SkBlender.h +2 -3
- package/cpp/skia/include/core/SkCanvas.h +86 -16
- package/cpp/skia/include/core/SkCapabilities.h +0 -4
- package/cpp/skia/include/core/SkColorFilter.h +4 -4
- package/cpp/skia/include/core/SkColorPriv.h +5 -7
- package/cpp/skia/include/core/SkColorType.h +2 -0
- package/cpp/skia/include/core/SkFlattenable.h +1 -1
- package/cpp/skia/include/core/SkFontArguments.h +3 -1
- package/cpp/skia/include/core/SkFontParameters.h +3 -2
- package/cpp/skia/include/core/SkFourByteTag.h +19 -0
- package/cpp/skia/include/core/SkImage.h +41 -1
- package/cpp/skia/include/core/SkImageGenerator.h +0 -5
- package/cpp/skia/include/core/SkImageInfo.h +20 -0
- package/cpp/skia/include/core/SkM44.h +1 -1
- package/cpp/skia/include/core/SkMatrix.h +2 -1
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkPaint.h +1 -1
- package/cpp/skia/include/core/SkPath.h +20 -6
- package/cpp/skia/include/core/SkPathMeasure.h +1 -0
- package/cpp/skia/include/core/SkPicture.h +5 -5
- package/cpp/skia/include/core/SkPoint3.h +2 -12
- package/cpp/skia/include/core/SkRRect.h +5 -0
- package/cpp/skia/include/core/SkRect.h +5 -16
- package/cpp/skia/include/core/SkRefCnt.h +2 -0
- package/cpp/skia/include/core/SkScalar.h +20 -32
- package/cpp/skia/include/core/SkShader.h +17 -0
- package/cpp/skia/include/core/SkSize.h +2 -1
- package/cpp/skia/include/core/SkStream.h +2 -3
- package/cpp/skia/include/core/SkStrokeRec.h +6 -1
- package/cpp/skia/include/core/SkSurface.h +13 -4
- package/cpp/skia/include/core/SkSurfaceProps.h +5 -0
- package/cpp/skia/include/core/SkSwizzle.h +3 -1
- package/cpp/skia/include/core/SkTypeface.h +1 -0
- package/cpp/skia/include/core/SkTypes.h +1 -19
- package/cpp/skia/include/core/SkUnPreMultiply.h +4 -5
- package/cpp/skia/include/core/SkVertices.h +4 -2
- package/cpp/skia/include/docs/SkPDFDocument.h +11 -14
- package/cpp/skia/include/effects/SkHighContrastFilter.h +6 -6
- package/cpp/skia/include/effects/SkImageFilters.h +49 -23
- package/cpp/skia/include/effects/SkRuntimeEffect.h +51 -70
- package/cpp/skia/include/effects/SkShaderMaskFilter.h +2 -0
- package/cpp/skia/include/effects/SkTableMaskFilter.h +2 -0
- package/cpp/skia/include/gpu/GrBackendSemaphore.h +2 -120
- package/cpp/skia/include/gpu/GrBackendSurface.h +2 -466
- package/cpp/skia/include/gpu/GrContextOptions.h +2 -368
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +2 -179
- package/cpp/skia/include/gpu/GrDirectContext.h +2 -1011
- package/cpp/skia/include/gpu/GrDriverBugWorkarounds.h +2 -47
- package/cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h +2 -41
- package/cpp/skia/include/gpu/GrRecordingContext.h +2 -279
- package/cpp/skia/include/gpu/GrTypes.h +2 -238
- package/cpp/skia/include/gpu/GrYUVABackendTextures.h +2 -118
- package/cpp/skia/include/gpu/d3d/GrD3DBackendContext.h +2 -29
- package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +2 -242
- package/cpp/skia/include/gpu/ganesh/GrBackendSemaphore.h +80 -0
- package/cpp/skia/include/gpu/ganesh/GrBackendSurface.h +412 -0
- package/cpp/skia/include/gpu/ganesh/GrContextOptions.h +386 -0
- package/cpp/skia/include/gpu/ganesh/GrContextThreadSafeProxy.h +175 -0
- package/cpp/skia/include/gpu/ganesh/GrDirectContext.h +993 -0
- package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkarounds.h +53 -0
- package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkaroundsAutogen.h +45 -0
- package/cpp/skia/include/gpu/ganesh/GrExternalTextureGenerator.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrRecordingContext.h +285 -0
- package/cpp/skia/include/gpu/ganesh/GrTypes.h +177 -0
- package/cpp/skia/include/gpu/ganesh/GrYUVABackendTextures.h +130 -0
- package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +1 -1
- package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +1 -1
- package/cpp/skia/include/gpu/ganesh/d3d/GrD3DBackendContext.h +35 -0
- package/cpp/skia/include/gpu/ganesh/d3d/GrD3DTypes.h +248 -0
- package/cpp/skia/include/gpu/ganesh/gl/GrGLAssembleHelpers.h +17 -0
- package/cpp/skia/include/gpu/ganesh/gl/GrGLAssembleInterface.h +45 -0
- package/cpp/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/GrGLConfig.h +69 -0
- package/cpp/skia/include/gpu/ganesh/gl/GrGLExtensions.h +79 -0
- package/cpp/skia/include/gpu/ganesh/gl/GrGLFunctions.h +306 -0
- package/cpp/skia/include/gpu/ganesh/gl/GrGLInterface.h +338 -0
- package/cpp/skia/include/gpu/ganesh/gl/GrGLMakeWebGLInterface.h +19 -0
- package/cpp/skia/include/gpu/ganesh/gl/GrGLTypes.h +219 -0
- package/cpp/skia/include/gpu/{gl → ganesh/gl}/egl/GrGLMakeEGLInterface.h +2 -2
- package/cpp/skia/include/gpu/ganesh/gl/epoxy/GrGLMakeEpoxyEGLInterface.h +20 -0
- package/cpp/skia/include/gpu/ganesh/gl/ios/GrGLMakeIOSInterface.h +20 -0
- package/cpp/skia/include/gpu/ganesh/gl/mac/GrGLMakeMacInterface.h +20 -0
- package/cpp/skia/include/gpu/ganesh/gl/win/GrGLMakeWinInterface.h +20 -0
- package/cpp/skia/include/gpu/ganesh/mock/GrMockTypes.h +166 -0
- package/cpp/skia/include/gpu/{mtl → ganesh/mtl}/GrMtlBackendContext.h +2 -2
- package/cpp/skia/include/gpu/ganesh/mtl/GrMtlBackendSemaphore.h +23 -0
- package/cpp/skia/include/gpu/ganesh/mtl/GrMtlBackendSurface.h +44 -0
- package/cpp/skia/include/gpu/ganesh/mtl/GrMtlDirectContext.h +30 -0
- package/cpp/skia/include/gpu/{mtl → ganesh/mtl}/GrMtlTypes.h +1 -3
- package/cpp/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h +2 -2
- package/cpp/skia/include/gpu/ganesh/vk/GrBackendDrawableInfo.h +2 -2
- package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSemaphore.h +1 -1
- package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h +7 -3
- package/cpp/skia/include/gpu/ganesh/vk/GrVkDirectContext.h +6 -3
- package/cpp/skia/include/gpu/ganesh/vk/GrVkTypes.h +101 -0
- package/cpp/skia/include/gpu/gl/GrGLAssembleHelpers.h +2 -9
- package/cpp/skia/include/gpu/gl/GrGLAssembleInterface.h +2 -38
- package/cpp/skia/include/gpu/gl/GrGLConfig.h +2 -73
- package/cpp/skia/include/gpu/gl/GrGLExtensions.h +2 -72
- package/cpp/skia/include/gpu/gl/GrGLFunctions.h +2 -301
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -332
- package/cpp/skia/include/gpu/gl/GrGLTypes.h +2 -213
- package/cpp/skia/include/gpu/graphite/BackendSemaphore.h +20 -41
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +18 -118
- package/cpp/skia/include/gpu/graphite/Context.h +122 -44
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +30 -3
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +45 -17
- package/cpp/skia/include/gpu/graphite/Image.h +56 -54
- package/cpp/skia/include/gpu/graphite/Recorder.h +68 -14
- package/cpp/skia/include/gpu/graphite/Recording.h +3 -3
- package/cpp/skia/include/gpu/graphite/Surface.h +6 -2
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +36 -117
- package/cpp/skia/include/gpu/graphite/dawn/DawnTypes.h +108 -6
- package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +4 -1
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +41 -25
- package/cpp/skia/include/gpu/graphite/precompile/PaintOptions.h +197 -0
- package/cpp/skia/include/gpu/graphite/precompile/Precompile.h +48 -0
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileBase.h +84 -0
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileBlender.h +56 -0
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileColorFilter.h +85 -0
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileImageFilter.h +119 -0
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileMaskFilter.h +51 -0
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileRuntimeEffect.h +47 -0
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileShader.h +170 -0
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +24 -2
- package/cpp/skia/include/gpu/mock/GrMockTypes.h +2 -157
- package/cpp/skia/include/gpu/mtl/MtlMemoryAllocator.h +2 -0
- package/cpp/skia/include/gpu/vk/GrVkTypes.h +2 -101
- package/cpp/skia/include/gpu/vk/VulkanBackendContext.h +13 -8
- package/cpp/skia/include/gpu/vk/VulkanExtensions.h +9 -3
- package/cpp/skia/include/gpu/vk/VulkanMemoryAllocator.h +4 -1
- package/cpp/skia/include/gpu/vk/VulkanTypes.h +25 -8
- package/cpp/skia/include/ports/SkFontMgr_Fontations.h +20 -0
- package/cpp/skia/include/ports/SkFontMgr_android.h +7 -0
- package/cpp/skia/include/ports/SkImageGeneratorCG.h +3 -1
- package/cpp/skia/include/ports/SkTypeface_win.h +0 -17
- package/cpp/skia/include/private/SkEncodedInfo.h +8 -2
- package/cpp/skia/include/private/SkExif.h +28 -75
- package/cpp/skia/include/private/SkGainmapInfo.h +47 -7
- package/cpp/skia/include/private/SkJpegMetadataDecoder.h +12 -0
- package/cpp/skia/include/private/SkPathRef.h +52 -44
- package/cpp/skia/include/private/SkXmp.h +13 -4
- package/cpp/skia/include/private/base/SkASAN.h +56 -0
- package/cpp/skia/include/private/base/SkAlign.h +5 -0
- package/cpp/skia/include/private/base/SkContainers.h +10 -2
- package/cpp/skia/include/private/base/SkFeatures.h +22 -1
- package/cpp/skia/include/private/base/SkFloatingPoint.h +51 -65
- package/cpp/skia/include/private/base/SkMacros.h +67 -0
- package/cpp/skia/include/private/base/SkMalloc.h +8 -0
- package/cpp/skia/include/private/base/SkPoint_impl.h +2 -11
- package/cpp/skia/include/private/base/SkTArray.h +108 -23
- package/cpp/skia/include/private/base/SkTFitsIn.h +1 -12
- package/cpp/skia/include/private/chromium/GrDeferredDisplayList.h +1 -1
- package/cpp/skia/include/private/chromium/GrDeferredDisplayListRecorder.h +0 -39
- package/cpp/skia/include/private/chromium/GrPromiseImageTexture.h +1 -1
- package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +3 -3
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +1 -4
- package/cpp/skia/include/private/chromium/Slug.h +5 -11
- package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrD3DTypesMinimal.h +2 -2
- package/cpp/skia/include/private/gpu/ganesh/GrTextureGenerator.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +21 -93
- package/cpp/skia/include/private/gpu/vk/SkiaVulkan.h +2 -2
- package/cpp/skia/include/utils/SkCustomTypeface.h +1 -0
- package/cpp/skia/include/utils/SkNWayCanvas.h +1 -1
- package/cpp/skia/include/utils/SkParse.h +0 -1
- package/cpp/skia/modules/skcms/src/Transform_inl.h +59 -56
- package/cpp/skia/modules/skcms/src/skcms_Transform.h +3 -0
- package/cpp/skia/modules/skcms/src/skcms_internals.h +2 -0
- package/cpp/skia/modules/skcms/src/skcms_public.h +46 -14
- package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +15 -1
- package/cpp/skia/modules/skparagraph/include/TextStyle.h +2 -2
- package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +2 -4
- package/cpp/skia/modules/skresources/include/SkResources.h +1 -1
- package/cpp/skia/modules/skshaper/include/SkShaper.h +316 -0
- package/cpp/skia/modules/skshaper/include/SkShaper_coretext.h +19 -0
- package/cpp/skia/modules/skshaper/include/SkShaper_factory.h +41 -0
- package/cpp/skia/modules/skshaper/include/SkShaper_harfbuzz.h +39 -0
- package/cpp/skia/modules/skshaper/include/SkShaper_skunicode.h +28 -0
- package/cpp/skia/modules/skunicode/include/SkUnicode.h +6 -23
- package/cpp/skia/modules/svg/include/SkSVGAttribute.h +0 -3
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +12 -2
- package/cpp/skia/modules/svg/include/SkSVGCircle.h +13 -0
- package/cpp/skia/modules/svg/include/SkSVGClipPath.h +6 -0
- package/cpp/skia/modules/svg/include/SkSVGContainer.h +17 -1
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +25 -15
- package/cpp/skia/modules/svg/include/SkSVGEllipse.h +13 -2
- package/cpp/skia/modules/svg/include/SkSVGFe.h +11 -2
- package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +9 -0
- package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +9 -0
- package/cpp/skia/modules/svg/include/SkSVGFeComponentTransfer.h +82 -0
- package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +10 -1
- package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +10 -0
- package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +10 -0
- package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +9 -0
- package/cpp/skia/modules/svg/include/SkSVGFeImage.h +9 -0
- package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +5 -0
- package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +11 -0
- package/cpp/skia/modules/svg/include/SkSVGFeMerge.h +63 -0
- package/cpp/skia/modules/svg/include/SkSVGFeMorphology.h +8 -0
- package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +9 -0
- package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +9 -0
- package/cpp/skia/modules/svg/include/SkSVGFilter.h +9 -0
- package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +3 -3
- package/cpp/skia/modules/svg/include/SkSVGGradient.h +10 -2
- package/cpp/skia/modules/svg/include/SkSVGImage.h +9 -0
- package/cpp/skia/modules/svg/include/SkSVGLine.h +11 -0
- package/cpp/skia/modules/svg/include/SkSVGLinearGradient.h +10 -0
- package/cpp/skia/modules/svg/include/SkSVGMask.h +6 -0
- package/cpp/skia/modules/svg/include/SkSVGNode.h +13 -2
- package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +5 -0
- package/cpp/skia/modules/svg/include/SkSVGPath.h +10 -0
- package/cpp/skia/modules/svg/include/SkSVGPattern.h +5 -0
- package/cpp/skia/modules/svg/include/SkSVGPoly.h +11 -0
- package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +11 -0
- package/cpp/skia/modules/svg/include/SkSVGRect.h +11 -0
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +43 -7
- package/cpp/skia/modules/svg/include/SkSVGSVG.h +7 -0
- package/cpp/skia/modules/svg/include/SkSVGShape.h +8 -2
- package/cpp/skia/modules/svg/include/SkSVGStop.h +5 -3
- package/cpp/skia/modules/svg/include/SkSVGText.h +8 -2
- package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +8 -0
- package/cpp/skia/modules/svg/include/SkSVGTypes.h +9 -0
- package/cpp/skia/modules/svg/include/SkSVGUse.h +7 -0
- package/cpp/skia/src/base/SkMathPriv.h +337 -0
- package/cpp/skia/src/base/SkTLazy.h +208 -0
- package/cpp/skia/src/core/SkTHash.h +58 -7
- package/cpp/skia/src/gpu/ganesh/gl/GrGLDefines.h +3 -0
- package/ios/RNSkia-iOS/RNSkiOSPlatformContext.h +3 -0
- package/ios/RNSkia-iOS/RNSkiOSPlatformContext.mm +7 -0
- package/ios/RNSkia-iOS/SkiaCVPixelBufferUtils.mm +7 -2
- package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.h +78 -0
- package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm +20 -4
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/skia/types/Paragraph/TextStyle.d.ts +2 -2
- package/lib/commonjs/skia/types/Paragraph/TextStyle.js.map +1 -1
- package/lib/commonjs/skia/types/Skia.d.ts +6 -1
- package/lib/commonjs/skia/types/Skia.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkia.js +4 -1
- package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
- package/lib/commonjs/web/WithSkiaWeb.d.ts +11 -4
- package/lib/commonjs/web/WithSkiaWeb.js +3 -2
- package/lib/commonjs/web/WithSkiaWeb.js.map +1 -1
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/skia/types/Paragraph/TextStyle.d.ts +2 -2
- package/lib/module/skia/types/Paragraph/TextStyle.js.map +1 -1
- package/lib/module/skia/types/Skia.d.ts +6 -1
- package/lib/module/skia/types/Skia.js.map +1 -1
- package/lib/module/skia/web/JsiSkia.js +4 -1
- package/lib/module/skia/web/JsiSkia.js.map +1 -1
- package/lib/module/web/WithSkiaWeb.d.ts +11 -4
- package/lib/module/web/WithSkiaWeb.js +3 -2
- package/lib/module/web/WithSkiaWeb.js.map +1 -1
- package/lib/typescript/lib/commonjs/skia/web/JsiSkia.d.ts +1 -0
- package/lib/typescript/lib/commonjs/web/WithSkiaWeb.d.ts +2 -1
- package/lib/typescript/lib/module/skia/Skia.web.d.ts +1 -0
- package/lib/typescript/lib/module/skia/web/JsiSkia.d.ts +1 -0
- package/lib/typescript/lib/module/web/WithSkiaWeb.d.ts +2 -1
- package/lib/typescript/src/skia/types/Paragraph/TextStyle.d.ts +2 -2
- package/lib/typescript/src/skia/types/Skia.d.ts +6 -1
- package/lib/typescript/src/web/WithSkiaWeb.d.ts +11 -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_core.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_core.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_core.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_core.a +0 -0
- package/libs/android/x86_64/libskunicode_icu.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/Info.plist +5 -5
- 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/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/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 +3 -5
- package/react-native-skia.podspec +2 -1
- package/src/renderer/HostConfig.ts +5 -1
- package/src/renderer/__tests__/e2e/ImageFilters.spec.tsx +5 -2
- package/src/renderer/__tests__/e2e/Paths.spec.tsx +12 -5
- package/src/renderer/__tests__/e2e/SDF.spec.tsx +1 -1
- package/src/renderer/__tests__/e2e/Snapshot.spec.tsx +1 -1
- package/src/skia/types/Paragraph/TextStyle.ts +2 -2
- package/src/skia/types/Skia.ts +7 -1
- package/src/skia/web/JsiSkia.ts +3 -0
- package/src/web/WithSkiaWeb.tsx +17 -6
- package/cpp/skia/include/core/SkDrawLooper.h +0 -135
- package/cpp/skia/include/effects/SkBlurDrawLooper.h +0 -26
- package/cpp/skia/include/effects/SkLayerDrawLooper.h +0 -161
- package/cpp/skia/include/gpu/gl/GrGLConfig_chrome.h +0 -14
- package/cpp/skia/include/gpu/vk/GrVkBackendContext.h +0 -84
- package/cpp/skia/include/gpu/vk/GrVkExtensions.h +0 -15
- package/cpp/skia/include/gpu/vk/GrVkMemoryAllocator.h +0 -15
- package/cpp/skia/include/ports/SkFontMgr_indirect.h +0 -102
- package/cpp/skia/include/ports/SkRemotableFontMgr.h +0 -139
- package/cpp/skia/include/private/base/SkFloatBits.h +0 -90
- package/cpp/skia/include/private/gpu/graphite/ContextOptionsPriv.h +0 -69
- package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +0 -54
- package/cpp/skia/include/private/gpu/graphite/MtlGraphiteTypesPriv.h +0 -95
- package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +0 -83
- package/cpp/skia/src/core/SkPathEnums.h +0 -25
- package/cpp/skia/src/core/SkPathPriv.h +0 -540
- package/libs/android/arm64-v8a/libskunicode.a +0 -0
- package/libs/android/armeabi-v7a/libskunicode.a +0 -0
- package/libs/android/x86/libskunicode.a +0 -0
- package/libs/android/x86_64/libskunicode.a +0 -0
- package/libs/ios/libskunicode.xcframework/Info.plist +0 -46
- 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/cpp/skia/include/gpu/{gl → ganesh/gl}/glx/GrGLMakeGLXInterface.h +0 -0
@@ -9,6 +9,7 @@
|
|
9
9
|
#define SkImageFilters_DEFINED
|
10
10
|
|
11
11
|
#include "include/core/SkColor.h"
|
12
|
+
#include "include/core/SkColorSpace.h"
|
12
13
|
#include "include/core/SkImage.h"
|
13
14
|
#include "include/core/SkImageFilter.h"
|
14
15
|
#include "include/core/SkPicture.h"
|
@@ -27,7 +28,7 @@
|
|
27
28
|
class SkBlender;
|
28
29
|
class SkColorFilter;
|
29
30
|
class SkMatrix;
|
30
|
-
class
|
31
|
+
class SkRuntimeEffectBuilder;
|
31
32
|
enum class SkBlendMode;
|
32
33
|
struct SkIPoint;
|
33
34
|
struct SkISize;
|
@@ -188,34 +189,59 @@ public:
|
|
188
189
|
/**
|
189
190
|
* Create a filter that draws a drop shadow under the input content. This filter produces an
|
190
191
|
* image that includes the inputs' content.
|
191
|
-
* @param dx
|
192
|
-
* @param dy
|
193
|
-
* @param sigmaX
|
194
|
-
* @param sigmaY
|
195
|
-
* @param color
|
196
|
-
* @param
|
197
|
-
* @param
|
192
|
+
* @param dx X offset of the shadow.
|
193
|
+
* @param dy Y offset of the shadow.
|
194
|
+
* @param sigmaX blur radius for the shadow, along the X axis.
|
195
|
+
* @param sigmaY blur radius for the shadow, along the Y axis.
|
196
|
+
* @param color color of the drop shadow.
|
197
|
+
* @param colorSpace The color space of the drop shadow color.
|
198
|
+
* @param input The input filter, or will use the source bitmap if this is null.
|
199
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
198
200
|
*/
|
199
201
|
static sk_sp<SkImageFilter> DropShadow(SkScalar dx, SkScalar dy,
|
200
202
|
SkScalar sigmaX, SkScalar sigmaY,
|
201
|
-
|
203
|
+
SkColor4f color, sk_sp<SkColorSpace> colorSpace,
|
204
|
+
sk_sp<SkImageFilter> input,
|
202
205
|
const CropRect& cropRect = {});
|
206
|
+
static sk_sp<SkImageFilter> DropShadow(SkScalar dx, SkScalar dy,
|
207
|
+
SkScalar sigmaX, SkScalar sigmaY,
|
208
|
+
SkColor color, sk_sp<SkImageFilter> input,
|
209
|
+
const CropRect& cropRect = {}) {
|
210
|
+
return DropShadow(dx, dy,
|
211
|
+
sigmaX, sigmaY,
|
212
|
+
SkColor4f::FromColor(color), /*colorSpace=*/nullptr,
|
213
|
+
std::move(input),
|
214
|
+
cropRect);
|
215
|
+
}
|
216
|
+
|
203
217
|
/**
|
204
218
|
* Create a filter that renders a drop shadow, in exactly the same manner as ::DropShadow,
|
205
219
|
* except that the resulting image does not include the input content. This allows the shadow
|
206
220
|
* and input to be composed by a filter DAG in a more flexible manner.
|
207
|
-
* @param dx
|
208
|
-
* @param dy
|
209
|
-
* @param sigmaX
|
210
|
-
* @param sigmaY
|
211
|
-
* @param color
|
212
|
-
* @param
|
213
|
-
* @param
|
221
|
+
* @param dx The X offset of the shadow.
|
222
|
+
* @param dy The Y offset of the shadow.
|
223
|
+
* @param sigmaX The blur radius for the shadow, along the X axis.
|
224
|
+
* @param sigmaY The blur radius for the shadow, along the Y axis.
|
225
|
+
* @param color The color of the drop shadow.
|
226
|
+
* @param colorSpace The color space of the drop shadow color.
|
227
|
+
* @param input The input filter, or will use the source bitmap if this is null.
|
228
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
214
229
|
*/
|
215
230
|
static sk_sp<SkImageFilter> DropShadowOnly(SkScalar dx, SkScalar dy,
|
216
231
|
SkScalar sigmaX, SkScalar sigmaY,
|
217
|
-
|
232
|
+
SkColor4f color, sk_sp<SkColorSpace>,
|
233
|
+
sk_sp<SkImageFilter> input,
|
218
234
|
const CropRect& cropRect = {});
|
235
|
+
static sk_sp<SkImageFilter> DropShadowOnly(SkScalar dx, SkScalar dy,
|
236
|
+
SkScalar sigmaX, SkScalar sigmaY,
|
237
|
+
SkColor color, sk_sp<SkImageFilter> input,
|
238
|
+
const CropRect& cropRect = {}) {
|
239
|
+
return DropShadowOnly(dx, dy,
|
240
|
+
sigmaX, sigmaY,
|
241
|
+
SkColor4f::FromColor(color), /*colorSpace=*/nullptr,
|
242
|
+
std::move(input),
|
243
|
+
cropRect);
|
244
|
+
}
|
219
245
|
|
220
246
|
/**
|
221
247
|
* Create a filter that always produces transparent black.
|
@@ -356,7 +382,7 @@ public:
|
|
356
382
|
|
357
383
|
/**
|
358
384
|
* Create a filter that fills the output with the per-pixel evaluation of the SkShader produced
|
359
|
-
* by the
|
385
|
+
* by the SkRuntimeEffectBuilder. The shader is defined in the image filter's local coordinate
|
360
386
|
* system, so it will automatically be affected by SkCanvas' transform.
|
361
387
|
*
|
362
388
|
* This variant assumes that the runtime shader samples 'childShaderName' with the same input
|
@@ -373,7 +399,7 @@ public:
|
|
373
399
|
* @param input The image filter that will be provided as input to the runtime
|
374
400
|
* shader. If null the implicit source image is used instead
|
375
401
|
*/
|
376
|
-
static sk_sp<SkImageFilter> RuntimeShader(const
|
402
|
+
static sk_sp<SkImageFilter> RuntimeShader(const SkRuntimeEffectBuilder& builder,
|
377
403
|
std::string_view childShaderName,
|
378
404
|
sk_sp<SkImageFilter> input) {
|
379
405
|
return RuntimeShader(builder, /*sampleRadius=*/0.f, childShaderName, std::move(input));
|
@@ -390,14 +416,14 @@ public:
|
|
390
416
|
*
|
391
417
|
* This requires a GPU backend or SkSL to be compiled in.
|
392
418
|
*/
|
393
|
-
static sk_sp<SkImageFilter> RuntimeShader(const
|
419
|
+
static sk_sp<SkImageFilter> RuntimeShader(const SkRuntimeEffectBuilder& builder,
|
394
420
|
SkScalar sampleRadius,
|
395
421
|
std::string_view childShaderName,
|
396
422
|
sk_sp<SkImageFilter> input);
|
397
423
|
|
398
424
|
/**
|
399
425
|
* Create a filter that fills the output with the per-pixel evaluation of the SkShader produced
|
400
|
-
* by the
|
426
|
+
* by the SkRuntimeEffectBuilder. The shader is defined in the image filter's local coordinate
|
401
427
|
* system, so it will automatically be affected by SkCanvas' transform.
|
402
428
|
*
|
403
429
|
* This requires a GPU backend or SkSL to be compiled in.
|
@@ -412,7 +438,7 @@ public:
|
|
412
438
|
* shader. If any are null, the implicit source image is used instead.
|
413
439
|
* @param inputCount How many entries are present in 'childShaderNames' and 'inputs'.
|
414
440
|
*/
|
415
|
-
static sk_sp<SkImageFilter> RuntimeShader(const
|
441
|
+
static sk_sp<SkImageFilter> RuntimeShader(const SkRuntimeEffectBuilder& builder,
|
416
442
|
std::string_view childShaderNames[],
|
417
443
|
const sk_sp<SkImageFilter> inputs[],
|
418
444
|
int inputCount) {
|
@@ -429,7 +455,7 @@ public:
|
|
429
455
|
*
|
430
456
|
* This requires a GPU backend or SkSL to be compiled in.
|
431
457
|
*/
|
432
|
-
static sk_sp<SkImageFilter> RuntimeShader(const
|
458
|
+
static sk_sp<SkImageFilter> RuntimeShader(const SkRuntimeEffectBuilder& builder,
|
433
459
|
SkScalar maxSampleRadius,
|
434
460
|
std::string_view childShaderNames[],
|
435
461
|
const sk_sp<SkImageFilter> inputs[],
|
@@ -134,6 +134,8 @@ public:
|
|
134
134
|
// This flag allows Runtime Effects to access Skia implementation details like sk_FragCoord
|
135
135
|
// and functions with private identifiers (e.g. $rgb_to_hsl).
|
136
136
|
bool allowPrivateAccess = false;
|
137
|
+
// When not 0, this field allows Skia to assign a stable key to a known runtime effect
|
138
|
+
uint32_t fStableKey = 0;
|
137
139
|
|
138
140
|
// TODO(skia:11209) - Replace this with a promised SkCapabilities?
|
139
141
|
// This flag lifts the ES2 restrictions on Runtime Effects that are gated by the
|
@@ -313,6 +315,7 @@ private:
|
|
313
315
|
friend class SkRuntimeEffectPriv;
|
314
316
|
|
315
317
|
uint32_t fHash;
|
318
|
+
uint32_t fStableKey;
|
316
319
|
|
317
320
|
std::unique_ptr<SkSL::Program> fBaseProgram;
|
318
321
|
std::unique_ptr<SkSL::RP::Program> fRPProgram;
|
@@ -325,9 +328,45 @@ private:
|
|
325
328
|
uint32_t fFlags; // Flags
|
326
329
|
};
|
327
330
|
|
328
|
-
/**
|
331
|
+
/**
|
332
|
+
* SkRuntimeEffectBuilder is a utility to simplify creating SkShader, SkColorFilter, and SkBlender
|
333
|
+
* objects from SkRuntimeEffects.
|
334
|
+
*
|
335
|
+
* NOTE: Like SkRuntimeEffect, this API is experimental and subject to change!
|
336
|
+
*
|
337
|
+
* Given an SkRuntimeEffect, the SkRuntimeEffectBuilder manages creating an input data block and
|
338
|
+
* provides named access to the 'uniform' variables in that block, as well as named access
|
339
|
+
* to a list of child shader slots. Usage:
|
340
|
+
*
|
341
|
+
* sk_sp<SkRuntimeEffect> effect = ...;
|
342
|
+
* SkRuntimeEffectBuilder builder(effect);
|
343
|
+
* builder.uniform("some_uniform_float") = 3.14f;
|
344
|
+
* builder.uniform("some_uniform_matrix") = SkM44::Rotate(...);
|
345
|
+
* builder.child("some_child_effect") = mySkImage->makeShader(...);
|
346
|
+
* ...
|
347
|
+
* sk_sp<SkShader> shader = builder.makeShader(nullptr, false);
|
348
|
+
*
|
349
|
+
* Upon calling makeShader, makeColorFilter, or makeBlender, the builder will check the validity
|
350
|
+
* of the SkSL to see if the entry point is correct.
|
351
|
+
*
|
352
|
+
* Note that SkRuntimeEffectBuilder is built entirely on the public API of SkRuntimeEffect,
|
353
|
+
* so can be used as-is or serve as inspiration for other interfaces or binding techniques.
|
354
|
+
*/
|
329
355
|
class SkRuntimeEffectBuilder {
|
330
356
|
public:
|
357
|
+
explicit SkRuntimeEffectBuilder(sk_sp<SkRuntimeEffect> effect)
|
358
|
+
: fEffect(std::move(effect))
|
359
|
+
, fUniforms(SkData::MakeZeroInitialized(fEffect->uniformSize()))
|
360
|
+
, fChildren(fEffect->children().size()) {}
|
361
|
+
explicit SkRuntimeEffectBuilder(sk_sp<SkRuntimeEffect> effect, sk_sp<SkData> uniforms)
|
362
|
+
: fEffect(std::move(effect))
|
363
|
+
, fUniforms(std::move(uniforms))
|
364
|
+
, fChildren(fEffect->children().size()) {}
|
365
|
+
|
366
|
+
// This is currently required by Android Framework but may go away if that dependency
|
367
|
+
// can be removed.
|
368
|
+
SkRuntimeEffectBuilder(const SkRuntimeEffectBuilder&) = default;
|
369
|
+
|
331
370
|
struct BuilderUniform {
|
332
371
|
// Copy 'val' to this variable. No type conversion is performed - 'val' must be same
|
333
372
|
// size as expected by the effect. Information about the variable can be queried by
|
@@ -416,19 +455,17 @@ public:
|
|
416
455
|
sk_sp<const SkData> uniforms() const { return fUniforms; }
|
417
456
|
SkSpan<const SkRuntimeEffect::ChildPtr> children() const { return fChildren; }
|
418
457
|
|
458
|
+
// Build methods, at this point checks are made to ensure the SkSL entry point `main` is correct
|
459
|
+
sk_sp<SkShader> makeShader(const SkMatrix* localMatrix = nullptr) const;
|
460
|
+
sk_sp<SkColorFilter> makeColorFilter() const;
|
461
|
+
sk_sp<SkBlender> makeBlender() const;
|
462
|
+
|
463
|
+
~SkRuntimeEffectBuilder() = default;
|
464
|
+
|
419
465
|
protected:
|
420
466
|
SkRuntimeEffectBuilder() = delete;
|
421
|
-
explicit SkRuntimeEffectBuilder(sk_sp<SkRuntimeEffect> effect)
|
422
|
-
: fEffect(std::move(effect))
|
423
|
-
, fUniforms(SkData::MakeZeroInitialized(fEffect->uniformSize()))
|
424
|
-
, fChildren(fEffect->children().size()) {}
|
425
|
-
explicit SkRuntimeEffectBuilder(sk_sp<SkRuntimeEffect> effect, sk_sp<SkData> uniforms)
|
426
|
-
: fEffect(std::move(effect))
|
427
|
-
, fUniforms(std::move(uniforms))
|
428
|
-
, fChildren(fEffect->children().size()) {}
|
429
467
|
|
430
468
|
SkRuntimeEffectBuilder(SkRuntimeEffectBuilder&&) = default;
|
431
|
-
SkRuntimeEffectBuilder(const SkRuntimeEffectBuilder&) = default;
|
432
469
|
|
433
470
|
SkRuntimeEffectBuilder& operator=(SkRuntimeEffectBuilder&&) = delete;
|
434
471
|
SkRuntimeEffectBuilder& operator=(const SkRuntimeEffectBuilder&) = delete;
|
@@ -444,71 +481,15 @@ private:
|
|
444
481
|
sk_sp<SkRuntimeEffect> fEffect;
|
445
482
|
sk_sp<SkData> fUniforms;
|
446
483
|
std::vector<SkRuntimeEffect::ChildPtr> fChildren;
|
447
|
-
};
|
448
|
-
|
449
|
-
/**
|
450
|
-
* SkRuntimeShaderBuilder is a utility to simplify creating SkShader objects from SkRuntimeEffects.
|
451
|
-
*
|
452
|
-
* NOTE: Like SkRuntimeEffect, this API is experimental and subject to change!
|
453
|
-
*
|
454
|
-
* Given an SkRuntimeEffect, the SkRuntimeShaderBuilder manages creating an input data block and
|
455
|
-
* provides named access to the 'uniform' variables in that block, as well as named access
|
456
|
-
* to a list of child shader slots. Usage:
|
457
|
-
*
|
458
|
-
* sk_sp<SkRuntimeEffect> effect = ...;
|
459
|
-
* SkRuntimeShaderBuilder builder(effect);
|
460
|
-
* builder.uniform("some_uniform_float") = 3.14f;
|
461
|
-
* builder.uniform("some_uniform_matrix") = SkM44::Rotate(...);
|
462
|
-
* builder.child("some_child_effect") = mySkImage->makeShader(...);
|
463
|
-
* ...
|
464
|
-
* sk_sp<SkShader> shader = builder.makeShader(nullptr, false);
|
465
|
-
*
|
466
|
-
* Note that SkRuntimeShaderBuilder is built entirely on the public API of SkRuntimeEffect,
|
467
|
-
* so can be used as-is or serve as inspiration for other interfaces or binding techniques.
|
468
|
-
*/
|
469
|
-
class SK_API SkRuntimeShaderBuilder : public SkRuntimeEffectBuilder {
|
470
|
-
public:
|
471
|
-
explicit SkRuntimeShaderBuilder(sk_sp<SkRuntimeEffect>);
|
472
|
-
// This is currently required by Android Framework but may go away if that dependency
|
473
|
-
// can be removed.
|
474
|
-
SkRuntimeShaderBuilder(const SkRuntimeShaderBuilder&) = default;
|
475
|
-
~SkRuntimeShaderBuilder();
|
476
|
-
|
477
|
-
sk_sp<SkShader> makeShader(const SkMatrix* localMatrix = nullptr) const;
|
478
|
-
|
479
|
-
private:
|
480
|
-
explicit SkRuntimeShaderBuilder(sk_sp<SkRuntimeEffect> effect, sk_sp<SkData> uniforms)
|
481
|
-
: SkRuntimeEffectBuilder(std::move(effect), std::move(uniforms)) {}
|
482
484
|
|
483
485
|
friend class SkRuntimeImageFilter;
|
484
486
|
};
|
485
487
|
|
486
488
|
/**
|
487
|
-
*
|
488
|
-
*/
|
489
|
-
class SK_API SkRuntimeColorFilterBuilder : public SkRuntimeEffectBuilder {
|
490
|
-
public:
|
491
|
-
explicit SkRuntimeColorFilterBuilder(sk_sp<SkRuntimeEffect>);
|
492
|
-
~SkRuntimeColorFilterBuilder();
|
493
|
-
|
494
|
-
SkRuntimeColorFilterBuilder(const SkRuntimeColorFilterBuilder&) = delete;
|
495
|
-
SkRuntimeColorFilterBuilder& operator=(const SkRuntimeColorFilterBuilder&) = delete;
|
496
|
-
|
497
|
-
sk_sp<SkColorFilter> makeColorFilter() const;
|
498
|
-
};
|
499
|
-
|
500
|
-
/**
|
501
|
-
* SkRuntimeBlendBuilder is a utility to simplify creation and uniform setup of runtime blenders.
|
489
|
+
* DEPRECATED: Subclass logic has been moved to base class SkRuntimeEffectBuilder.
|
502
490
|
*/
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
~SkRuntimeBlendBuilder();
|
507
|
-
|
508
|
-
SkRuntimeBlendBuilder(const SkRuntimeBlendBuilder&) = delete;
|
509
|
-
SkRuntimeBlendBuilder& operator=(const SkRuntimeBlendBuilder&) = delete;
|
510
|
-
|
511
|
-
sk_sp<SkBlender> makeBlender() const;
|
512
|
-
};
|
491
|
+
using SkRuntimeShaderBuilder = SkRuntimeEffectBuilder;
|
492
|
+
using SkRuntimeColorFilterBuilder = SkRuntimeEffectBuilder;
|
493
|
+
using SkRuntimeBlendBuilder = SkRuntimeEffectBuilder;
|
513
494
|
|
514
495
|
#endif // SkRuntimeEffect_DEFINED
|
@@ -14,6 +14,8 @@
|
|
14
14
|
class SkMaskFilter;
|
15
15
|
class SkShader;
|
16
16
|
|
17
|
+
// (DEPRECATED) This factory function is deprecated. ShaderMaskFilters will be deleted entirely
|
18
|
+
// in an upcoming Skia release.
|
17
19
|
class SK_API SkShaderMaskFilter {
|
18
20
|
public:
|
19
21
|
static sk_sp<SkMaskFilter> Make(sk_sp<SkShader> shader);
|
@@ -20,6 +20,8 @@ class SkMaskFilter;
|
|
20
20
|
Applies a table lookup on each of the alpha values in the mask.
|
21
21
|
Helper methods create some common tables (e.g. gamma, clipping)
|
22
22
|
*/
|
23
|
+
// (DEPRECATED) These factory functions are deprecated. The TableMaskFilter will be
|
24
|
+
// removed entirely in an upcoming release of Skia.
|
23
25
|
class SK_API SkTableMaskFilter {
|
24
26
|
public:
|
25
27
|
/** Utility that sets the gamma table
|
@@ -4,123 +4,5 @@
|
|
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
|
-
|
8
|
-
#
|
9
|
-
#define GrBackendSemaphore_DEFINED
|
10
|
-
|
11
|
-
#include "include/gpu/GrTypes.h" // IWYU pragma: keep
|
12
|
-
#include "include/private/base/SkAPI.h"
|
13
|
-
#include "include/private/base/SkAnySubclass.h"
|
14
|
-
|
15
|
-
#ifdef SK_METAL
|
16
|
-
#include "include/gpu/mtl/GrMtlTypes.h"
|
17
|
-
#endif
|
18
|
-
|
19
|
-
#if defined(SK_VULKAN) && !defined(SK_DISABLE_LEGACY_VULKAN_BACKENDSEMAPHORE)
|
20
|
-
#include "include/private/gpu/vk/SkiaVulkan.h"
|
21
|
-
#endif
|
22
|
-
|
23
|
-
#ifdef SK_DIRECT3D
|
24
|
-
#include "include/private/gpu/ganesh/GrD3DTypesMinimal.h"
|
25
|
-
#endif
|
26
|
-
|
27
|
-
#include <cstddef>
|
28
|
-
|
29
|
-
class GrBackendSemaphoreData;
|
30
|
-
|
31
|
-
/**
|
32
|
-
* Wrapper class for passing into and receiving data from Ganesh about a backend semaphore object.
|
33
|
-
*/
|
34
|
-
class SK_API GrBackendSemaphore {
|
35
|
-
public:
|
36
|
-
// The GrBackendSemaphore cannot be used until either init* is called, which will set the
|
37
|
-
// appropriate GrBackend.
|
38
|
-
GrBackendSemaphore();
|
39
|
-
~GrBackendSemaphore();
|
40
|
-
GrBackendSemaphore(const GrBackendSemaphore&);
|
41
|
-
GrBackendSemaphore& operator=(const GrBackendSemaphore&);
|
42
|
-
|
43
|
-
#if defined(SK_VULKAN) && !defined(SK_DISABLE_LEGACY_VULKAN_BACKENDSEMAPHORE)
|
44
|
-
void initVulkan(VkSemaphore semaphore);
|
45
|
-
VkSemaphore vkSemaphore() const;
|
46
|
-
#endif
|
47
|
-
|
48
|
-
#ifdef SK_METAL
|
49
|
-
// It is the creator's responsibility to ref the MTLEvent passed in here, via __bridge_retained.
|
50
|
-
// The other end will wrap this BackendSemaphore and take the ref, via __bridge_transfer.
|
51
|
-
void initMetal(GrMTLHandle event, uint64_t value) {
|
52
|
-
fBackend = GrBackendApi::kMetal;
|
53
|
-
fMtlEvent = event;
|
54
|
-
fMtlValue = value;
|
55
|
-
|
56
|
-
fIsInitialized = true;
|
57
|
-
}
|
58
|
-
|
59
|
-
GrMTLHandle mtlSemaphore() const {
|
60
|
-
if (!fIsInitialized || GrBackendApi::kMetal != fBackend) {
|
61
|
-
return nullptr;
|
62
|
-
}
|
63
|
-
return fMtlEvent;
|
64
|
-
}
|
65
|
-
|
66
|
-
uint64_t mtlValue() const {
|
67
|
-
if (!fIsInitialized || GrBackendApi::kMetal != fBackend) {
|
68
|
-
return 0;
|
69
|
-
}
|
70
|
-
return fMtlValue;
|
71
|
-
}
|
72
|
-
|
73
|
-
#endif
|
74
|
-
|
75
|
-
#ifdef SK_DIRECT3D
|
76
|
-
void initDirect3D(const GrD3DFenceInfo& info) {
|
77
|
-
fBackend = GrBackendApi::kDirect3D;
|
78
|
-
this->assignD3DFenceInfo(info);
|
79
|
-
fIsInitialized = true;
|
80
|
-
}
|
81
|
-
#endif
|
82
|
-
|
83
|
-
bool isInitialized() const { return fIsInitialized; }
|
84
|
-
GrBackendApi backend() const { return fBackend; }
|
85
|
-
|
86
|
-
#ifdef SK_DIRECT3D
|
87
|
-
bool getD3DFenceInfo(GrD3DFenceInfo* outInfo) const;
|
88
|
-
#endif
|
89
|
-
|
90
|
-
private:
|
91
|
-
friend class GrBackendSemaphorePriv;
|
92
|
-
friend class GrBackendSemaphoreData;
|
93
|
-
// Size determined by looking at the GrBackendSemaphoreData subclasses, then
|
94
|
-
// guessing-and-checking. Compiler will complain if this is too small - in that case,
|
95
|
-
// just increase the number.
|
96
|
-
inline constexpr static size_t kMaxSubclassSize = 16;
|
97
|
-
using AnySemaphoreData = SkAnySubclass<GrBackendSemaphoreData, kMaxSubclassSize>;
|
98
|
-
|
99
|
-
template <typename SemaphoreData>
|
100
|
-
GrBackendSemaphore(GrBackendApi api, SemaphoreData data) : fBackend(api), fIsInitialized(true) {
|
101
|
-
fSemaphoreData.emplace<SemaphoreData>(data);
|
102
|
-
}
|
103
|
-
|
104
|
-
#ifdef SK_DIRECT3D
|
105
|
-
void assignD3DFenceInfo(const GrD3DFenceInfo& info);
|
106
|
-
#endif
|
107
|
-
|
108
|
-
GrBackendApi fBackend;
|
109
|
-
AnySemaphoreData fSemaphoreData;
|
110
|
-
|
111
|
-
union {
|
112
|
-
void* fPlaceholder; // TODO(293490566)
|
113
|
-
#ifdef SK_METAL
|
114
|
-
GrMTLHandle fMtlEvent; // Expected to be an id<MTLEvent>
|
115
|
-
#endif
|
116
|
-
#ifdef SK_DIRECT3D
|
117
|
-
GrD3DFenceInfo* fD3DFenceInfo;
|
118
|
-
#endif
|
119
|
-
};
|
120
|
-
#ifdef SK_METAL
|
121
|
-
uint64_t fMtlValue;
|
122
|
-
#endif
|
123
|
-
bool fIsInitialized;
|
124
|
-
};
|
125
|
-
|
126
|
-
#endif
|
7
|
+
// TODO(kjlubick, egdaniel) Delete this after migrating clients.
|
8
|
+
#include "include/gpu/ganesh/GrBackendSemaphore.h"
|