@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
@@ -8,6 +8,7 @@
|
|
8
8
|
#ifndef SkTArray_DEFINED
|
9
9
|
#define SkTArray_DEFINED
|
10
10
|
|
11
|
+
#include "include/private/base/SkASAN.h" // IWYU pragma: keep
|
11
12
|
#include "include/private/base/SkAlignedStorage.h"
|
12
13
|
#include "include/private/base/SkAssert.h"
|
13
14
|
#include "include/private/base/SkAttributes.h"
|
@@ -63,7 +64,8 @@ public:
|
|
63
64
|
this->initData(that.fSize);
|
64
65
|
that.move(fData);
|
65
66
|
}
|
66
|
-
|
67
|
+
this->changeSize(that.fSize);
|
68
|
+
that.changeSize(0);
|
67
69
|
}
|
68
70
|
|
69
71
|
/**
|
@@ -76,6 +78,11 @@ public:
|
|
76
78
|
this->copy(array);
|
77
79
|
}
|
78
80
|
|
81
|
+
/**
|
82
|
+
* Creates a TArray by copying contents from an SkSpan. The new array will be heap allocated.
|
83
|
+
*/
|
84
|
+
TArray(SkSpan<const T> data) : TArray(data.begin(), static_cast<int>(data.size())) {}
|
85
|
+
|
79
86
|
/**
|
80
87
|
* Creates a TArray by copying contents of an initializer list.
|
81
88
|
*/
|
@@ -87,13 +94,16 @@ public:
|
|
87
94
|
}
|
88
95
|
this->clear();
|
89
96
|
this->checkRealloc(that.size(), kExactFit);
|
90
|
-
|
97
|
+
this->changeSize(that.fSize);
|
91
98
|
this->copy(that.fData);
|
92
99
|
return *this;
|
93
100
|
}
|
101
|
+
|
94
102
|
TArray& operator=(TArray&& that) {
|
95
103
|
if (this != &that) {
|
96
104
|
this->clear();
|
105
|
+
this->unpoison();
|
106
|
+
that.unpoison();
|
97
107
|
if (that.fOwnMemory) {
|
98
108
|
// The storage is on the heap, so move the data pointer.
|
99
109
|
if (fOwnMemory) {
|
@@ -107,18 +117,22 @@ public:
|
|
107
117
|
that.fCapacity = 0;
|
108
118
|
|
109
119
|
fOwnMemory = true;
|
120
|
+
|
121
|
+
this->changeSize(that.fSize);
|
110
122
|
} else {
|
111
123
|
// The data is stored inline in that, so move it element-by-element.
|
112
124
|
this->checkRealloc(that.size(), kExactFit);
|
125
|
+
this->changeSize(that.fSize);
|
113
126
|
that.move(fData);
|
114
127
|
}
|
115
|
-
|
128
|
+
that.changeSize(0);
|
116
129
|
}
|
117
130
|
return *this;
|
118
131
|
}
|
119
132
|
|
120
133
|
~TArray() {
|
121
134
|
this->destroyAll();
|
135
|
+
this->unpoison();
|
122
136
|
if (fOwnMemory) {
|
123
137
|
sk_free(fData);
|
124
138
|
}
|
@@ -131,7 +145,7 @@ public:
|
|
131
145
|
SkASSERT(n >= 0);
|
132
146
|
this->clear();
|
133
147
|
this->checkRealloc(n, kExactFit);
|
134
|
-
|
148
|
+
this->changeSize(n);
|
135
149
|
for (int i = 0; i < this->size(); ++i) {
|
136
150
|
new (fData + i) T;
|
137
151
|
}
|
@@ -144,7 +158,7 @@ public:
|
|
144
158
|
SkASSERT(count >= 0);
|
145
159
|
this->clear();
|
146
160
|
this->checkRealloc(count, kExactFit);
|
147
|
-
|
161
|
+
this->changeSize(count);
|
148
162
|
this->copy(array);
|
149
163
|
}
|
150
164
|
|
@@ -174,11 +188,11 @@ public:
|
|
174
188
|
void removeShuffle(int n) {
|
175
189
|
SkASSERT(n < this->size());
|
176
190
|
int newCount = fSize - 1;
|
177
|
-
fSize = newCount;
|
178
191
|
fData[n].~T();
|
179
192
|
if (n != newCount) {
|
180
193
|
this->move(n, newCount);
|
181
194
|
}
|
195
|
+
this->changeSize(newCount);
|
182
196
|
}
|
183
197
|
|
184
198
|
// Is the array empty.
|
@@ -198,6 +212,7 @@ public:
|
|
198
212
|
* the reference only remains valid until the next call that adds or removes elements.
|
199
213
|
*/
|
200
214
|
T& push_back(const T& t) {
|
215
|
+
this->unpoison();
|
201
216
|
T* newT;
|
202
217
|
if (this->capacity() > fSize) SK_LIKELY {
|
203
218
|
// Copy over the element directly.
|
@@ -206,7 +221,7 @@ public:
|
|
206
221
|
newT = this->growAndConstructAtEnd(t);
|
207
222
|
}
|
208
223
|
|
209
|
-
fSize
|
224
|
+
this->changeSize(fSize + 1);
|
210
225
|
return *newT;
|
211
226
|
}
|
212
227
|
|
@@ -214,6 +229,7 @@ public:
|
|
214
229
|
* Adds one new T value which is copy-constructed, returning it by reference.
|
215
230
|
*/
|
216
231
|
T& push_back(T&& t) {
|
232
|
+
this->unpoison();
|
217
233
|
T* newT;
|
218
234
|
if (this->capacity() > fSize) SK_LIKELY {
|
219
235
|
// Move over the element directly.
|
@@ -222,7 +238,7 @@ public:
|
|
222
238
|
newT = this->growAndConstructAtEnd(std::move(t));
|
223
239
|
}
|
224
240
|
|
225
|
-
fSize
|
241
|
+
this->changeSize(fSize + 1);
|
226
242
|
return *newT;
|
227
243
|
}
|
228
244
|
|
@@ -230,6 +246,7 @@ public:
|
|
230
246
|
* Constructs a new T at the back of this array, returning it by reference.
|
231
247
|
*/
|
232
248
|
template <typename... Args> T& emplace_back(Args&&... args) {
|
249
|
+
this->unpoison();
|
233
250
|
T* newT;
|
234
251
|
if (this->capacity() > fSize) SK_LIKELY {
|
235
252
|
// Emplace the new element in directly.
|
@@ -238,7 +255,7 @@ public:
|
|
238
255
|
newT = this->growAndConstructAtEnd(std::forward<Args>(args)...);
|
239
256
|
}
|
240
257
|
|
241
|
-
fSize
|
258
|
+
this->changeSize(fSize + 1);
|
242
259
|
return *newT;
|
243
260
|
}
|
244
261
|
|
@@ -277,10 +294,10 @@ public:
|
|
277
294
|
SkASSERT(n >= 0);
|
278
295
|
this->checkRealloc(n, kGrowing);
|
279
296
|
T* end = this->end();
|
297
|
+
this->changeSize(fSize + n);
|
280
298
|
for (int i = 0; i < n; ++i) {
|
281
299
|
new (end + i) T(t[i]);
|
282
300
|
}
|
283
|
-
fSize += n;
|
284
301
|
return end;
|
285
302
|
}
|
286
303
|
|
@@ -291,10 +308,10 @@ public:
|
|
291
308
|
SkASSERT(n >= 0);
|
292
309
|
this->checkRealloc(n, kGrowing);
|
293
310
|
T* end = this->end();
|
311
|
+
this->changeSize(fSize + n);
|
294
312
|
for (int i = 0; i < n; ++i) {
|
295
313
|
new (end + i) T(std::move(t[i]));
|
296
314
|
}
|
297
|
-
fSize += n;
|
298
315
|
return end;
|
299
316
|
}
|
300
317
|
|
@@ -303,8 +320,8 @@ public:
|
|
303
320
|
*/
|
304
321
|
void pop_back() {
|
305
322
|
sk_collection_not_empty(this->empty());
|
306
|
-
|
307
|
-
|
323
|
+
fData[fSize - 1].~T();
|
324
|
+
this->changeSize(fSize - 1);
|
308
325
|
}
|
309
326
|
|
310
327
|
/**
|
@@ -317,7 +334,7 @@ public:
|
|
317
334
|
while (i-- > fSize - n) {
|
318
335
|
(*this)[i].~T();
|
319
336
|
}
|
320
|
-
fSize
|
337
|
+
this->changeSize(fSize - n);
|
321
338
|
}
|
322
339
|
|
323
340
|
/**
|
@@ -359,6 +376,25 @@ public:
|
|
359
376
|
}
|
360
377
|
}
|
361
378
|
|
379
|
+
/**
|
380
|
+
* Moves all elements of `that` to the end of this array, leaving `that` empty.
|
381
|
+
* This is a no-op if `that` is empty or equal to this array.
|
382
|
+
*/
|
383
|
+
void move_back(TArray& that) {
|
384
|
+
if (that.empty() || &that == this) {
|
385
|
+
return;
|
386
|
+
}
|
387
|
+
void* dst = this->push_back_raw(that.size());
|
388
|
+
// After move() returns, the contents of `dst` will have either been in-place initialized
|
389
|
+
// using a the move constructor (per-item from `that`'s elements), or will have been
|
390
|
+
// mem-copied into when MEM_MOVE is true (now valid objects).
|
391
|
+
that.move(dst);
|
392
|
+
// All items in `that` have either been destroyed (when MEM_MOVE is false) or should be
|
393
|
+
// considered invalid (when MEM_MOVE is true). Reset fSize to 0 directly to skip any further
|
394
|
+
// per-item destruction.
|
395
|
+
that.changeSize(0);
|
396
|
+
}
|
397
|
+
|
362
398
|
T* begin() {
|
363
399
|
return fData;
|
364
400
|
}
|
@@ -388,13 +424,14 @@ public:
|
|
388
424
|
|
389
425
|
void clear() {
|
390
426
|
this->destroyAll();
|
391
|
-
|
427
|
+
this->changeSize(0);
|
392
428
|
}
|
393
429
|
|
394
430
|
void shrink_to_fit() {
|
395
431
|
if (!fOwnMemory || fSize == fCapacity) {
|
396
432
|
return;
|
397
433
|
}
|
434
|
+
this->unpoison();
|
398
435
|
if (fSize == 0) {
|
399
436
|
sk_free(fData);
|
400
437
|
fData = nullptr;
|
@@ -405,6 +442,7 @@ public:
|
|
405
442
|
if (fOwnMemory) {
|
406
443
|
sk_free(fData);
|
407
444
|
}
|
445
|
+
// Poison is applied in `setDataFromBytes`.
|
408
446
|
this->setDataFromBytes(allocation);
|
409
447
|
}
|
410
448
|
}
|
@@ -493,7 +531,7 @@ protected:
|
|
493
531
|
this->initData(size);
|
494
532
|
} else {
|
495
533
|
this->setDataFromBytes(*storage);
|
496
|
-
|
534
|
+
this->changeSize(size);
|
497
535
|
|
498
536
|
// setDataFromBytes always sets fOwnMemory to true, but we are actually using static
|
499
537
|
// storage here, which shouldn't ever be freed.
|
@@ -505,10 +543,14 @@ protected:
|
|
505
543
|
// will only be used when array shrinks to fit.
|
506
544
|
template <int InitialCapacity>
|
507
545
|
TArray(const T* array, int size, SkAlignedSTStorage<InitialCapacity, T>* storage)
|
508
|
-
|
509
|
-
{
|
546
|
+
: TArray{storage, size} {
|
510
547
|
this->copy(array);
|
511
548
|
}
|
549
|
+
template <int InitialCapacity>
|
550
|
+
TArray(SkSpan<const T> data, SkAlignedSTStorage<InitialCapacity, T>* storage)
|
551
|
+
: TArray{storage, static_cast<int>(data.size())} {
|
552
|
+
this->copy(data.begin());
|
553
|
+
}
|
512
554
|
|
513
555
|
private:
|
514
556
|
// Growth factors for checkRealloc.
|
@@ -533,9 +575,39 @@ private:
|
|
533
575
|
}
|
534
576
|
|
535
577
|
void setData(SkSpan<T> array) {
|
578
|
+
this->unpoison();
|
579
|
+
|
536
580
|
fData = array.data();
|
537
581
|
fCapacity = SkToU32(array.size());
|
538
582
|
fOwnMemory = true;
|
583
|
+
|
584
|
+
this->poison();
|
585
|
+
}
|
586
|
+
|
587
|
+
void unpoison() {
|
588
|
+
#ifdef SK_SANITIZE_ADDRESS
|
589
|
+
if (fData && fPoisoned) {
|
590
|
+
// SkDebugf("UNPOISONING %p : 0 -> %zu\n", fData, Bytes(fCapacity));
|
591
|
+
sk_asan_unpoison_memory_region(this->begin(), Bytes(fCapacity));
|
592
|
+
fPoisoned = false;
|
593
|
+
}
|
594
|
+
#endif
|
595
|
+
}
|
596
|
+
|
597
|
+
void poison() {
|
598
|
+
#ifdef SK_SANITIZE_ADDRESS
|
599
|
+
if (fData && fCapacity > fSize) {
|
600
|
+
// SkDebugf(" POISONING %p : %zu -> %zu\n", fData, Bytes(fSize), Bytes(fCapacity));
|
601
|
+
sk_asan_poison_memory_region(this->end(), Bytes(fCapacity - fSize));
|
602
|
+
fPoisoned = true;
|
603
|
+
}
|
604
|
+
#endif
|
605
|
+
}
|
606
|
+
|
607
|
+
void changeSize(int n) {
|
608
|
+
this->unpoison();
|
609
|
+
fSize = n;
|
610
|
+
this->poison();
|
539
611
|
}
|
540
612
|
|
541
613
|
// We disable Control-Flow Integrity sanitization (go/cfi) when casting item-array buffers.
|
@@ -561,7 +633,7 @@ private:
|
|
561
633
|
|
562
634
|
void initData(int count) {
|
563
635
|
this->setDataFromBytes(Allocate(count));
|
564
|
-
|
636
|
+
this->changeSize(count);
|
565
637
|
}
|
566
638
|
|
567
639
|
void destroyAll() {
|
@@ -617,7 +689,7 @@ private:
|
|
617
689
|
void* push_back_raw(int n) {
|
618
690
|
this->checkRealloc(n, kGrowing);
|
619
691
|
void* ptr = fData + fSize;
|
620
|
-
fSize
|
692
|
+
this->changeSize(fSize + n);
|
621
693
|
return ptr;
|
622
694
|
}
|
623
695
|
|
@@ -672,6 +744,9 @@ private:
|
|
672
744
|
int fSize{0};
|
673
745
|
uint32_t fOwnMemory : 1;
|
674
746
|
uint32_t fCapacity : 31;
|
747
|
+
#ifdef SK_SANITIZE_ADDRESS
|
748
|
+
bool fPoisoned = false;
|
749
|
+
#endif
|
675
750
|
};
|
676
751
|
|
677
752
|
template <typename T, bool M> static inline void swap(TArray<T, M>& a, TArray<T, M>& b) {
|
@@ -679,9 +754,15 @@ template <typename T, bool M> static inline void swap(TArray<T, M>& a, TArray<T,
|
|
679
754
|
}
|
680
755
|
|
681
756
|
// Subclass of TArray that contains a pre-allocated memory block for the array.
|
682
|
-
template <int
|
683
|
-
class STArray : private SkAlignedSTStorage<
|
684
|
-
|
757
|
+
template <int Nreq, typename T, bool MEM_MOVE = sk_is_trivially_relocatable_v<T>>
|
758
|
+
class STArray : private SkAlignedSTStorage<SkContainerAllocator::RoundUp<T>(Nreq), T>,
|
759
|
+
public TArray<T, MEM_MOVE> {
|
760
|
+
// We round up the requested array size to the next capacity multiple.
|
761
|
+
// This space would likely otherwise go to waste.
|
762
|
+
static constexpr int N = SkContainerAllocator::RoundUp<T>(Nreq);
|
763
|
+
static_assert(Nreq > 0);
|
764
|
+
static_assert(N >= Nreq);
|
765
|
+
|
685
766
|
using Storage = SkAlignedSTStorage<N,T>;
|
686
767
|
|
687
768
|
public:
|
@@ -694,6 +775,10 @@ public:
|
|
694
775
|
: Storage{}
|
695
776
|
, TArray<T, MEM_MOVE>{array, count, this} {}
|
696
777
|
|
778
|
+
STArray(SkSpan<const T> data)
|
779
|
+
: Storage{}
|
780
|
+
, TArray<T, MEM_MOVE>{data, this} {}
|
781
|
+
|
697
782
|
STArray(std::initializer_list<T> data)
|
698
783
|
: STArray{data.begin(), SkToInt(data.size())} {}
|
699
784
|
|
@@ -10,7 +10,6 @@
|
|
10
10
|
|
11
11
|
#include "include/private/base/SkDebug.h"
|
12
12
|
|
13
|
-
#include <cstdint>
|
14
13
|
#include <limits>
|
15
14
|
#include <type_traits>
|
16
15
|
|
@@ -88,18 +87,8 @@ typename std::enable_if<(std::is_integral<S>::value || std::is_enum<S>::value) &
|
|
88
87
|
(std::is_signed<Da>::value && std::is_unsigned<Sa>::value && sizeof(Da) <= sizeof(Sa)) ?
|
89
88
|
src <= (S)std::numeric_limits<Da>::max() :
|
90
89
|
|
91
|
-
|
92
|
-
// Correct (simple) version. This trips up MSVC's /RTCc run-time checking.
|
90
|
+
// This trips up MSVC's /RTCc run-time checking, which we don't support.
|
93
91
|
(S)(D)src == src;
|
94
|
-
#else
|
95
|
-
// More complex version that's safe with /RTCc. Used in all debug builds, for coverage.
|
96
|
-
(std::is_signed<Sa>::value) ?
|
97
|
-
(intmax_t)src >= (intmax_t)std::numeric_limits<Da>::min() &&
|
98
|
-
(intmax_t)src <= (intmax_t)std::numeric_limits<Da>::max() :
|
99
|
-
|
100
|
-
// std::is_unsigned<S> ?
|
101
|
-
(uintmax_t)src <= (uintmax_t)std::numeric_limits<Da>::max();
|
102
|
-
#endif
|
103
92
|
}
|
104
93
|
|
105
94
|
#endif
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
#include "include/core/SkRefCnt.h"
|
12
12
|
#include "include/core/SkTypes.h"
|
13
|
-
#include "include/gpu/GrRecordingContext.h"
|
13
|
+
#include "include/gpu/ganesh/GrRecordingContext.h"
|
14
14
|
#include "include/private/base/SkTArray.h"
|
15
15
|
#include "include/private/chromium/GrSurfaceCharacterization.h"
|
16
16
|
|
@@ -13,21 +13,10 @@
|
|
13
13
|
#include "include/private/chromium/GrDeferredDisplayList.h"
|
14
14
|
#include "include/private/chromium/GrSurfaceCharacterization.h"
|
15
15
|
|
16
|
-
class GrBackendFormat;
|
17
16
|
class GrRecordingContext;
|
18
17
|
class GrRenderTargetProxy;
|
19
|
-
class GrYUVABackendTextureInfo;
|
20
18
|
class SkCanvas;
|
21
|
-
class SkColorSpace;
|
22
|
-
class SkImage;
|
23
|
-
class GrPromiseImageTexture;
|
24
19
|
class SkSurface;
|
25
|
-
enum SkAlphaType : int;
|
26
|
-
enum SkColorType : int;
|
27
|
-
enum GrSurfaceOrigin : int;
|
28
|
-
namespace skgpu {
|
29
|
-
enum class Mipmapped : bool;
|
30
|
-
}
|
31
20
|
|
32
21
|
/*
|
33
22
|
* This class is intended to be used as:
|
@@ -57,34 +46,6 @@ public:
|
|
57
46
|
|
58
47
|
sk_sp<GrDeferredDisplayList> detach();
|
59
48
|
|
60
|
-
using PromiseImageTextureContext = void*;
|
61
|
-
using PromiseImageTextureFulfillProc =
|
62
|
-
sk_sp<GrPromiseImageTexture> (*)(PromiseImageTextureContext);
|
63
|
-
using PromiseImageTextureReleaseProc = void (*)(PromiseImageTextureContext);
|
64
|
-
|
65
|
-
#ifndef SK_MAKE_PROMISE_TEXTURE_DISABLE_LEGACY_API
|
66
|
-
/** Deprecated: Use SkImages::PromiseTextureFrom instead. */
|
67
|
-
sk_sp<SkImage> makePromiseTexture(const GrBackendFormat& backendFormat,
|
68
|
-
int width,
|
69
|
-
int height,
|
70
|
-
skgpu::Mipmapped mipmapped,
|
71
|
-
GrSurfaceOrigin origin,
|
72
|
-
SkColorType colorType,
|
73
|
-
SkAlphaType alphaType,
|
74
|
-
sk_sp<SkColorSpace> colorSpace,
|
75
|
-
PromiseImageTextureFulfillProc textureFulfillProc,
|
76
|
-
PromiseImageTextureReleaseProc textureReleaseProc,
|
77
|
-
PromiseImageTextureContext textureContext);
|
78
|
-
|
79
|
-
/** Deprecated: Use SkImages::PromiseTextureFromYUVA instead. */
|
80
|
-
sk_sp<SkImage> makeYUVAPromiseTexture(const GrYUVABackendTextureInfo& yuvaBackendTextureInfo,
|
81
|
-
sk_sp<SkColorSpace> imageColorSpace,
|
82
|
-
PromiseImageTextureFulfillProc textureFulfillProc,
|
83
|
-
PromiseImageTextureReleaseProc textureReleaseProc,
|
84
|
-
PromiseImageTextureContext textureContexts[]);
|
85
|
-
#endif // SK_MAKE_PROMISE_TEXTURE_DISABLE_LEGACY_API
|
86
|
-
|
87
|
-
|
88
49
|
private:
|
89
50
|
GrDeferredDisplayListRecorder(const GrDeferredDisplayListRecorder&) = delete;
|
90
51
|
GrDeferredDisplayListRecorder& operator=(const GrDeferredDisplayListRecorder&) = delete;
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
#include "include/core/SkRefCnt.h"
|
12
12
|
#include "include/core/SkTypes.h"
|
13
|
-
#include "include/gpu/GrBackendSurface.h"
|
13
|
+
#include "include/gpu/ganesh/GrBackendSurface.h"
|
14
14
|
/**
|
15
15
|
* This type is used to fulfill textures for PromiseImages. Once an instance is returned from a
|
16
16
|
* PromiseImageTextureFulfillProc the GrBackendTexture it wraps must remain valid until the
|
@@ -16,9 +16,9 @@
|
|
16
16
|
#include "include/core/SkSurfaceProps.h"
|
17
17
|
#include "include/core/SkTypes.h"
|
18
18
|
#include "include/gpu/GpuTypes.h"
|
19
|
-
#include "include/gpu/GrBackendSurface.h"
|
20
|
-
#include "include/gpu/GrContextThreadSafeProxy.h"
|
21
|
-
#include "include/gpu/GrTypes.h"
|
19
|
+
#include "include/gpu/ganesh/GrBackendSurface.h"
|
20
|
+
#include "include/gpu/ganesh/GrContextThreadSafeProxy.h"
|
21
|
+
#include "include/gpu/ganesh/GrTypes.h"
|
22
22
|
#include "include/private/base/SkDebug.h"
|
23
23
|
|
24
24
|
#include <cstddef>
|
@@ -24,7 +24,6 @@ class SkStrikeCache;
|
|
24
24
|
class SkStrikeClientImpl;
|
25
25
|
class SkStrikeServerImpl;
|
26
26
|
class SkSurfaceProps;
|
27
|
-
struct SkDeserialProcs;
|
28
27
|
namespace sktext::gpu { class Slug; }
|
29
28
|
|
30
29
|
using SkDiscardableHandleId = uint32_t;
|
@@ -143,9 +142,7 @@ public:
|
|
143
142
|
|
144
143
|
// Given a buffer, unflatten into a slug making sure to do the typefaceID translation from
|
145
144
|
// renderer to GPU. Returns nullptr if there was a problem.
|
146
|
-
sk_sp<sktext::gpu::Slug> deserializeSlugForTest(const void* data,
|
147
|
-
size_t size,
|
148
|
-
const SkDeserialProcs&) const;
|
145
|
+
sk_sp<sktext::gpu::Slug> deserializeSlugForTest(const void* data, size_t size) const;
|
149
146
|
|
150
147
|
private:
|
151
148
|
std::unique_ptr<SkStrikeClientImpl> fImpl;
|
@@ -10,7 +10,6 @@
|
|
10
10
|
|
11
11
|
#include "include/core/SkRect.h"
|
12
12
|
#include "include/core/SkRefCnt.h"
|
13
|
-
#include "include/core/SkSerialProcs.h" // IWYU pragma: keep
|
14
13
|
#include "include/private/base/SkAPI.h"
|
15
14
|
|
16
15
|
#include <cstddef>
|
@@ -23,6 +22,7 @@ class SkReadBuffer;
|
|
23
22
|
class SkStrikeClient;
|
24
23
|
class SkTextBlob;
|
25
24
|
class SkWriteBuffer;
|
25
|
+
struct SkDeserialProcs;
|
26
26
|
struct SkPoint;
|
27
27
|
|
28
28
|
namespace sktext::gpu {
|
@@ -38,31 +38,25 @@ public:
|
|
38
38
|
SkCanvas* canvas, const SkTextBlob& blob, SkPoint origin, const SkPaint& paint);
|
39
39
|
|
40
40
|
// Serialize the slug.
|
41
|
-
sk_sp<SkData> serialize(
|
42
|
-
size_t serialize(void* buffer, size_t size
|
41
|
+
sk_sp<SkData> serialize() const;
|
42
|
+
size_t serialize(void* buffer, size_t size) const;
|
43
43
|
|
44
44
|
// Set the client parameter to the appropriate SkStrikeClient when typeface ID translation
|
45
45
|
// is needed.
|
46
46
|
static sk_sp<Slug> Deserialize(const void* data,
|
47
47
|
size_t size,
|
48
|
-
const SkStrikeClient* client = nullptr
|
49
|
-
const SkDeserialProcs& procs = {});
|
48
|
+
const SkStrikeClient* client = nullptr);
|
50
49
|
static sk_sp<Slug> MakeFromBuffer(SkReadBuffer& buffer);
|
51
50
|
|
52
51
|
// Allows clients to deserialize SkPictures that contain slug data
|
53
52
|
static void AddDeserialProcs(SkDeserialProcs* procs, const SkStrikeClient* client = nullptr);
|
54
53
|
|
55
54
|
// Draw the Slug obeying the canvas's mapping and clipping.
|
56
|
-
void draw(SkCanvas* canvas) const;
|
55
|
+
void draw(SkCanvas* canvas, const SkPaint& paint) const;
|
57
56
|
|
58
57
|
virtual SkRect sourceBounds() const = 0;
|
59
58
|
virtual SkRect sourceBoundsWithOrigin () const = 0;
|
60
59
|
|
61
|
-
// The paint passed into ConvertBlob; this paint is used instead of the paint resulting from
|
62
|
-
// the call to aboutToDraw because when we call draw(), the initial paint is needed to call
|
63
|
-
// aboutToDraw again to get the layer right.
|
64
|
-
virtual const SkPaint& initialPaint() const = 0;
|
65
|
-
|
66
60
|
virtual void doFlatten(SkWriteBuffer&) const = 0;
|
67
61
|
|
68
62
|
uint32_t uniqueID() const { return fUniqueID; }
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
#include <dxgiformat.h>
|
16
16
|
|
17
|
-
#include "include/gpu/GrTypes.h"
|
17
|
+
#include "include/gpu/ganesh/GrTypes.h"
|
18
18
|
|
19
19
|
struct ID3D12Resource;
|
20
20
|
class GrD3DResourceState;
|
@@ -48,7 +48,7 @@ struct GrD3DBackendSurfaceInfo {
|
|
48
48
|
GrD3DTextureResourceInfo snapTextureResourceInfo() const;
|
49
49
|
|
50
50
|
bool isProtected() const;
|
51
|
-
#if defined(
|
51
|
+
#if defined(GPU_TEST_UTILS)
|
52
52
|
bool operator==(const GrD3DBackendSurfaceInfo& that) const;
|
53
53
|
#endif
|
54
54
|
|