@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
@@ -12,9 +12,8 @@
|
|
12
12
|
#include "include/core/SkFlattenable.h"
|
13
13
|
|
14
14
|
/**
|
15
|
-
* SkBlender represents a custom blend function in the Skia pipeline.
|
16
|
-
*
|
17
|
-
* result of our paint) and destination color (from the canvas) into a final color.
|
15
|
+
* SkBlender represents a custom blend function in the Skia pipeline. A blender combines a source
|
16
|
+
* color (the result of our paint) and destination color (from the canvas) into a final color.
|
18
17
|
*/
|
19
18
|
class SK_API SkBlender : public SkFlattenable {
|
20
19
|
public:
|
@@ -8,6 +8,7 @@
|
|
8
8
|
#ifndef SkCanvas_DEFINED
|
9
9
|
#define SkCanvas_DEFINED
|
10
10
|
|
11
|
+
#include "include/core/SkArc.h"
|
11
12
|
#include "include/core/SkBlendMode.h"
|
12
13
|
#include "include/core/SkClipOp.h"
|
13
14
|
#include "include/core/SkColor.h"
|
@@ -51,6 +52,7 @@ class GrRecordingContext;
|
|
51
52
|
|
52
53
|
class SkBitmap;
|
53
54
|
class SkBlender;
|
55
|
+
class SkColorSpace;
|
54
56
|
class SkData;
|
55
57
|
class SkDevice;
|
56
58
|
class SkDrawable;
|
@@ -78,6 +80,10 @@ class SkEnumBitMask;
|
|
78
80
|
namespace skgpu::graphite { class Recorder; }
|
79
81
|
namespace sktext::gpu { class Slug; }
|
80
82
|
namespace SkRecords { class Draw; }
|
83
|
+
namespace skiatest {
|
84
|
+
template <typename Key>
|
85
|
+
class TestCanvas;// IWYU pragma: keep
|
86
|
+
}
|
81
87
|
|
82
88
|
/** \class SkCanvas
|
83
89
|
SkCanvas provides an interface for drawing, and how the drawing is clipped and transformed.
|
@@ -694,7 +700,7 @@ public:
|
|
694
700
|
@return SaveLayerRec with empty fBackdrop
|
695
701
|
*/
|
696
702
|
SaveLayerRec(const SkRect* bounds, const SkPaint* paint, SaveLayerFlags saveLayerFlags = 0)
|
697
|
-
: SaveLayerRec(bounds, paint, nullptr, 1.f, saveLayerFlags, /*filters=*/{}) {}
|
703
|
+
: SaveLayerRec(bounds, paint, nullptr, nullptr, 1.f, saveLayerFlags, /*filters=*/{}) {}
|
698
704
|
|
699
705
|
/** Sets fBounds, fPaint, fBackdrop, and fSaveLayerFlags.
|
700
706
|
|
@@ -710,7 +716,29 @@ public:
|
|
710
716
|
*/
|
711
717
|
SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop,
|
712
718
|
SaveLayerFlags saveLayerFlags)
|
713
|
-
: SaveLayerRec(bounds, paint, backdrop, 1.f, saveLayerFlags, /*filters=*/{}) {}
|
719
|
+
: SaveLayerRec(bounds, paint, backdrop, nullptr, 1.f, saveLayerFlags, /*filters=*/{}) {}
|
720
|
+
|
721
|
+
/** Sets fBounds, fColorSpace, and fSaveLayerFlags.
|
722
|
+
|
723
|
+
@param bounds layer dimensions; may be nullptr
|
724
|
+
@param paint applied to layer when overlaying prior layer;
|
725
|
+
may be nullptr
|
726
|
+
@param backdrop If not null, this causes the current layer to be filtered by
|
727
|
+
backdrop, and then drawn into the new layer
|
728
|
+
(respecting the current clip).
|
729
|
+
If null, the new layer is initialized with transparent-black.
|
730
|
+
@param colorSpace If not null, when the layer is restored, a color space
|
731
|
+
conversion will be applied from this color space to the
|
732
|
+
parent's color space. The restore paint and backdrop filters will
|
733
|
+
be applied in this color space.
|
734
|
+
If null, the new layer will inherit the color space from its
|
735
|
+
parent.
|
736
|
+
@param saveLayerFlags SaveLayerRec options to modify layer
|
737
|
+
@return SaveLayerRec fully specified
|
738
|
+
*/
|
739
|
+
SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop,
|
740
|
+
const SkColorSpace* colorSpace, SaveLayerFlags saveLayerFlags)
|
741
|
+
: SaveLayerRec(bounds, paint, backdrop, colorSpace, 1.f, saveLayerFlags, /*filters=*/{}) {}
|
714
742
|
|
715
743
|
/** hints at layer size limit */
|
716
744
|
const SkRect* fBounds = nullptr;
|
@@ -728,6 +756,13 @@ public:
|
|
728
756
|
*/
|
729
757
|
const SkImageFilter* fBackdrop = nullptr;
|
730
758
|
|
759
|
+
/**
|
760
|
+
* If not null, this triggers a color space conversion when the layer is restored. It
|
761
|
+
* will be as if the layer's contents are drawn in this color space. Filters from
|
762
|
+
* fBackdrop and fPaint will be applied in this color space.
|
763
|
+
*/
|
764
|
+
const SkColorSpace* fColorSpace = nullptr;
|
765
|
+
|
731
766
|
/** preserves LCD text, creates with prior layer contents */
|
732
767
|
SaveLayerFlags fSaveLayerFlags = 0;
|
733
768
|
|
@@ -738,6 +773,7 @@ public:
|
|
738
773
|
SaveLayerRec(const SkRect* bounds,
|
739
774
|
const SkPaint* paint,
|
740
775
|
const SkImageFilter* backdrop,
|
776
|
+
const SkColorSpace* colorSpace,
|
741
777
|
SkScalar backdropScale,
|
742
778
|
SaveLayerFlags saveLayerFlags,
|
743
779
|
FilterSpan filters)
|
@@ -745,6 +781,7 @@ public:
|
|
745
781
|
, fPaint(paint)
|
746
782
|
, fFilters(filters)
|
747
783
|
, fBackdrop(backdrop)
|
784
|
+
, fColorSpace(colorSpace)
|
748
785
|
, fSaveLayerFlags(saveLayerFlags)
|
749
786
|
, fExperimentalBackdropScale(backdropScale) {
|
750
787
|
// We only allow the paint's image filter or the side-car list of filters -- not both.
|
@@ -1436,6 +1473,27 @@ public:
|
|
1436
1473
|
void drawArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
|
1437
1474
|
bool useCenter, const SkPaint& paint);
|
1438
1475
|
|
1476
|
+
/** Draws arc using clip, SkMatrix, and SkPaint paint.
|
1477
|
+
|
1478
|
+
Arc is part of oval bounded by oval, sweeping from startAngle to startAngle plus
|
1479
|
+
sweepAngle. startAngle and sweepAngle are in degrees.
|
1480
|
+
|
1481
|
+
startAngle of zero places start point at the right middle edge of oval.
|
1482
|
+
A positive sweepAngle places arc end point clockwise from start point;
|
1483
|
+
a negative sweepAngle places arc end point counterclockwise from start point.
|
1484
|
+
sweepAngle may exceed 360 degrees, a full circle.
|
1485
|
+
If useCenter is true, draw a wedge that includes lines from oval
|
1486
|
+
center to arc end points. If useCenter is false, draw arc between end points.
|
1487
|
+
|
1488
|
+
If SkRect oval is empty or sweepAngle is zero, nothing is drawn.
|
1489
|
+
|
1490
|
+
@param arc SkArc specifying oval, startAngle, sweepAngle, and arc-vs-wedge
|
1491
|
+
@param paint SkPaint stroke or fill, blend, color, and so on, used to draw
|
1492
|
+
*/
|
1493
|
+
void drawArc(const SkArc& arc, const SkPaint& paint) {
|
1494
|
+
this->drawArc(arc.fOval, arc.fStartAngle, arc.fSweepAngle, arc.isWedge(), paint);
|
1495
|
+
}
|
1496
|
+
|
1439
1497
|
/** Draws SkRRect bounded by SkRect rect, with corner radii (rx, ry) using clip,
|
1440
1498
|
SkMatrix, and SkPaint paint.
|
1441
1499
|
|
@@ -2299,7 +2357,7 @@ protected:
|
|
2299
2357
|
|
2300
2358
|
/**
|
2301
2359
|
*/
|
2302
|
-
virtual void onDrawSlug(const sktext::gpu::Slug* slug);
|
2360
|
+
virtual void onDrawSlug(const sktext::gpu::Slug* slug, const SkPaint& paint);
|
2303
2361
|
|
2304
2362
|
private:
|
2305
2363
|
enum class PredrawFlags : unsigned {
|
@@ -2351,10 +2409,15 @@ private:
|
|
2351
2409
|
bool fIsCoverage;
|
2352
2410
|
bool fDiscard;
|
2353
2411
|
|
2412
|
+
// If true, the layer image is sized to include a 1px buffer that remains transparent
|
2413
|
+
// to allow for faster linear filtering under complex transforms.
|
2414
|
+
bool fIncludesPadding;
|
2415
|
+
|
2354
2416
|
Layer(sk_sp<SkDevice> device,
|
2355
2417
|
FilterSpan imageFilters,
|
2356
2418
|
const SkPaint& paint,
|
2357
|
-
bool isCoverage
|
2419
|
+
bool isCoverage,
|
2420
|
+
bool includesPadding);
|
2358
2421
|
};
|
2359
2422
|
|
2360
2423
|
// Encapsulate state needed to restore from saveBehind()
|
@@ -2392,7 +2455,8 @@ private:
|
|
2392
2455
|
void newLayer(sk_sp<SkDevice> layerDevice,
|
2393
2456
|
FilterSpan filters,
|
2394
2457
|
const SkPaint& restorePaint,
|
2395
|
-
bool layerIsCoverage
|
2458
|
+
bool layerIsCoverage,
|
2459
|
+
bool includesPadding);
|
2396
2460
|
|
2397
2461
|
void reset(SkDevice* device);
|
2398
2462
|
};
|
@@ -2441,7 +2505,7 @@ private:
|
|
2441
2505
|
friend class SkRasterHandleAllocator;
|
2442
2506
|
friend class SkRecords::Draw;
|
2443
2507
|
template <typename Key>
|
2444
|
-
friend class
|
2508
|
+
friend class skiatest::TestCanvas;
|
2445
2509
|
|
2446
2510
|
protected:
|
2447
2511
|
// For use by SkNoDrawCanvas (via SkCanvasVirtualEnforcer, which can't be a friend)
|
@@ -2466,7 +2530,7 @@ private:
|
|
2466
2530
|
/**
|
2467
2531
|
* Draw an sktext::gpu::Slug given the current canvas state.
|
2468
2532
|
*/
|
2469
|
-
void drawSlug(const sktext::gpu::Slug* slug);
|
2533
|
+
void drawSlug(const sktext::gpu::Slug* slug, const SkPaint& paint);
|
2470
2534
|
|
2471
2535
|
/** Experimental
|
2472
2536
|
* Saves the specified subset of the current pixels in the current layer,
|
@@ -2506,13 +2570,16 @@ private:
|
|
2506
2570
|
void internalSave();
|
2507
2571
|
void internalRestore();
|
2508
2572
|
|
2509
|
-
enum class DeviceCompatibleWithFilter :
|
2573
|
+
enum class DeviceCompatibleWithFilter : int {
|
2510
2574
|
// Check the src device's local-to-device matrix for compatibility with the filter, and if
|
2511
2575
|
// it is not compatible, introduce an intermediate image and transformation that allows the
|
2512
2576
|
// filter to be evaluated on the modified src content.
|
2513
|
-
kUnknown
|
2577
|
+
kUnknown,
|
2514
2578
|
// Assume that the src device's local-to-device matrix is compatible with the filter.
|
2515
|
-
kYes
|
2579
|
+
kYes,
|
2580
|
+
// Assume that the src device's local-to-device matrix is compatible with the filter,
|
2581
|
+
// *and* the source image has a 1px buffer of padding.
|
2582
|
+
kYesWithPadding
|
2516
2583
|
};
|
2517
2584
|
/**
|
2518
2585
|
* Filters the contents of 'src' and draws the result into 'dst'. The filter is evaluated
|
@@ -2528,6 +2595,7 @@ private:
|
|
2528
2595
|
void internalDrawDeviceWithFilter(SkDevice* src, SkDevice* dst,
|
2529
2596
|
FilterSpan filters, const SkPaint& paint,
|
2530
2597
|
DeviceCompatibleWithFilter compat,
|
2598
|
+
const SkColorInfo& filterColorInfo,
|
2531
2599
|
SkScalar scaleFactor = 1.f,
|
2532
2600
|
bool srcIsCoverageLayer = false);
|
2533
2601
|
|
@@ -2539,12 +2607,6 @@ private:
|
|
2539
2607
|
bool wouldOverwriteEntireSurface(const SkRect*, const SkPaint*,
|
2540
2608
|
SkEnumBitMask<PredrawFlags>) const;
|
2541
2609
|
|
2542
|
-
/**
|
2543
|
-
* Returns true if the paint's imagefilter can be invoked directly, without needed a layer.
|
2544
|
-
*/
|
2545
|
-
bool canDrawBitmapAsSprite(SkScalar x, SkScalar y, int w, int h, const SkSamplingOptions&,
|
2546
|
-
const SkPaint&);
|
2547
|
-
|
2548
2610
|
/**
|
2549
2611
|
* Returns true if the clip (for any active layer) contains antialiasing.
|
2550
2612
|
* If the clip is empty, this will return false.
|
@@ -2568,6 +2630,14 @@ private:
|
|
2568
2630
|
// into the canvas' global space.
|
2569
2631
|
SkRect computeDeviceClipBounds(bool outsetForAA=true) const;
|
2570
2632
|
|
2633
|
+
// Attempt to draw a rrect with an analytic blur. If the paint does not contain a blur, or the
|
2634
|
+
// geometry can't be drawn with an analytic blur by the device, a layer is returned for a
|
2635
|
+
// regular draw. If the draw succeeds or predrawNotify fails, nullopt is returned indicating
|
2636
|
+
// that nothing further should be drawn.
|
2637
|
+
std::optional<AutoLayerForImageFilter> attemptBlurredRRectDraw(const SkRRect&,
|
2638
|
+
const SkPaint&,
|
2639
|
+
SkEnumBitMask<PredrawFlags>);
|
2640
|
+
|
2571
2641
|
class AutoUpdateQRBounds;
|
2572
2642
|
void validateClip() const;
|
2573
2643
|
|
@@ -14,9 +14,7 @@
|
|
14
14
|
|
15
15
|
namespace SkSL { struct ShaderCaps; }
|
16
16
|
|
17
|
-
#if defined(SK_GRAPHITE)
|
18
17
|
namespace skgpu::graphite { class Caps; }
|
19
|
-
#endif
|
20
18
|
|
21
19
|
class SK_API SkCapabilities : public SkRefCnt {
|
22
20
|
public:
|
@@ -25,9 +23,7 @@ public:
|
|
25
23
|
SkSL::Version skslVersion() const { return fSkSLVersion; }
|
26
24
|
|
27
25
|
protected:
|
28
|
-
#if defined(SK_GRAPHITE)
|
29
26
|
friend class skgpu::graphite::Caps; // for ctor
|
30
|
-
#endif
|
31
27
|
|
32
28
|
SkCapabilities() = default;
|
33
29
|
|
@@ -49,8 +49,6 @@ public:
|
|
49
49
|
// Returns true if the filter is guaranteed to never change the alpha of a color it filters.
|
50
50
|
bool isAlphaUnchanged() const;
|
51
51
|
|
52
|
-
SkColor filterColor(SkColor) const;
|
53
|
-
|
54
52
|
/**
|
55
53
|
* Converts the src color (in src colorspace), into the dst colorspace,
|
56
54
|
* then applies this filter to it, returning the filtered color in the dst colorspace.
|
@@ -94,8 +92,10 @@ public:
|
|
94
92
|
static sk_sp<SkColorFilter> Blend(const SkColor4f& c, sk_sp<SkColorSpace>, SkBlendMode mode);
|
95
93
|
static sk_sp<SkColorFilter> Blend(SkColor c, SkBlendMode mode);
|
96
94
|
|
97
|
-
|
98
|
-
|
95
|
+
enum class Clamp : bool { kNo, kYes };
|
96
|
+
|
97
|
+
static sk_sp<SkColorFilter> Matrix(const SkColorMatrix&, Clamp clamp = Clamp::kYes);
|
98
|
+
static sk_sp<SkColorFilter> Matrix(const float rowMajor[20], Clamp clamp = Clamp::kYes);
|
99
99
|
|
100
100
|
// A version of Matrix which operates in HSLA space instead of RGBA.
|
101
101
|
// I.e. HSLA-to-RGBA(Matrix(RGBA-to-HSLA(input))).
|
@@ -100,22 +100,20 @@ static inline U8CPU SkUnitScalarClampToByte(SkScalar x) {
|
|
100
100
|
#define SkB32Assert(b) SkASSERT((unsigned)(b) <= SK_B32_MASK)
|
101
101
|
|
102
102
|
/**
|
103
|
-
* Pack the components into a SkPMColor
|
104
|
-
* the components are 0..255, and are already premultiplied (i.e. alpha >= color)
|
103
|
+
* Pack the components into a SkPMColor
|
105
104
|
*/
|
106
105
|
static inline SkPMColor SkPackARGB32(U8CPU a, U8CPU r, U8CPU g, U8CPU b) {
|
107
106
|
SkA32Assert(a);
|
108
|
-
|
109
|
-
|
110
|
-
|
107
|
+
SkR32Assert(r);
|
108
|
+
SkG32Assert(g);
|
109
|
+
SkB32Assert(b);
|
111
110
|
|
112
111
|
return (a << SK_A32_SHIFT) | (r << SK_R32_SHIFT) |
|
113
112
|
(g << SK_G32_SHIFT) | (b << SK_B32_SHIFT);
|
114
113
|
}
|
115
114
|
|
116
115
|
/**
|
117
|
-
*
|
118
|
-
* values are premultiplied in the debug version.
|
116
|
+
* Legacy "NoCheck" version of SkPackARGB32. Remove this once all callers are updated.
|
119
117
|
*/
|
120
118
|
static inline SkPMColor SkPackARGB32NoCheck(U8CPU a, U8CPU r, U8CPU g, U8CPU b) {
|
121
119
|
return (a << SK_A32_SHIFT) | (r << SK_R32_SHIFT) |
|
@@ -29,6 +29,7 @@ enum SkColorType : int {
|
|
29
29
|
kRGB_101010x_SkColorType, //!< pixel with 10 bits each for red, green, blue; in 32-bit word
|
30
30
|
kBGR_101010x_SkColorType, //!< pixel with 10 bits each for blue, green, red; in 32-bit word
|
31
31
|
kBGR_101010x_XR_SkColorType, //!< pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
|
32
|
+
kBGRA_10101010_XR_SkColorType, //!< pixel with 10 bits each for blue, green, red, alpha; in 64-bit word, extended range
|
32
33
|
kRGBA_10x6_SkColorType, //!< pixel with 10 used bits (most significant) followed by 6 unused
|
33
34
|
// bits for red, green, blue, alpha; in 64-bit word
|
34
35
|
kGray_8_SkColorType, //!< pixel with grayscale level in 8-bit byte
|
@@ -36,6 +37,7 @@ enum SkColorType : int {
|
|
36
37
|
// in 64-bit word
|
37
38
|
kRGBA_F16_SkColorType, //!< pixel with half floats for red, green, blue, alpha;
|
38
39
|
// in 64-bit word
|
40
|
+
kRGB_F16F16F16x_SkColorType, //!< pixel with half floats for red, green, blue; in 64-bit word
|
39
41
|
kRGBA_F32_SkColorType, //!< pixel using C float for red, green, blue, alpha; in 128-bit word
|
40
42
|
|
41
43
|
// The following 6 colortypes are just for reading from - not for rendering to
|
@@ -9,9 +9,11 @@
|
|
9
9
|
#define SkFontArguments_DEFINED
|
10
10
|
|
11
11
|
#include "include/core/SkColor.h"
|
12
|
-
#include "include/core/
|
12
|
+
#include "include/core/SkFourByteTag.h"
|
13
13
|
#include "include/core/SkTypes.h"
|
14
14
|
|
15
|
+
#include <cstdint>
|
16
|
+
|
15
17
|
/** Represents a set of actual arguments for a font. */
|
16
18
|
struct SkFontArguments {
|
17
19
|
struct VariationPosition {
|
@@ -8,8 +8,9 @@
|
|
8
8
|
#ifndef SkFontParameters_DEFINED
|
9
9
|
#define SkFontParameters_DEFINED
|
10
10
|
|
11
|
-
#include "include/core/
|
12
|
-
|
11
|
+
#include "include/core/SkFourByteTag.h"
|
12
|
+
|
13
|
+
#include <cstdint>
|
13
14
|
|
14
15
|
struct SkFontParameters {
|
15
16
|
struct Variation {
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2024 Google LLC
|
3
|
+
*
|
4
|
+
* Use of this source code is governed by a BSD-style license that can be
|
5
|
+
* found in the LICENSE file.
|
6
|
+
*/
|
7
|
+
|
8
|
+
#ifndef SkFourByteTag_DEFINED
|
9
|
+
#define SkFourByteTag_DEFINED
|
10
|
+
|
11
|
+
#include <cstdint>
|
12
|
+
|
13
|
+
using SkFourByteTag = uint32_t;
|
14
|
+
|
15
|
+
static inline constexpr SkFourByteTag SkSetFourByteTag(char a, char b, char c, char d) {
|
16
|
+
return (((uint32_t)a << 24) | ((uint32_t)b << 16) | ((uint32_t)c << 8) | (uint32_t)d);
|
17
|
+
}
|
18
|
+
|
19
|
+
#endif
|
@@ -98,6 +98,8 @@ SK_API sk_sp<SkImage> RasterFromCompressedTextureData(sk_sp<SkData> data,
|
|
98
98
|
*
|
99
99
|
* If the encoded format is not supported, nullptr is returned.
|
100
100
|
*
|
101
|
+
* If possible, clients should use SkCodecs::DeferredImage instead.
|
102
|
+
*
|
101
103
|
* @param encoded the encoded data
|
102
104
|
* @return created SkImage, or nullptr
|
103
105
|
|
@@ -466,6 +468,9 @@ public:
|
|
466
468
|
/** Copies SkRect of pixels from SkImage to dstPixels. Copy starts at offset (srcX, srcY),
|
467
469
|
and does not exceed SkImage (width(), height()).
|
468
470
|
|
471
|
+
Graphite has deprecated this API in favor of the equivalent asynchronous API on
|
472
|
+
skgpu::graphite::Context (with an optional explicit synchonization).
|
473
|
+
|
469
474
|
dstInfo specifies width, height, SkColorType, SkAlphaType, and SkColorSpace of
|
470
475
|
destination. dstRowBytes specifies the gap from one destination row to the next.
|
471
476
|
Returns true if pixels are copied. Returns false if:
|
@@ -506,6 +511,9 @@ public:
|
|
506
511
|
/** Copies a SkRect of pixels from SkImage to dst. Copy starts at (srcX, srcY), and
|
507
512
|
does not exceed SkImage (width(), height()).
|
508
513
|
|
514
|
+
Graphite has deprecated this API in favor of the equivalent asynchronous API on
|
515
|
+
skgpu::graphite::Context (with an optional explicit synchonization).
|
516
|
+
|
509
517
|
dst specifies width, height, SkColorType, SkAlphaType, SkColorSpace, pixel storage,
|
510
518
|
and row bytes of destination. dst.rowBytes() specifics the gap from one destination
|
511
519
|
row to the next. Returns true if pixels are copied. Returns false if:
|
@@ -557,8 +565,17 @@ public:
|
|
557
565
|
AsyncReadResult& operator=(AsyncReadResult&&) = delete;
|
558
566
|
|
559
567
|
virtual ~AsyncReadResult() = default;
|
568
|
+
/** Returns how many planes of data are in the result. e.g. 3 for YUV data. */
|
560
569
|
virtual int count() const = 0;
|
570
|
+
/** Returns the raw pixel data for a given plane.
|
571
|
+
*
|
572
|
+
* It will be organized as per the dst SkImageInfo passed in to the async read call.
|
573
|
+
*
|
574
|
+
* Clients may wish to create an SkPixmap with this data using the dst SkImageInfo
|
575
|
+
* and rowBytes(i).
|
576
|
+
*/
|
561
577
|
virtual const void* data(int i) const = 0;
|
578
|
+
/** Returns how many bytes correspond to a single row of image data */
|
562
579
|
virtual size_t rowBytes(int i) const = 0;
|
563
580
|
|
564
581
|
protected:
|
@@ -585,10 +602,13 @@ public:
|
|
585
602
|
/** Makes image pixel data available to caller, possibly asynchronously. It can also rescale
|
586
603
|
the image pixels.
|
587
604
|
|
588
|
-
Currently asynchronous reads are only supported
|
605
|
+
Currently asynchronous reads are only supported in the Ganesh GPU backend and only when the
|
589
606
|
underlying 3D API supports transfer buffers and CPU/GPU synchronization primitives. In all
|
590
607
|
other cases this operates synchronously.
|
591
608
|
|
609
|
+
For the Graphite backend this API has been deprecated in favor of the equivalent API
|
610
|
+
on skgpu::graphite::Context.
|
611
|
+
|
592
612
|
Data is read from the source sub-rectangle, is optionally converted to a linear gamma, is
|
593
613
|
rescaled to the size indicated by 'info', is then converted to the color space, color type,
|
594
614
|
and alpha type of 'info'. A 'srcRect' that is not contained by the bounds of the image
|
@@ -692,6 +712,26 @@ public:
|
|
692
712
|
bool scalePixels(const SkPixmap& dst, const SkSamplingOptions&,
|
693
713
|
CachingHint cachingHint = kAllow_CachingHint) const;
|
694
714
|
|
715
|
+
/**
|
716
|
+
* Create a new image by copying this image and scaling to fit the ImageInfo's dimensions
|
717
|
+
* and converting the pixels into the ImageInfo's ColorInfo.
|
718
|
+
* This is done retaining the domain (backend) of the image (e.g. gpu, raster)
|
719
|
+
*
|
720
|
+
* The Recorder parameter is required if the original image was created on a graphite Recorder,
|
721
|
+
* but must be nullptr if it was create in some other way (e.g. GrContext, raster, deferred).
|
722
|
+
*
|
723
|
+
* return nullptr if the requested ColorInfo is not supported, its dimesions are out of range,
|
724
|
+
* or if the recorder is null on a graphite Image.
|
725
|
+
*/
|
726
|
+
sk_sp<SkImage> makeScaled(skgpu::graphite::Recorder*,
|
727
|
+
const SkImageInfo&,
|
728
|
+
const SkSamplingOptions&) const;
|
729
|
+
|
730
|
+
sk_sp<SkImage> makeScaled(const SkImageInfo& info,
|
731
|
+
const SkSamplingOptions& sampling) const {
|
732
|
+
return this->makeScaled(nullptr, info, sampling);
|
733
|
+
}
|
734
|
+
|
695
735
|
/** Returns encoded SkImage pixels as SkData, if SkImage was created from supported
|
696
736
|
encoded stream format. Platform support for formats vary and may require building
|
697
737
|
with one or more of: SK_ENCODE_JPEG, SK_ENCODE_PNG, SK_ENCODE_WEBP.
|
@@ -15,11 +15,6 @@
|
|
15
15
|
#include "include/core/SkYUVAPixmaps.h"
|
16
16
|
#include "include/private/base/SkAPI.h"
|
17
17
|
|
18
|
-
#if defined(SK_GRAPHITE)
|
19
|
-
#include "include/core/SkImage.h"
|
20
|
-
#include "include/gpu/graphite/Recorder.h"
|
21
|
-
#endif
|
22
|
-
|
23
18
|
#include <cstddef>
|
24
19
|
#include <cstdint>
|
25
20
|
|
@@ -76,6 +76,24 @@ enum SkYUVColorSpace : int {
|
|
76
76
|
kBT2020_10bit_Limited_SkYUVColorSpace,
|
77
77
|
kBT2020_12bit_Full_SkYUVColorSpace,
|
78
78
|
kBT2020_12bit_Limited_SkYUVColorSpace,
|
79
|
+
kBT2020_16bit_Full_SkYUVColorSpace,
|
80
|
+
kBT2020_16bit_Limited_SkYUVColorSpace,
|
81
|
+
kFCC_Full_SkYUVColorSpace, //!< describes FCC range
|
82
|
+
kFCC_Limited_SkYUVColorSpace,
|
83
|
+
kSMPTE240_Full_SkYUVColorSpace, //!< describes SMPTE240M range
|
84
|
+
kSMPTE240_Limited_SkYUVColorSpace,
|
85
|
+
kYDZDX_Full_SkYUVColorSpace, //!< describes YDZDX range
|
86
|
+
kYDZDX_Limited_SkYUVColorSpace,
|
87
|
+
kGBR_Full_SkYUVColorSpace, //!< describes GBR range
|
88
|
+
kGBR_Limited_SkYUVColorSpace,
|
89
|
+
kYCgCo_8bit_Full_SkYUVColorSpace, //!< describes YCgCo matrix
|
90
|
+
kYCgCo_8bit_Limited_SkYUVColorSpace,
|
91
|
+
kYCgCo_10bit_Full_SkYUVColorSpace,
|
92
|
+
kYCgCo_10bit_Limited_SkYUVColorSpace,
|
93
|
+
kYCgCo_12bit_Full_SkYUVColorSpace,
|
94
|
+
kYCgCo_12bit_Limited_SkYUVColorSpace,
|
95
|
+
kYCgCo_16bit_Full_SkYUVColorSpace,
|
96
|
+
kYCgCo_16bit_Limited_SkYUVColorSpace,
|
79
97
|
kIdentity_SkYUVColorSpace, //!< maps Y->R, U->G, V->B
|
80
98
|
|
81
99
|
kLastEnum_SkYUVColorSpace = kIdentity_SkYUVColorSpace, //!< last valid value
|
@@ -87,6 +105,8 @@ enum SkYUVColorSpace : int {
|
|
87
105
|
kBT2020_SkYUVColorSpace = kBT2020_8bit_Limited_SkYUVColorSpace,
|
88
106
|
};
|
89
107
|
|
108
|
+
SK_API bool SkYUVColorSpaceIsLimitedRange(SkYUVColorSpace cs);
|
109
|
+
|
90
110
|
/** \struct SkColorInfo
|
91
111
|
Describes pixel and encoding. SkImageInfo can be created from SkColorInfo by
|
92
112
|
providing dimensions.
|
@@ -375,7 +375,7 @@ public:
|
|
375
375
|
|
376
376
|
@return true if matrix has only finite elements
|
377
377
|
*/
|
378
|
-
bool isFinite() const { return
|
378
|
+
bool isFinite() const { return SkIsFinite(fMat, 16); }
|
379
379
|
|
380
380
|
/** If this is invertible, return that in inverse and return true. If it is
|
381
381
|
* not invertible, return false and leave the inverse parameter unchanged.
|
@@ -12,6 +12,7 @@
|
|
12
12
|
#include "include/core/SkRect.h"
|
13
13
|
#include "include/core/SkScalar.h"
|
14
14
|
#include "include/core/SkTypes.h"
|
15
|
+
#include "include/private/base/SkFloatingPoint.h"
|
15
16
|
#include "include/private/base/SkMacros.h"
|
16
17
|
#include "include/private/base/SkTo.h"
|
17
18
|
|
@@ -1830,7 +1831,7 @@ public:
|
|
1830
1831
|
|
1831
1832
|
@return true if matrix has only finite elements
|
1832
1833
|
*/
|
1833
|
-
bool isFinite() const { return
|
1834
|
+
bool isFinite() const { return SkIsFinite(fMat, 9); }
|
1834
1835
|
|
1835
1836
|
private:
|
1836
1837
|
/** Set if the matrix will map a rectangle to another rectangle. This
|
@@ -177,7 +177,7 @@ public:
|
|
177
177
|
}
|
178
178
|
|
179
179
|
/** Requests, but does not require, to distribute color error.
|
180
|
-
@param dither setting for
|
180
|
+
@param dither setting for dithering
|
181
181
|
*/
|
182
182
|
void setDither(bool dither) { fBitfields.fDither = static_cast<unsigned>(dither); }
|
183
183
|
|
@@ -137,6 +137,18 @@ public:
|
|
137
137
|
*/
|
138
138
|
~SkPath();
|
139
139
|
|
140
|
+
/** Returns a copy of this path in the current state. */
|
141
|
+
SkPath snapshot() const {
|
142
|
+
return *this;
|
143
|
+
}
|
144
|
+
|
145
|
+
/** Returns a copy of this path in the current state, and resets the path to empty. */
|
146
|
+
SkPath detach() {
|
147
|
+
SkPath result = *this;
|
148
|
+
this->reset();
|
149
|
+
return result;
|
150
|
+
}
|
151
|
+
|
140
152
|
/** Constructs a copy of an existing path.
|
141
153
|
SkPath assignment makes two paths identical by value. Internally, assignment
|
142
154
|
shares pointer values. The underlying verb array, SkPoint array and weights
|
@@ -537,15 +549,17 @@ public:
|
|
537
549
|
*/
|
538
550
|
bool conservativelyContainsRect(const SkRect& rect) const;
|
539
551
|
|
540
|
-
/** Grows SkPath verb array
|
552
|
+
/** Grows SkPath verb array, SkPoint array, and conics to contain additional space.
|
541
553
|
May improve performance and use less memory by
|
542
554
|
reducing the number and size of allocations when creating SkPath.
|
543
555
|
|
544
556
|
@param extraPtCount number of additional SkPoint to allocate
|
557
|
+
@param extraVerbCount number of additional verbs
|
558
|
+
@param extraConicCount number of additional conics
|
545
559
|
|
546
560
|
example: https://fiddle.skia.org/c/@Path_incReserve
|
547
561
|
*/
|
548
|
-
void incReserve(int extraPtCount);
|
562
|
+
void incReserve(int extraPtCount, int extraVerbCount = 0, int extraConicCount = 0);
|
549
563
|
|
550
564
|
#ifdef SK_HIDE_PATH_EDIT_METHODS
|
551
565
|
private:
|
@@ -1332,8 +1346,9 @@ public:
|
|
1332
1346
|
@param dx offset added to SkPoint array x-axis coordinates
|
1333
1347
|
@param dy offset added to SkPoint array y-axis coordinates
|
1334
1348
|
*/
|
1335
|
-
|
1349
|
+
SkPath& offset(SkScalar dx, SkScalar dy) {
|
1336
1350
|
this->offset(dx, dy, this);
|
1351
|
+
return *this;
|
1337
1352
|
}
|
1338
1353
|
|
1339
1354
|
/** Transforms verb array, SkPoint array, and weight by matrix.
|
@@ -1357,9 +1372,10 @@ public:
|
|
1357
1372
|
@param matrix SkMatrix to apply to SkPath
|
1358
1373
|
@param pc whether to apply perspective clipping
|
1359
1374
|
*/
|
1360
|
-
|
1375
|
+
SkPath& transform(const SkMatrix& matrix,
|
1361
1376
|
SkApplyPerspectiveClip pc = SkApplyPerspectiveClip::kYes) {
|
1362
1377
|
this->transform(matrix, this, pc);
|
1378
|
+
return *this;
|
1363
1379
|
}
|
1364
1380
|
|
1365
1381
|
SkPath makeTransform(const SkMatrix& m,
|
@@ -1790,7 +1806,6 @@ private:
|
|
1790
1806
|
|
1791
1807
|
/** Resets all fields other than fPathRef to their initial 'empty' values.
|
1792
1808
|
* Assumes the caller has already emptied fPathRef.
|
1793
|
-
* On Android increments fGenerationID without reseting it.
|
1794
1809
|
*/
|
1795
1810
|
void resetFields();
|
1796
1811
|
|
@@ -1802,7 +1817,6 @@ private:
|
|
1802
1817
|
|
1803
1818
|
size_t writeToMemoryAsRRect(void* buffer) const;
|
1804
1819
|
size_t readAsRRect(const void*, size_t);
|
1805
|
-
size_t readFromMemory_EQ4Or5(const void*, size_t);
|
1806
1820
|
|
1807
1821
|
friend class Iter;
|
1808
1822
|
friend class SkPathPriv;
|