@shopify/react-native-skia 2.11.0-next.2 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/cpp/rnskia-android/RNSkAndroidPlatformContext.h +0 -10
- package/android/src/main/java/com/shopify/reactnative/skia/ViewScreenshotService.java +9 -12
- package/apple/RNSkApplePlatformContext.h +0 -3
- package/apple/RNSkApplePlatformContext.mm +0 -11
- package/cpp/api/JsiSkApi.h +0 -6
- package/cpp/api/JsiSkFont.h +2 -8
- package/cpp/api/JsiSkMatrix.h +4 -2
- package/cpp/api/recorder/Convertor.h +62 -11
- package/cpp/api/recorder/Drawings.h +13 -3
- package/cpp/api/recorder/ImageFilters.h +15 -1
- package/cpp/api/recorder/Paint.h +5 -2
- package/cpp/api/third_party/SkottieUtils.cpp +1 -1
- package/cpp/rnskia/RNSkPlatformContext.h +0 -3
- package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +0 -2
- package/cpp/skia/include/android/vk/AndroidVulkanMemoryAllocator.h +1 -1
- package/cpp/skia/include/codec/SkAndroidCodec.h +1 -1
- package/cpp/skia/include/codec/SkAvifDecoder.h +1 -1
- package/cpp/skia/include/codec/SkBmpDecoder.h +1 -1
- package/cpp/skia/include/codec/SkBmpRustDecoder.h +42 -0
- package/cpp/skia/include/codec/SkCodec.h +3 -2
- package/cpp/skia/include/codec/SkGifDecoder.h +1 -1
- package/cpp/skia/include/codec/SkIcoDecoder.h +1 -1
- package/cpp/skia/include/codec/SkJpegDecoder.h +1 -1
- package/cpp/skia/include/codec/SkJpegxlDecoder.h +1 -1
- package/cpp/skia/include/codec/SkPixmapUtils.h +1 -1
- package/cpp/skia/include/codec/SkPngDecoder.h +1 -1
- package/cpp/skia/include/codec/SkPngRustDecoder.h +1 -1
- package/cpp/skia/include/codec/SkRawDecoder.h +1 -1
- package/cpp/skia/include/codec/SkWbmpDecoder.h +1 -1
- package/cpp/skia/include/codec/SkWebpDecoder.h +1 -1
- package/cpp/skia/include/core/SkBitmap.h +3 -3
- package/cpp/skia/include/core/SkCPUContext.h +1 -1
- package/cpp/skia/include/core/SkCPURecorder.h +2 -3
- package/cpp/skia/include/core/SkCanvas.h +23 -15
- package/cpp/skia/include/core/SkColor.h +2 -2
- package/cpp/skia/include/core/SkColorFilter.h +1 -1
- package/cpp/skia/include/core/SkColorSpace.h +2 -2
- package/cpp/skia/include/core/SkColorTable.h +1 -1
- package/cpp/skia/include/core/SkContourMeasure.h +1 -1
- package/cpp/skia/include/core/SkData.h +1 -1
- package/cpp/skia/include/core/SkDataTable.h +2 -2
- package/cpp/skia/include/core/SkDocument.h +1 -1
- package/cpp/skia/include/core/SkDrawable.h +1 -1
- package/cpp/skia/include/core/SkFont.h +2 -2
- package/cpp/skia/include/core/SkFontMetrics.h +1 -1
- package/cpp/skia/include/core/SkFontMgr.h +1 -1
- package/cpp/skia/include/core/SkFontScanner.h +3 -3
- package/cpp/skia/include/core/SkFontStyle.h +1 -1
- package/cpp/skia/include/core/SkGraphics.h +1 -1
- package/cpp/skia/include/core/SkImage.h +1 -1
- package/cpp/skia/include/core/SkImageFilter.h +1 -1
- package/cpp/skia/include/core/SkImageGenerator.h +1 -1
- package/cpp/skia/include/core/SkImageInfo.h +4 -4
- package/cpp/skia/include/core/SkMatrix.h +3 -3
- package/cpp/skia/include/core/SkMesh.h +2 -2
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkOverdrawCanvas.h +1 -1
- package/cpp/skia/include/core/SkPaint.h +4 -4
- package/cpp/skia/include/core/SkPath.h +5 -23
- package/cpp/skia/include/core/SkPathBuilder.h +4 -2
- package/cpp/skia/include/core/SkPathMeasure.h +1 -1
- package/cpp/skia/include/core/SkPictureRecorder.h +1 -1
- package/cpp/skia/include/core/SkPixelRef.h +3 -5
- package/cpp/skia/include/core/SkPixmap.h +7 -2
- package/cpp/skia/include/core/SkPoint.h +555 -5
- package/cpp/skia/include/core/SkPoint3.h +2 -2
- package/cpp/skia/include/core/SkRRect.h +9 -1
- package/cpp/skia/include/core/SkRSXform.h +1 -1
- package/cpp/skia/include/core/SkRecorder.h +2 -3
- package/cpp/skia/include/core/SkRect.h +3 -3
- package/cpp/skia/include/core/SkRefCnt.h +1 -1
- package/cpp/skia/include/core/SkRegion.h +4 -4
- package/cpp/skia/include/core/SkScalar.h +2 -3
- package/cpp/skia/include/core/SkSerialProcs.h +1 -1
- package/cpp/skia/include/core/SkShader.h +1 -1
- package/cpp/skia/include/core/SkSize.h +1 -1
- package/cpp/skia/include/core/SkSpan.h +165 -4
- package/cpp/skia/include/core/SkStream.h +2 -2
- package/cpp/skia/include/core/SkStrikeRef.h +16 -0
- package/cpp/skia/include/core/SkString.h +2 -2
- package/cpp/skia/include/core/SkStrokeRec.h +1 -1
- package/cpp/skia/include/core/SkSurfaceProps.h +1 -1
- package/cpp/skia/include/core/SkSwizzle.h +1 -1
- package/cpp/skia/include/core/SkTextBlob.h +2 -2
- package/cpp/skia/include/core/SkTiledImageUtils.h +1 -1
- package/cpp/skia/include/core/SkTypeface.h +8 -2
- package/cpp/skia/include/core/SkTypes.h +6 -6
- package/cpp/skia/include/core/SkUnPreMultiply.h +1 -1
- package/cpp/skia/include/core/SkVertices.h +1 -1
- package/cpp/skia/include/core/SkYUVAPixmaps.h +1 -1
- package/cpp/skia/include/docs/SkPDFDocument.h +9 -3
- package/cpp/skia/include/effects/SkGradient.h +1 -1
- package/cpp/skia/include/effects/SkPerlinNoiseShader.h +1 -1
- package/cpp/skia/include/effects/SkRuntimeEffect.h +4 -4
- package/cpp/skia/include/encode/SkEncoder.h +3 -3
- package/cpp/skia/include/encode/SkICC.h +1 -1
- package/cpp/skia/include/encode/SkJpegEncoder.h +1 -1
- package/cpp/skia/include/encode/SkPngEncoder.h +1 -1
- package/cpp/skia/include/encode/SkPngRustEncoder.h +16 -1
- package/cpp/skia/include/encode/SkWebpEncoder.h +1 -1
- package/cpp/skia/include/gpu/GpuTypes.h +1 -1
- package/cpp/skia/include/gpu/MutableTextureState.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrBackendSemaphore.h +2 -2
- package/cpp/skia/include/gpu/ganesh/GrBackendSurface.h +3 -3
- package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkaroundsAutogen.h +39 -37
- package/cpp/skia/include/gpu/ganesh/GrExternalTextureGenerator.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrRecordingContext.h +3 -2
- package/cpp/skia/include/gpu/ganesh/GrTypes.h +1 -1
- package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +1 -1
- package/cpp/skia/include/gpu/ganesh/SkMeshGanesh.h +1 -1
- package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +1 -1
- package/cpp/skia/include/gpu/ganesh/d3d/GrD3DBackendSemaphore.h +1 -1
- package/cpp/skia/include/gpu/ganesh/d3d/GrD3DBackendSurface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/d3d/GrD3DDirectContext.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/GrGLAssembleInterface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/GrGLConfig.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/GrGLDirectContext.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/GrGLExtensions.h +2 -2
- package/cpp/skia/include/gpu/ganesh/gl/GrGLFunctions.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/GrGLMakeWebGLInterface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/epoxy/GrGLMakeEpoxyEGLInterface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/glx/GrGLMakeGLXInterface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/ios/GrGLMakeIOSInterface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/mac/GrGLMakeMacInterface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/win/GrGLMakeWinInterface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/mock/GrMockBackendSurface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/mock/GrMockTypes.h +1 -1
- package/cpp/skia/include/gpu/ganesh/mtl/GrMtlBackendSemaphore.h +1 -1
- package/cpp/skia/include/gpu/ganesh/mtl/GrMtlBackendSurface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/mtl/GrMtlDirectContext.h +1 -1
- package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSemaphore.h +1 -1
- package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h +1 -1
- package/cpp/skia/include/gpu/ganesh/vk/GrVkDirectContext.h +1 -1
- package/cpp/skia/include/gpu/graphite/BackendSemaphore.h +2 -2
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +2 -2
- package/cpp/skia/include/gpu/graphite/Context.h +3 -3
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +8 -2
- package/cpp/skia/include/gpu/graphite/PersistentPipelineStorage.h +1 -1
- package/cpp/skia/include/gpu/graphite/PrecompileContext.h +16 -2
- package/cpp/skia/include/gpu/graphite/Recorder.h +8 -7
- package/cpp/skia/include/gpu/graphite/Recording.h +6 -4
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +2 -2
- package/cpp/skia/include/gpu/graphite/dawn/DawnGraphiteTypes.h +1 -1
- package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +1 -1
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +1 -1
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes_cpp.h +1 -1
- package/cpp/skia/include/gpu/graphite/precompile/PaintOptions.h +2 -2
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileImageFilter.h +1 -1
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteContext.h +1 -1
- package/cpp/skia/include/gpu/vk/VulkanBackendContext.h +1 -1
- package/cpp/skia/include/gpu/vk/VulkanExtensions.h +3 -3
- package/cpp/skia/include/gpu/vk/VulkanMutableTextureState.h +1 -1
- package/cpp/skia/include/gpu/vk/VulkanPreferredFeatures.h +1 -1
- package/cpp/skia/include/gpu/vk/VulkanTypes.h +1 -1
- package/cpp/skia/include/pathops/SkPathOps.h +2 -2
- package/cpp/skia/include/ports/SkImageGeneratorCG.h +2 -2
- package/cpp/skia/include/ports/SkImageGeneratorWIC.h +2 -2
- package/cpp/skia/include/private/{base/SingleOwner.h → SingleOwner.h} +5 -5
- package/cpp/skia/include/private/{base/SkAPI.h → SkAPI.h} +1 -1
- package/cpp/skia/include/private/{base/SkAlign.h → SkAlign.h} +1 -1
- package/cpp/skia/include/private/{base/SkAnySubclass.h → SkAnySubclass.h} +1 -1
- package/cpp/skia/include/private/{base/SkAssert.h → SkAssert.h} +4 -4
- package/cpp/skia/include/private/{base/SkAttributes.h → SkAttributes.h} +2 -2
- package/cpp/skia/include/private/{base/SkContainers.h → SkContainers.h} +3 -3
- package/cpp/skia/include/private/{base/SkDebug.h → SkDebug.h} +3 -3
- package/cpp/skia/include/private/{base/SkDeque.h → SkDeque.h} +1 -1
- package/cpp/skia/include/private/SkEncodedInfo.h +2 -2
- package/cpp/skia/include/private/SkEnumBitMask.h +92 -0
- package/cpp/skia/include/private/SkExif.h +1 -1
- package/cpp/skia/include/private/{base/SkFixed.h → SkFixed.h} +4 -4
- package/cpp/skia/include/private/{base/SkFloatingPoint.h → SkFloatingPoint.h} +2 -2
- package/cpp/skia/include/private/SkGainmapShader.h +1 -1
- package/cpp/skia/include/private/SkHdrMetadata.h +1 -1
- package/cpp/skia/include/private/SkIDChangeListener.h +3 -3
- package/cpp/skia/include/private/{base/SkLoadUserConfig.h → SkLoadUserConfig.h} +2 -2
- package/cpp/skia/include/private/{base/SkLog.h → SkLog.h} +4 -4
- package/cpp/skia/include/private/{base/SkMacros.h → SkMacros.h} +1 -1
- package/cpp/skia/include/private/{base/SkMalloc.h → SkMalloc.h} +1 -1
- package/cpp/skia/include/private/{base/SkMath.h → SkMath.h} +2 -2
- package/cpp/skia/include/private/{base/SkMutex.h → SkMutex.h} +5 -5
- package/cpp/skia/include/private/{base/SkNoncopyable.h → SkNoncopyable.h} +1 -1
- package/cpp/skia/include/private/{base/SkOnce.h → SkOnce.h} +1 -1
- package/cpp/skia/include/private/SkPathRef.h +4 -4
- package/cpp/skia/include/private/SkPixelStorage.h +20 -5
- package/cpp/skia/include/private/{base/SkSafe32.h → SkSafe32.h} +2 -2
- package/cpp/skia/include/private/{base/SkSemaphore.h → SkSemaphore.h} +3 -3
- package/cpp/skia/include/private/{base/SkTArray.h → SkTArray.h} +10 -11
- package/cpp/skia/include/private/{base/SkTDArray.h → SkTDArray.h} +4 -4
- package/cpp/skia/include/private/{base/SkTFitsIn.h → SkTFitsIn.h} +0 -2
- package/cpp/skia/include/private/{base/SkTLogic.h → SkTLogic.h} +1 -1
- package/cpp/skia/include/private/{base/SkTemplates.h → SkTemplates.h} +5 -6
- package/cpp/skia/include/private/{base/SkThreadAnnotations.h → SkThreadAnnotations.h} +1 -1
- package/cpp/skia/include/private/{base/SkThreadID.h → SkThreadID.h} +2 -2
- package/cpp/skia/include/private/{base/SkTo.h → SkTo.h} +2 -2
- package/cpp/skia/include/private/{base/SkTypeTraits.h → SkTypeTraits.h} +20 -0
- package/cpp/skia/include/private/SkXmp.h +1 -1
- package/cpp/skia/include/private/chromium/GrDeferredDisplayList.h +1 -1
- package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +1 -1
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +1 -1
- package/cpp/skia/include/private/chromium/SkCodecsICCProfileChromium.h +1 -1
- package/cpp/skia/include/private/chromium/SkExifChromium.h +1 -1
- package/cpp/skia/include/private/chromium/SkImageChromium.h +1 -1
- package/cpp/skia/include/private/chromium/SkPMColor.h +1 -1
- package/cpp/skia/include/private/chromium/Slug.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +2 -2
- package/cpp/skia/include/private/gpu/ganesh/GrTextureGenerator.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +4 -4
- package/cpp/skia/include/utils/SkCamera.h +1 -1
- package/cpp/skia/include/utils/SkNWayCanvas.h +1 -1
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +1 -1
- package/cpp/skia/modules/jsonreader/SkJSONReader.cpp +6 -6
- package/cpp/skia/modules/jsonreader/SkJSONReader.h +2 -2
- package/cpp/skia/modules/skottie/include/SkottieProperty.h +1 -1
- package/cpp/skia/modules/skottie/include/SlotManager.h +2 -2
- package/cpp/skia/modules/skottie/include/TextShaper.h +1 -1
- package/cpp/skia/modules/skottie/src/text/Font.h +1 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphCache.h +1 -1
- package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +1 -1
- package/cpp/skia/modules/skresources/include/SkResources.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGNode.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGRect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGRenderEffect.h +1 -1
- package/cpp/skia/modules/skunicode/include/SkUnicode.h +3 -3
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.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 +2 -2
- package/cpp/skia/modules/svg/include/SkSVGDOM.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/SkSVGFeComponentTransfer.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 +2 -2
- package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeMerge.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/SkSVGGradient.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGImage.h +2 -2
- 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 +1 -1
- 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/SkSVGUse.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGValue.h +1 -1
- package/cpp/skia/src/{base → core}/SkArenaAlloc.h +5 -5
- package/cpp/skia/src/{base → core}/SkAutoLocaleSetter.h +1 -1
- package/cpp/skia/src/core/SkChecksum.h +1 -1
- package/cpp/skia/src/core/SkLRUCache.h +1 -1
- package/cpp/skia/src/{base → core}/SkMathPriv.h +3 -3
- package/cpp/skia/src/core/SkTHash.h +1 -1
- package/cpp/skia/src/{base → core}/SkTInternalLList.h +3 -3
- package/cpp/skia/src/{base → core}/SkTLazy.h +1 -1
- package/cpp/skia/src/{base → core}/SkUTF.h +1 -1
- package/lib/commonjs/renderer/components/Mask.js +3 -9
- package/lib/commonjs/renderer/components/Mask.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +27 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.js +28 -0
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix4.js +7 -2
- package/lib/commonjs/skia/types/Matrix4.js.map +1 -1
- package/lib/commonjs/skia/types/Skia.d.ts +1 -6
- package/lib/commonjs/skia/types/Skia.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkia.js +0 -3
- package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/Core.js +8 -1
- package/lib/commonjs/sksg/Recorder/Core.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/DrawingContext.d.ts +1 -0
- package/lib/commonjs/sksg/Recorder/DrawingContext.js +10 -0
- package/lib/commonjs/sksg/Recorder/DrawingContext.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/Player.js +1 -1
- package/lib/commonjs/sksg/Recorder/Player.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.js +8 -0
- package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/Recorder.d.ts +1 -1
- package/lib/commonjs/sksg/Recorder/Recorder.js +4 -0
- package/lib/commonjs/sksg/Recorder/Recorder.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/Visitor.js +6 -1
- package/lib/commonjs/sksg/Recorder/Visitor.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/commands/Drawing.js +10 -8
- package/lib/commonjs/sksg/Recorder/commands/Drawing.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js +15 -1
- package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/commands/Shaders.js +1 -1
- package/lib/commonjs/sksg/Recorder/commands/Shaders.js.map +1 -1
- package/lib/commonjs/sksg/utils.d.ts +4 -0
- package/lib/commonjs/sksg/utils.js +14 -1
- package/lib/commonjs/sksg/utils.js.map +1 -1
- package/lib/module/renderer/components/Mask.js +3 -9
- package/lib/module/renderer/components/Mask.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.d.ts +27 -1
- package/lib/module/renderer/processors/Animations/Animations.js +21 -0
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/skia/types/Matrix4.js +7 -2
- package/lib/module/skia/types/Matrix4.js.map +1 -1
- package/lib/module/skia/types/Skia.d.ts +1 -6
- package/lib/module/skia/types/Skia.js.map +1 -1
- package/lib/module/skia/web/JsiSkia.js +0 -3
- package/lib/module/skia/web/JsiSkia.js.map +1 -1
- package/lib/module/sksg/Recorder/Core.js +8 -1
- package/lib/module/sksg/Recorder/Core.js.map +1 -1
- package/lib/module/sksg/Recorder/DrawingContext.d.ts +1 -0
- package/lib/module/sksg/Recorder/DrawingContext.js +10 -0
- package/lib/module/sksg/Recorder/DrawingContext.js.map +1 -1
- package/lib/module/sksg/Recorder/Player.js +1 -1
- package/lib/module/sksg/Recorder/Player.js.map +1 -1
- package/lib/module/sksg/Recorder/ReanimatedRecorder.js +9 -1
- package/lib/module/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
- package/lib/module/sksg/Recorder/Recorder.d.ts +1 -1
- package/lib/module/sksg/Recorder/Recorder.js +5 -1
- package/lib/module/sksg/Recorder/Recorder.js.map +1 -1
- package/lib/module/sksg/Recorder/Visitor.js +6 -1
- package/lib/module/sksg/Recorder/Visitor.js.map +1 -1
- package/lib/module/sksg/Recorder/commands/Drawing.js +10 -8
- package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -1
- package/lib/module/sksg/Recorder/commands/ImageFilters.js +15 -1
- package/lib/module/sksg/Recorder/commands/ImageFilters.js.map +1 -1
- package/lib/module/sksg/Recorder/commands/Shaders.js +1 -1
- package/lib/module/sksg/Recorder/commands/Shaders.js.map +1 -1
- package/lib/module/sksg/utils.d.ts +4 -0
- package/lib/module/sksg/utils.js +12 -0
- package/lib/module/sksg/utils.js.map +1 -1
- package/lib/typescript/lib/commonjs/renderer/processors/Animations/Animations.d.ts +22 -0
- package/lib/typescript/lib/commonjs/skia/web/JsiSkia.d.ts +0 -1
- package/lib/typescript/lib/commonjs/sksg/Recorder/DrawingContext.d.ts +1 -0
- package/lib/typescript/lib/commonjs/sksg/utils.d.ts +1 -0
- package/lib/typescript/lib/module/mock/index.d.ts +4 -0
- package/lib/typescript/lib/module/renderer/processors/Animations/Animations.d.ts +4 -0
- package/lib/typescript/lib/module/renderer/processors/Animations/index.d.ts +1 -1
- package/lib/typescript/lib/module/skia/Skia.web.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkia.d.ts +0 -1
- package/lib/typescript/lib/module/sksg/Recorder/DrawingContext.d.ts +1 -0
- package/lib/typescript/lib/module/sksg/utils.d.ts +1 -0
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +27 -1
- package/lib/typescript/src/skia/types/Skia.d.ts +1 -6
- package/lib/typescript/src/sksg/Recorder/DrawingContext.d.ts +1 -0
- package/lib/typescript/src/sksg/Recorder/Recorder.d.ts +1 -1
- package/lib/typescript/src/sksg/utils.d.ts +4 -0
- package/package.json +9 -9
- package/src/renderer/components/Mask.tsx +10 -3
- package/src/renderer/processors/Animations/Animations.ts +34 -1
- package/src/skia/types/Matrix4.ts +6 -2
- package/src/skia/types/Skia.ts +1 -7
- package/src/skia/web/JsiSkia.ts +0 -4
- package/src/sksg/Recorder/Core.ts +11 -1
- package/src/sksg/Recorder/DrawingContext.ts +10 -0
- package/src/sksg/Recorder/Player.ts +1 -1
- package/src/sksg/Recorder/ReanimatedRecorder.ts +10 -1
- package/src/sksg/Recorder/Recorder.ts +7 -3
- package/src/sksg/Recorder/Visitor.ts +9 -6
- package/src/sksg/Recorder/commands/Drawing.ts +10 -8
- package/src/sksg/Recorder/commands/ImageFilters.ts +20 -1
- package/src/sksg/Recorder/commands/Shaders.ts +1 -1
- package/src/sksg/utils.ts +18 -0
- package/cpp/api/JsiSkiaContext.h +0 -94
- package/cpp/dawn/include/dawn/dawn_proc.h +0 -53
- package/cpp/dawn/include/dawn/dawn_proc_table.h +0 -330
- package/cpp/dawn/include/dawn/dawn_thread_dispatch_proc.h +0 -47
- package/cpp/dawn/include/dawn/dawn_version.h +0 -41
- package/cpp/dawn/include/dawn/native/D3D11Backend.h +0 -65
- package/cpp/dawn/include/dawn/native/D3D12Backend.h +0 -86
- package/cpp/dawn/include/dawn/native/D3DBackend.h +0 -56
- package/cpp/dawn/include/dawn/native/DawnNative.h +0 -369
- package/cpp/dawn/include/dawn/native/MetalBackend.h +0 -56
- package/cpp/dawn/include/dawn/native/NullBackend.h +0 -39
- package/cpp/dawn/include/dawn/native/OpenGLBackend.h +0 -89
- package/cpp/dawn/include/dawn/native/VulkanBackend.h +0 -183
- package/cpp/dawn/include/dawn/native/WebGPUBackend.h +0 -49
- package/cpp/dawn/include/dawn/native/dawn_native_export.h +0 -49
- package/cpp/dawn/include/dawn/platform/DawnPlatform.h +0 -210
- package/cpp/dawn/include/dawn/platform/dawn_platform_export.h +0 -49
- package/cpp/dawn/include/dawn/replay/Replay.h +0 -99
- package/cpp/dawn/include/dawn/replay/dawn_replay_export.h +0 -49
- package/cpp/dawn/include/dawn/webgpu_cpp_print.h +0 -2844
- package/cpp/dawn/include/tint/tint.h +0 -90
- package/cpp/dawn/include/webgpu/webgpu.h +0 -4987
- package/cpp/dawn/include/webgpu/webgpu_cpp.h +0 -10080
- package/cpp/dawn/include/webgpu/webgpu_cpp_chained_struct.h +0 -57
- package/cpp/dawn/include/webgpu/webgpu_enum_class_bitmasks.h +0 -161
- package/cpp/dawn/include/webgpu/webgpu_glfw.h +0 -88
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteUtils.h +0 -10
- package/cpp/skia/include/private/base/README.md +0 -4
- package/cpp/skia/include/private/base/SkPoint_impl.h +0 -560
- package/cpp/skia/include/private/base/SkSpan_impl.h +0 -158
- package/cpp/skia/src/gpu/graphite/ContextOptionsPriv.h +0 -45
- package/cpp/skia/src/gpu/graphite/ResourceTypes.h +0 -360
- package/cpp/skia/src/gpu/graphite/TextureProxyView.h +0 -105
- package/libs/.graphite +0 -1
- /package/cpp/skia/include/private/{base/SkASAN.h → SkASAN.h} +0 -0
- /package/cpp/skia/include/private/{base/SkAlignedStorage.h → SkAlignedStorage.h} +0 -0
- /package/cpp/skia/include/private/{base/SkCPUTypes.h → SkCPUTypes.h} +0 -0
- /package/cpp/skia/include/private/{base/SkFeatures.h → SkFeatures.h} +0 -0
- /package/cpp/skia/include/private/{base/SkLogPriority.h → SkLogPriority.h} +0 -0
- /package/cpp/skia/include/private/{base/SkTPin.h → SkTPin.h} +0 -0
|
@@ -63,16 +63,6 @@ public:
|
|
|
63
63
|
#endif
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
std::shared_ptr<WindowContext>
|
|
67
|
-
makeContextFromNativeSurface(void *surface, int width, int height) override {
|
|
68
|
-
#if defined(SK_GRAPHITE)
|
|
69
|
-
return DawnContext::getInstance().MakeWindow(surface, width, height);
|
|
70
|
-
#else
|
|
71
|
-
auto aWindow = reinterpret_cast<ANativeWindow *>(surface);
|
|
72
|
-
return OpenGLContext::getInstance().MakeWindow(aWindow);
|
|
73
|
-
#endif
|
|
74
|
-
}
|
|
75
|
-
|
|
76
66
|
sk_sp<SkImage> makeImageFromNativeBuffer(void *buffer) override {
|
|
77
67
|
#if defined(SK_GRAPHITE)
|
|
78
68
|
return DawnContext::getInstance().MakeImageFromBuffer(buffer);
|
|
@@ -19,10 +19,11 @@ import android.widget.ScrollView;
|
|
|
19
19
|
import androidx.annotation.NonNull;
|
|
20
20
|
import com.facebook.react.bridge.ReactContext;
|
|
21
21
|
import com.facebook.react.bridge.UIManager;
|
|
22
|
+
import com.facebook.react.uimanager.BackgroundStyleApplicator;
|
|
22
23
|
import com.facebook.react.uimanager.UIManagerHelper;
|
|
24
|
+
import com.facebook.react.uimanager.ViewProps;
|
|
23
25
|
import com.facebook.react.views.view.ReactViewGroup;
|
|
24
26
|
|
|
25
|
-
import java.lang.reflect.Method;
|
|
26
27
|
import java.util.concurrent.CountDownLatch;
|
|
27
28
|
import java.util.concurrent.TimeUnit;
|
|
28
29
|
|
|
@@ -118,17 +119,13 @@ public class ViewScreenshotService {
|
|
|
118
119
|
}
|
|
119
120
|
|
|
120
121
|
private static void drawChildren(Canvas canvas, ViewGroup group, Paint paint, float parentOpacity) {
|
|
121
|
-
//
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
method.invoke(group, canvas);
|
|
129
|
-
} catch (Exception e) {
|
|
130
|
-
Log.e(TAG, "couldn't invoke dispatchOverflowDraw() on ReactViewGroup", e);
|
|
131
|
-
}
|
|
122
|
+
// ReactViewGroup applies `overflow: hidden` / `overflow: scroll` clipping from its
|
|
123
|
+
// dispatchDraw() override. We never call dispatchDraw() here because children are
|
|
124
|
+
// walked manually (TextureView / SurfaceView need special handling), so the clip has
|
|
125
|
+
// to be replicated explicitly, exactly as ReactViewGroup.dispatchDraw() does it.
|
|
126
|
+
if (group instanceof ReactViewGroup
|
|
127
|
+
&& !ViewProps.VISIBLE.equals(((ReactViewGroup) group).getOverflow())) {
|
|
128
|
+
BackgroundStyleApplicator.clipToPaddingBox(group, canvas);
|
|
132
129
|
}
|
|
133
130
|
for (int i = 0; i < group.getChildCount(); i++) {
|
|
134
131
|
View child = group.getChildAt(i);
|
|
@@ -63,9 +63,6 @@ public:
|
|
|
63
63
|
|
|
64
64
|
std::shared_ptr<RNSkVideo> createVideo(const std::string &url) override;
|
|
65
65
|
|
|
66
|
-
std::shared_ptr<WindowContext>
|
|
67
|
-
makeContextFromNativeSurface(void *surface, int width, int height) override;
|
|
68
|
-
|
|
69
66
|
virtual void performStreamOperation(
|
|
70
67
|
const std::string &sourceUri,
|
|
71
68
|
const std::function<void(std::unique_ptr<SkStreamAsset>)> &op) override;
|
|
@@ -307,17 +307,6 @@ RNSkApplePlatformContext::createVideo(const std::string &url) {
|
|
|
307
307
|
return std::make_shared<RNSkAppleVideo>(url, this);
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
std::shared_ptr<WindowContext>
|
|
311
|
-
RNSkApplePlatformContext::makeContextFromNativeSurface(void *surface, int width,
|
|
312
|
-
int height) {
|
|
313
|
-
#if defined(SK_GRAPHITE)
|
|
314
|
-
return DawnContext::getInstance().MakeWindow(surface, width, height);
|
|
315
|
-
#else
|
|
316
|
-
return MetalContext::getInstance().MakeWindow((__bridge CALayer *)surface,
|
|
317
|
-
width, height);
|
|
318
|
-
#endif
|
|
319
|
-
}
|
|
320
|
-
|
|
321
310
|
void RNSkApplePlatformContext::raiseError(const std::exception &err) {
|
|
322
311
|
RCTFatal(RCTErrorWithMessage([NSString stringWithUTF8String:err.what()]));
|
|
323
312
|
}
|
package/cpp/api/JsiSkApi.h
CHANGED
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
#include "JsiSkTypefaceFactory.h"
|
|
57
57
|
#include "JsiSkTypefaceFontProviderFactory.h"
|
|
58
58
|
#include "JsiSkVertices.h"
|
|
59
|
-
#include "JsiSkiaContext.h"
|
|
60
59
|
#include "JsiSkottieFactory.h"
|
|
61
60
|
#include "JsiVideo.h"
|
|
62
61
|
#include "api/recorder/JsiRecorder.h"
|
|
@@ -116,10 +115,6 @@ public:
|
|
|
116
115
|
return JsiVideo::createCtor(getContext())(runtime, thisValue, arguments,
|
|
117
116
|
count);
|
|
118
117
|
}
|
|
119
|
-
JSI_HOST_FUNCTION(Context) {
|
|
120
|
-
return JsiSkiaContext::createCtor(getContext())(runtime, thisValue,
|
|
121
|
-
arguments, count);
|
|
122
|
-
}
|
|
123
118
|
JSI_HOST_FUNCTION(Font) {
|
|
124
119
|
return JsiSkFont::createCtor(getContext())(runtime, thisValue, arguments,
|
|
125
120
|
count);
|
|
@@ -256,7 +251,6 @@ public:
|
|
|
256
251
|
|
|
257
252
|
static void definePrototype(jsi::Runtime &runtime, jsi::Object &prototype) {
|
|
258
253
|
installHostMethod(runtime, prototype, "Video", &JsiSkApi::Video);
|
|
259
|
-
installHostMethod(runtime, prototype, "Context", &JsiSkApi::Context);
|
|
260
254
|
installHostMethod(runtime, prototype, "getNativeDevice",
|
|
261
255
|
&JsiSkApi::getNativeDevice);
|
|
262
256
|
installHostMethod(runtime, prototype, "Font", &JsiSkApi::Font);
|
package/cpp/api/JsiSkFont.h
CHANGED
|
@@ -161,15 +161,9 @@ public:
|
|
|
161
161
|
|
|
162
162
|
void setSize(double size) { getObject()->setSize(size); }
|
|
163
163
|
|
|
164
|
-
|
|
165
|
-
// the arguments with asNumber() — keep accepting numbers.
|
|
166
|
-
void setEmbolden(double embolden) {
|
|
167
|
-
getObject()->setEmbolden(static_cast<bool>(embolden));
|
|
168
|
-
}
|
|
164
|
+
void setEmbolden(bool embolden) { getObject()->setEmbolden(embolden); }
|
|
169
165
|
|
|
170
|
-
void setSubpixel(
|
|
171
|
-
getObject()->setSubpixel(static_cast<bool>(subpixel));
|
|
172
|
-
}
|
|
166
|
+
void setSubpixel(bool subpixel) { getObject()->setSubpixel(subpixel); }
|
|
173
167
|
|
|
174
168
|
void setTypeface(std::variant<std::nullptr_t, sk_sp<SkTypeface>> typeface) {
|
|
175
169
|
getObject()->setTypeface(
|
package/cpp/api/JsiSkMatrix.h
CHANGED
|
@@ -69,12 +69,14 @@ public:
|
|
|
69
69
|
|
|
70
70
|
void postTranslate(double x, double y) { getObject()->postTranslate(x, y); }
|
|
71
71
|
|
|
72
|
+
// A missing y means a uniform scale, matching the CanvasKit backend and the
|
|
73
|
+
// SkMatrix type, where y is optional rather than defaulted to 1.
|
|
72
74
|
void scale(double x, JsiOptional<double> y) {
|
|
73
|
-
getObject()->preScale(x, y.has_value() ? *y :
|
|
75
|
+
getObject()->preScale(x, y.has_value() ? *y : x);
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
void postScale(double x, JsiOptional<double> y) {
|
|
77
|
-
getObject()->postScale(x, y.has_value() ? *y :
|
|
79
|
+
getObject()->postScale(x, y.has_value() ? *y : x);
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
void skew(double x, double y) { getObject()->preSkew(x, y); }
|
|
@@ -69,7 +69,51 @@ template <typename T> struct unwrap_optional<std::optional<T>> {
|
|
|
69
69
|
template <typename T>
|
|
70
70
|
T getPropertyValue(jsi::Runtime &runtime, const jsi::Value &value);
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
template <typename T, typename Target>
|
|
73
|
+
bool convertSelectorProperty(jsi::Runtime &runtime, const jsi::Value &prop,
|
|
74
|
+
Target &target, Variables &variables) {
|
|
75
|
+
if (!prop.isObject()) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
auto wrapper = prop.asObject(runtime);
|
|
79
|
+
if (!wrapper.hasProperty(runtime, "__sv") ||
|
|
80
|
+
!wrapper.hasProperty(runtime, "__key")) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
auto svVal = wrapper.getProperty(runtime, "__sv");
|
|
84
|
+
auto keyVal = wrapper.getProperty(runtime, "__key");
|
|
85
|
+
if (!isSharedValue(runtime, svVal) || !keyVal.isString()) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
auto sharedValue = svVal.asObject(runtime);
|
|
89
|
+
auto key = keyVal.asString(runtime).utf8(runtime);
|
|
90
|
+
auto name =
|
|
91
|
+
sharedValue.getProperty(runtime, "name").asString(runtime).utf8(runtime);
|
|
92
|
+
|
|
93
|
+
auto conv = [target = &target, key](jsi::Runtime &runtime,
|
|
94
|
+
const jsi::Object &val) {
|
|
95
|
+
auto value = val.getProperty(runtime, "value");
|
|
96
|
+
if (!value.isObject()) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
auto values = value.asObject(runtime);
|
|
100
|
+
if (!values.hasProperty(runtime, key.c_str())) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
auto selected = values.getProperty(runtime, key.c_str());
|
|
105
|
+
if (selected.isUndefined() || selected.isNull() ||
|
|
106
|
+
(selected.isObject() && selected.asObject(runtime).isFunction(runtime))) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
*target = getPropertyValue<T>(runtime, selected);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
variables[name].push_back(conv);
|
|
113
|
+
conv(runtime, sharedValue);
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
|
|
73
117
|
template <typename T, typename Target>
|
|
74
118
|
void convertPropertyImpl(jsi::Runtime &runtime, const jsi::Object &object,
|
|
75
119
|
const std::string &propertyName, Target &target,
|
|
@@ -78,13 +122,16 @@ void convertPropertyImpl(jsi::Runtime &runtime, const jsi::Object &object,
|
|
|
78
122
|
return;
|
|
79
123
|
}
|
|
80
124
|
|
|
81
|
-
auto
|
|
125
|
+
auto prop = object.getProperty(runtime, propertyName.c_str());
|
|
126
|
+
|
|
127
|
+
if (convertSelectorProperty<T>(runtime, prop, target, variables)) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
82
130
|
|
|
83
|
-
if (isSharedValue(runtime,
|
|
84
|
-
auto sharedValue =
|
|
85
|
-
auto name =
|
|
86
|
-
|
|
87
|
-
.utf8(runtime);
|
|
131
|
+
if (isSharedValue(runtime, prop)) {
|
|
132
|
+
auto sharedValue = prop.asObject(runtime);
|
|
133
|
+
auto name =
|
|
134
|
+
sharedValue.getProperty(runtime, "name").asString(runtime).utf8(runtime);
|
|
88
135
|
auto conv = [target = &target](jsi::Runtime &runtime,
|
|
89
136
|
const jsi::Object &val) {
|
|
90
137
|
auto value = val.getProperty(runtime, "value");
|
|
@@ -92,9 +139,10 @@ void convertPropertyImpl(jsi::Runtime &runtime, const jsi::Object &object,
|
|
|
92
139
|
};
|
|
93
140
|
variables[name].push_back(conv);
|
|
94
141
|
conv(runtime, sharedValue);
|
|
95
|
-
|
|
96
|
-
target = getPropertyValue<T>(runtime, property);
|
|
142
|
+
return;
|
|
97
143
|
}
|
|
144
|
+
|
|
145
|
+
target = getPropertyValue<T>(runtime, prop);
|
|
98
146
|
}
|
|
99
147
|
|
|
100
148
|
// Main convertProperty template
|
|
@@ -313,13 +361,16 @@ SkM44 getPropertyValue(jsi::Runtime &runtime, const jsi::Value &value) {
|
|
|
313
361
|
m4.preScale(1, s);
|
|
314
362
|
} else if (key == "skewX") {
|
|
315
363
|
auto angle = value.getProperty(runtime, key.c_str()).asNumber();
|
|
316
|
-
|
|
364
|
+
// The SkM44 constructor takes its arguments in row-major reading
|
|
365
|
+
// order, so the shear factor of a horizontal skew belongs in row 0,
|
|
366
|
+
// where it scales y into x.
|
|
367
|
+
SkM44 skewX(1, std::tan(angle), 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
|
|
317
368
|
1);
|
|
318
369
|
m4.preConcat(skewX);
|
|
319
370
|
|
|
320
371
|
} else if (key == "skewY") {
|
|
321
372
|
auto angle = value.getProperty(runtime, key.c_str()).asNumber();
|
|
322
|
-
SkM44 skewY(1,
|
|
373
|
+
SkM44 skewY(1, 0, 0, 0, std::tan(angle), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
|
|
323
374
|
1);
|
|
324
375
|
m4.preConcat(skewY);
|
|
325
376
|
} else if (key == "rotate" || key == "rotateZ") {
|
|
@@ -149,6 +149,9 @@ public:
|
|
|
149
149
|
if (hasStrokeOptions) {
|
|
150
150
|
const auto &stroke = props.stroke.value();
|
|
151
151
|
SkPaint strokePaint;
|
|
152
|
+
// A default SkPaint is fill-style, and FillPathWithPaint only
|
|
153
|
+
// outlines a paint that strokes.
|
|
154
|
+
strokePaint.setStyle(SkPaint::kStroke_Style);
|
|
152
155
|
|
|
153
156
|
if (stroke.cap.has_value()) {
|
|
154
157
|
strokePaint.setStrokeCap(stroke.cap.value());
|
|
@@ -166,11 +169,18 @@ public:
|
|
|
166
169
|
strokePaint.setStrokeMiter(stroke.miter_limit.value());
|
|
167
170
|
}
|
|
168
171
|
|
|
172
|
+
float precision = stroke.precision.value_or(1.0f);
|
|
173
|
+
|
|
169
174
|
SkPathBuilder resultBuilder;
|
|
170
|
-
|
|
171
|
-
|
|
175
|
+
auto ctm = SkMatrix::Scale(precision, precision);
|
|
176
|
+
if (skpathutils::FillPathWithPaint(*p, strokePaint, &resultBuilder,
|
|
177
|
+
nullptr, ctm)) {
|
|
178
|
+
pathToUse = std::make_shared<const SkPath>(resultBuilder.snapshot());
|
|
179
|
+
} else {
|
|
180
|
+
// The JS player keeps the unstroked path when Path.Stroke returns
|
|
181
|
+
// null (e.g. a hairline width of 0).
|
|
182
|
+
pathToUse = std::const_pointer_cast<const SkPath>(p);
|
|
172
183
|
}
|
|
173
|
-
pathToUse = std::make_shared<const SkPath>(resultBuilder.snapshot());
|
|
174
184
|
} else {
|
|
175
185
|
pathToUse = std::const_pointer_cast<const SkPath>(p);
|
|
176
186
|
}
|
|
@@ -135,8 +135,22 @@ private:
|
|
|
135
135
|
auto sourceAlpha = SkImageFilters::ColorFilter(
|
|
136
136
|
SkColorFilters::Blend(SK_ColorBLACK, SkBlendMode::kSrcIn), nullptr);
|
|
137
137
|
|
|
138
|
+
// The shadow is generated outside the shape and then clipped back into it,
|
|
139
|
+
// so "outside" has to be the complement of the shape's silhouette. Taking
|
|
140
|
+
// SrcOut against the source graphic itself makes it the complement of the
|
|
141
|
+
// source's *alpha*: inside a translucent shape 1 - alpha is non-zero, so
|
|
142
|
+
// the shadow is generated across the whole interior and tints it, no matter
|
|
143
|
+
// how small the blur and the offset are (issue #2990). Saturating alpha
|
|
144
|
+
// first keeps the shadow tied to the shape's outline instead of to its
|
|
145
|
+
// opacity. 255 is the saturation point of an 8-bit alpha channel, so one
|
|
146
|
+
// unit of coverage is enough to reach 1.
|
|
147
|
+
static constexpr float kAlphaSaturate[20] = {
|
|
148
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0};
|
|
149
|
+
auto coverage = SkImageFilters::ColorFilter(
|
|
150
|
+
SkColorFilters::Matrix(kAlphaSaturate), nullptr);
|
|
151
|
+
|
|
138
152
|
auto f1 = SkImageFilters::ColorFilter(
|
|
139
|
-
SkColorFilters::Blend(color, SkBlendMode::kSrcOut),
|
|
153
|
+
SkColorFilters::Blend(color, SkBlendMode::kSrcOut), coverage);
|
|
140
154
|
|
|
141
155
|
auto f2 = SkImageFilters::Offset(dx, dy, f1);
|
|
142
156
|
auto f3 = SkImageFilters::Blur(sigmaX, sigmaY, SkTileMode::kDecal, f2);
|
package/cpp/api/recorder/Paint.h
CHANGED
|
@@ -154,8 +154,11 @@ public:
|
|
|
154
154
|
}
|
|
155
155
|
ctx->savePaint();
|
|
156
156
|
if (standalone) {
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
// Reset the paint that savePaint() just pushed instead of pushing a
|
|
158
|
+
// second one: the matching RestorePaintDeclaration pops a single frame,
|
|
159
|
+
// so an extra push would leave the enclosing group's opacity on the
|
|
160
|
+
// stack and leak it onto every sibling drawn afterwards.
|
|
161
|
+
ctx->getPaint() = SkPaint();
|
|
159
162
|
}
|
|
160
163
|
auto &paint = ctx->getPaint();
|
|
161
164
|
if (props.opacity.has_value()) {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
#include "include/core/SkData.h"
|
|
11
11
|
#include "include/core/SkRect.h"
|
|
12
12
|
#include "include/core/SkSize.h"
|
|
13
|
-
#include "include/private/
|
|
13
|
+
#include "include/private/SkAssert.h"
|
|
14
14
|
#include "modules/skottie/include/Skottie.h"
|
|
15
15
|
#include "modules/skresources/include/SkResources.h"
|
|
16
16
|
|
|
@@ -96,9 +96,6 @@ public:
|
|
|
96
96
|
virtual sk_sp<SkSurface>
|
|
97
97
|
makeOffscreenSurface(int width, int height, bool useP3ColorSpace = false) = 0;
|
|
98
98
|
|
|
99
|
-
virtual std::shared_ptr<WindowContext>
|
|
100
|
-
makeContextFromNativeSurface(void *surface, int width, int height) = 0;
|
|
101
|
-
|
|
102
99
|
/**
|
|
103
100
|
* Creates an image from a native buffer.
|
|
104
101
|
* - On iOS, this is a `CVPixelBufferRef`
|
|
@@ -39,8 +39,6 @@ public:
|
|
|
39
39
|
|
|
40
40
|
static void SafetyNetLog(const char*);
|
|
41
41
|
|
|
42
|
-
static sk_sp<SkSurface> getSurfaceFromCanvas(SkCanvas* canvas);
|
|
43
|
-
|
|
44
42
|
static int SaveBehind(SkCanvas* canvas, const SkRect* subset);
|
|
45
43
|
|
|
46
44
|
// Operating within the canvas' clip stack, this resets the geometry of the clip to be wide
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
#include "include/core/SkSize.h"
|
|
16
16
|
#include "include/core/SkTypes.h"
|
|
17
17
|
#include "include/private/SkEncodedInfo.h"
|
|
18
|
-
#include "include/private/
|
|
18
|
+
#include "include/private/SkNoncopyable.h"
|
|
19
19
|
#include "modules/skcms/skcms.h"
|
|
20
20
|
|
|
21
21
|
// TODO(kjlubick, bungeman) Replace these includes with forward declares
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Google LLC
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
5
|
+
* found in the LICENSE file.
|
|
6
|
+
*/
|
|
7
|
+
#ifndef SkBmpRustDecoder_DEFINED
|
|
8
|
+
#define SkBmpRustDecoder_DEFINED
|
|
9
|
+
|
|
10
|
+
#include "include/codec/SkCodec.h"
|
|
11
|
+
#include "include/core/SkRefCnt.h"
|
|
12
|
+
#include "include/private/SkAPI.h"
|
|
13
|
+
|
|
14
|
+
class SkData;
|
|
15
|
+
class SkStream;
|
|
16
|
+
|
|
17
|
+
#include <memory>
|
|
18
|
+
|
|
19
|
+
namespace SkBmpRustDecoder {
|
|
20
|
+
|
|
21
|
+
/** Returns true if this data claims to be a BMP image. */
|
|
22
|
+
SK_API bool IsBmp(const void*, size_t);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Attempts to decode the given bytes as a BMP using Rust implementation.
|
|
26
|
+
*
|
|
27
|
+
* If the bytes are not a BMP, returns nullptr.
|
|
28
|
+
*/
|
|
29
|
+
SK_API std::unique_ptr<SkCodec> Decode(std::unique_ptr<SkStream>,
|
|
30
|
+
SkCodec::Result*,
|
|
31
|
+
SkCodecs::DecodeContext = nullptr);
|
|
32
|
+
SK_API std::unique_ptr<SkCodec> Decode(sk_sp<const SkData>,
|
|
33
|
+
SkCodec::Result*,
|
|
34
|
+
SkCodecs::DecodeContext = nullptr);
|
|
35
|
+
|
|
36
|
+
inline constexpr SkCodecs::Decoder Decoder() {
|
|
37
|
+
return { "rust_bmp", IsBmp, Decode };
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
} // namespace SkBmpRustDecoder
|
|
41
|
+
|
|
42
|
+
#endif // SkBmpRustDecoder_DEFINED
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
#include "include/core/SkYUVAPixmaps.h"
|
|
20
20
|
#include "include/private/SkEncodedInfo.h"
|
|
21
21
|
#include "include/private/SkHdrMetadata.h"
|
|
22
|
-
#include "include/private/
|
|
22
|
+
#include "include/private/SkNoncopyable.h"
|
|
23
23
|
#include "modules/skcms/skcms.h"
|
|
24
24
|
|
|
25
25
|
#include <cstddef>
|
|
@@ -1129,7 +1129,8 @@ private:
|
|
|
1129
1129
|
friend class PNGCodecGM; // for fillIncompleteImage
|
|
1130
1130
|
friend class SkSampledCodec;
|
|
1131
1131
|
friend class SkIcoCodec;
|
|
1132
|
-
friend class
|
|
1132
|
+
friend class SkIcoRustCodec; // for getEncodedInfo and getSampler
|
|
1133
|
+
friend class SkPngCodecBase; // for onGetGainmapCodec
|
|
1133
1134
|
friend class SkAndroidCodec; // for handleFrameIndex
|
|
1134
1135
|
friend class SkCodecPriv; // for fEncodedInfo
|
|
1135
1136
|
};
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
#include "include/core/SkSamplingOptions.h"
|
|
19
19
|
#include "include/core/SkSize.h"
|
|
20
20
|
#include "include/core/SkTypes.h"
|
|
21
|
-
#include "include/private/
|
|
22
|
-
#include "include/private/
|
|
21
|
+
#include "include/private/SkCPUTypes.h"
|
|
22
|
+
#include "include/private/SkDebug.h"
|
|
23
23
|
|
|
24
24
|
#include <cstddef>
|
|
25
25
|
#include <cstdint>
|
|
@@ -205,7 +205,7 @@ public:
|
|
|
205
205
|
|
|
206
206
|
@return true if dimensions do not enclose area
|
|
207
207
|
*/
|
|
208
|
-
bool empty() const { return fPixmap.
|
|
208
|
+
bool empty() const { return fPixmap.isEmpty(); }
|
|
209
209
|
|
|
210
210
|
/** Returns true if SkPixelRef is nullptr.
|
|
211
211
|
|
|
@@ -11,10 +11,9 @@
|
|
|
11
11
|
#include <cstdint>
|
|
12
12
|
#include "include/core/SkRecorder.h"
|
|
13
13
|
#include "include/core/SkRefCnt.h"
|
|
14
|
-
#include "include/private/
|
|
14
|
+
#include "include/private/SkAPI.h"
|
|
15
15
|
|
|
16
16
|
class SkCanvas;
|
|
17
|
-
class SkContentID;
|
|
18
17
|
class SkSurface;
|
|
19
18
|
class SkSurfaceProps;
|
|
20
19
|
struct SkImageInfo;
|
|
@@ -59,7 +58,7 @@ public:
|
|
|
59
58
|
private:
|
|
60
59
|
// TODO (b/412351769): Implement this so we can capture from a CPU Recorder.
|
|
61
60
|
SkCanvas* makeCaptureCanvas(SkCanvas*) final { return nullptr; }
|
|
62
|
-
|
|
61
|
+
void createCaptureBreakpoint(SkSurface*) final;
|
|
63
62
|
};
|
|
64
63
|
|
|
65
64
|
inline Recorder* AsRecorder(SkRecorder* recorder) {
|