@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
@@ -233,11 +233,11 @@ public:
|
|
233
233
|
* @param tmy The tiling mode to use when sampling in the y-direction.
|
234
234
|
* @param mode How to filter the tiles
|
235
235
|
* @param localMatrix Optional matrix used when sampling
|
236
|
-
* @param
|
237
|
-
*
|
238
|
-
*
|
239
|
-
*
|
240
|
-
*
|
236
|
+
* @param tileRect The tile rectangle in picture coordinates: this represents the subset
|
237
|
+
* (or superset) of the picture used when building a tile. It is not
|
238
|
+
* affected by localMatrix and does not imply scaling (only translation
|
239
|
+
* and cropping). If null, the tile rect is considered equal to the picture
|
240
|
+
* bounds.
|
241
241
|
* @return Returns a new shader object. Note: this function never returns null.
|
242
242
|
*/
|
243
243
|
sk_sp<SkShader> makeShader(SkTileMode tmx, SkTileMode tmy, SkFilterMode mode,
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
#include "include/core/SkScalar.h"
|
12
12
|
#include "include/private/base/SkAPI.h"
|
13
|
-
#include "include/private/base/
|
13
|
+
#include "include/private/base/SkFloatingPoint.h"
|
14
14
|
|
15
15
|
struct SK_API SkPoint3 {
|
16
16
|
SkScalar fX, fY, fZ;
|
@@ -114,17 +114,7 @@ struct SK_API SkPoint3 {
|
|
114
114
|
@return true for values other than infinities and NaN
|
115
115
|
*/
|
116
116
|
bool isFinite() const {
|
117
|
-
|
118
|
-
accum *= fX;
|
119
|
-
accum *= fY;
|
120
|
-
accum *= fZ;
|
121
|
-
|
122
|
-
// accum is either NaN or it is finite (zero).
|
123
|
-
SkASSERT(0 == accum || SkScalarIsNaN(accum));
|
124
|
-
|
125
|
-
// value==value will be true iff value is not NaN
|
126
|
-
// TODO: is it faster to say !accum or accum==accum?
|
127
|
-
return !SkScalarIsNaN(accum);
|
117
|
+
return SkIsFinite(fX, fY, fZ);
|
128
118
|
}
|
129
119
|
|
130
120
|
/** Returns the dot product of a and b, treating them as 3D vectors
|
@@ -11,6 +11,7 @@
|
|
11
11
|
#include "include/core/SkPoint.h"
|
12
12
|
#include "include/core/SkRect.h"
|
13
13
|
#include "include/core/SkScalar.h"
|
14
|
+
#include "include/core/SkSpan.h"
|
14
15
|
#include "include/core/SkTypes.h"
|
15
16
|
|
16
17
|
#include <cstdint>
|
@@ -269,6 +270,10 @@ public:
|
|
269
270
|
@return x-axis and y-axis radii for one corner
|
270
271
|
*/
|
271
272
|
SkVector radii(Corner corner) const { return fRadii[corner]; }
|
273
|
+
/**
|
274
|
+
* Returns the corner radii for all four corners, in the same order as `Corner`.
|
275
|
+
*/
|
276
|
+
SkSpan<const SkVector> radii() const { return SkSpan(fRadii, 4); }
|
272
277
|
|
273
278
|
/** Returns bounds. Bounds may have zero width or zero height. Bounds right is
|
274
279
|
greater than or equal to left; bounds bottom is greater than or equal to top.
|
@@ -709,18 +709,7 @@ struct SK_API SkRect {
|
|
709
709
|
@return true if no member is infinite or NaN
|
710
710
|
*/
|
711
711
|
bool isFinite() const {
|
712
|
-
|
713
|
-
accum *= fLeft;
|
714
|
-
accum *= fTop;
|
715
|
-
accum *= fRight;
|
716
|
-
accum *= fBottom;
|
717
|
-
|
718
|
-
// accum is either NaN or it is finite (zero).
|
719
|
-
SkASSERT(0 == accum || std::isnan(accum));
|
720
|
-
|
721
|
-
// value==value will be true iff value is not NaN
|
722
|
-
// TODO: is it faster to say !accum or accum==accum?
|
723
|
-
return !std::isnan(accum);
|
712
|
+
return SkIsFinite(fLeft, fTop, fRight, fBottom);
|
724
713
|
}
|
725
714
|
|
726
715
|
/** Returns left edge of SkRect, if sorted. Call isSorted() to see if SkRect is valid.
|
@@ -1257,14 +1246,14 @@ public:
|
|
1257
1246
|
|
1258
1247
|
/** Sets SkRect by discarding the fractional portion of fLeft and fTop; and rounding
|
1259
1248
|
up fRight and fBottom, using
|
1260
|
-
(
|
1261
|
-
|
1249
|
+
(std::floor(fLeft), std::floor(fTop),
|
1250
|
+
std::ceil(fRight), std::ceil(fBottom)).
|
1262
1251
|
|
1263
1252
|
@param dst storage for SkRect
|
1264
1253
|
*/
|
1265
1254
|
void roundOut(SkRect* dst) const {
|
1266
|
-
dst->setLTRB(
|
1267
|
-
|
1255
|
+
dst->setLTRB(std::floor(fLeft), std::floor(fTop),
|
1256
|
+
std::ceil(fRight), std::ceil(fBottom));
|
1268
1257
|
}
|
1269
1258
|
|
1270
1259
|
/** Sets SkRect by rounding up fLeft and fTop; and discarding the fractional portion
|
@@ -367,6 +367,8 @@ auto operator<<(std::basic_ostream<C, CT>& os, const sk_sp<T>& sp) -> decltype(o
|
|
367
367
|
return os << sp.get();
|
368
368
|
}
|
369
369
|
|
370
|
+
template <typename T> sk_sp(T*) -> sk_sp<T>;
|
371
|
+
|
370
372
|
template <typename T, typename... Args>
|
371
373
|
sk_sp<T> sk_make_sp(Args&&... args) {
|
372
374
|
return sk_sp<T>(new T(std::forward<Args>(args)...));
|
@@ -11,6 +11,8 @@
|
|
11
11
|
#include "include/private/base/SkAssert.h"
|
12
12
|
#include "include/private/base/SkFloatingPoint.h"
|
13
13
|
|
14
|
+
#include <cmath>
|
15
|
+
|
14
16
|
typedef float SkScalar;
|
15
17
|
|
16
18
|
#define SK_Scalar1 1.0f
|
@@ -25,30 +27,30 @@ typedef float SkScalar;
|
|
25
27
|
#define SK_ScalarNegativeInfinity SK_FloatNegativeInfinity
|
26
28
|
#define SK_ScalarNaN SK_FloatNaN
|
27
29
|
|
28
|
-
#define SkScalarFloorToScalar(x)
|
29
|
-
#define SkScalarCeilToScalar(x)
|
30
|
+
#define SkScalarFloorToScalar(x) std::floor(x)
|
31
|
+
#define SkScalarCeilToScalar(x) std::ceil(x)
|
30
32
|
#define SkScalarRoundToScalar(x) sk_float_round(x)
|
31
|
-
#define SkScalarTruncToScalar(x)
|
33
|
+
#define SkScalarTruncToScalar(x) std::trunc(x)
|
32
34
|
|
33
35
|
#define SkScalarFloorToInt(x) sk_float_floor2int(x)
|
34
36
|
#define SkScalarCeilToInt(x) sk_float_ceil2int(x)
|
35
37
|
#define SkScalarRoundToInt(x) sk_float_round2int(x)
|
36
38
|
|
37
|
-
#define SkScalarAbs(x)
|
38
|
-
#define SkScalarCopySign(x, y)
|
39
|
-
#define SkScalarMod(x, y)
|
40
|
-
#define SkScalarSqrt(x)
|
41
|
-
#define SkScalarPow(b, e)
|
42
|
-
|
43
|
-
#define SkScalarSin(radians) (float)
|
44
|
-
#define SkScalarCos(radians) (float)
|
45
|
-
#define SkScalarTan(radians) (float)
|
46
|
-
#define SkScalarASin(val) (float)
|
47
|
-
#define SkScalarACos(val) (float)
|
48
|
-
#define SkScalarATan2(y, x) (float)
|
49
|
-
#define SkScalarExp(x) (float)
|
50
|
-
#define SkScalarLog(x) (float)
|
51
|
-
#define SkScalarLog2(x) (float)
|
39
|
+
#define SkScalarAbs(x) std::fabs(x)
|
40
|
+
#define SkScalarCopySign(x, y) std::copysign(x, y)
|
41
|
+
#define SkScalarMod(x, y) std::fmod(x,y)
|
42
|
+
#define SkScalarSqrt(x) std::sqrt(x)
|
43
|
+
#define SkScalarPow(b, e) std::pow(b, e)
|
44
|
+
|
45
|
+
#define SkScalarSin(radians) ((float)std::sin(radians))
|
46
|
+
#define SkScalarCos(radians) ((float)std::cos(radians))
|
47
|
+
#define SkScalarTan(radians) ((float)std::tan(radians))
|
48
|
+
#define SkScalarASin(val) ((float)std::asin(val))
|
49
|
+
#define SkScalarACos(val) ((float)std::acos(val))
|
50
|
+
#define SkScalarATan2(y, x) ((float)std::atan2(y,x))
|
51
|
+
#define SkScalarExp(x) ((float)std::exp(x))
|
52
|
+
#define SkScalarLog(x) ((float)std::log(x))
|
53
|
+
#define SkScalarLog2(x) ((float)std::log2(x))
|
52
54
|
|
53
55
|
//////////////////////////////////////////////////////////////////////////////////////////////////
|
54
56
|
|
@@ -61,20 +63,6 @@ typedef float SkScalar;
|
|
61
63
|
#define SkScalarToDouble(x) static_cast<double>(x)
|
62
64
|
#define SkDoubleToScalar(x) sk_double_to_float(x)
|
63
65
|
|
64
|
-
static inline bool SkScalarIsNaN(SkScalar x) { return x != x; }
|
65
|
-
|
66
|
-
/** Returns true if x is not NaN and not infinite
|
67
|
-
*/
|
68
|
-
static inline bool SkScalarIsFinite(SkScalar x) { return sk_float_isfinite(x); }
|
69
|
-
|
70
|
-
static inline bool SkScalarsAreFinite(SkScalar a, SkScalar b) {
|
71
|
-
return sk_floats_are_finite(a, b);
|
72
|
-
}
|
73
|
-
|
74
|
-
static inline bool SkScalarsAreFinite(const SkScalar array[], int count) {
|
75
|
-
return sk_floats_are_finite(array, count);
|
76
|
-
}
|
77
|
-
|
78
66
|
/** Returns the fractional part of the scalar. */
|
79
67
|
static inline SkScalar SkScalarFraction(SkScalar x) {
|
80
68
|
return x - SkScalarTruncToScalar(x);
|
@@ -21,6 +21,7 @@ class SkMatrix;
|
|
21
21
|
enum class SkBlendMode;
|
22
22
|
enum class SkTileMode;
|
23
23
|
struct SkRect;
|
24
|
+
struct SkSamplingOptions;
|
24
25
|
|
25
26
|
/** \class SkShader
|
26
27
|
*
|
@@ -90,6 +91,22 @@ SK_API sk_sp<SkShader> Color(const SkColor4f&, sk_sp<SkColorSpace>);
|
|
90
91
|
SK_API sk_sp<SkShader> Blend(SkBlendMode mode, sk_sp<SkShader> dst, sk_sp<SkShader> src);
|
91
92
|
SK_API sk_sp<SkShader> Blend(sk_sp<SkBlender>, sk_sp<SkShader> dst, sk_sp<SkShader> src);
|
92
93
|
SK_API sk_sp<SkShader> CoordClamp(sk_sp<SkShader>, const SkRect& subset);
|
94
|
+
|
95
|
+
/*
|
96
|
+
* Create an SkShader that will sample the 'image'. This is equivalent to SkImage::makeShader.
|
97
|
+
*/
|
98
|
+
SK_API sk_sp<SkShader> Image(sk_sp<SkImage> image,
|
99
|
+
SkTileMode tmx, SkTileMode tmy,
|
100
|
+
const SkSamplingOptions& options,
|
101
|
+
const SkMatrix* localMatrix = nullptr);
|
102
|
+
/*
|
103
|
+
* Create an SkShader that will sample 'image' with minimal processing. This is equivalent to
|
104
|
+
* SkImage::makeRawShader.
|
105
|
+
*/
|
106
|
+
SK_API sk_sp<SkShader> RawImage(sk_sp<SkImage> image,
|
107
|
+
SkTileMode tmx, SkTileMode tmy,
|
108
|
+
const SkSamplingOptions& options,
|
109
|
+
const SkMatrix* localMatrix = nullptr);
|
93
110
|
}
|
94
111
|
|
95
112
|
#endif
|
@@ -9,6 +9,7 @@
|
|
9
9
|
#define SkSize_DEFINED
|
10
10
|
|
11
11
|
#include "include/core/SkScalar.h"
|
12
|
+
#include "include/private/base/SkTo.h"
|
12
13
|
|
13
14
|
#include <cstdint>
|
14
15
|
|
@@ -35,7 +36,7 @@ struct SkISize {
|
|
35
36
|
constexpr int32_t width() const { return fWidth; }
|
36
37
|
constexpr int32_t height() const { return fHeight; }
|
37
38
|
|
38
|
-
constexpr int64_t area() const { return fWidth * fHeight; }
|
39
|
+
constexpr int64_t area() const { return SkToS64(fWidth) * SkToS64(fHeight); }
|
39
40
|
|
40
41
|
bool equals(int32_t w, int32_t h) const { return fWidth == w && fHeight == h; }
|
41
42
|
};
|
@@ -138,8 +138,8 @@ public:
|
|
138
138
|
|
139
139
|
//SkStreamMemory
|
140
140
|
/** Returns the starting address for the data. If this cannot be done, returns NULL. */
|
141
|
-
//TODO: replace with virtual const SkData* getData()
|
142
141
|
virtual const void* getMemoryBase() { return nullptr; }
|
142
|
+
virtual sk_sp<SkData> getData() const { return nullptr; }
|
143
143
|
|
144
144
|
private:
|
145
145
|
virtual SkStream* onDuplicate() const { return nullptr; }
|
@@ -392,10 +392,9 @@ public:
|
|
392
392
|
*/
|
393
393
|
void setMemoryOwned(const void* data, size_t length);
|
394
394
|
|
395
|
-
sk_sp<SkData>
|
395
|
+
sk_sp<SkData> getData() const override { return fData; }
|
396
396
|
void setData(sk_sp<SkData> data);
|
397
397
|
|
398
|
-
void skipToAlign4();
|
399
398
|
const void* getAtPos();
|
400
399
|
|
401
400
|
size_t read(void* buffer, size_t size) override;
|
@@ -9,8 +9,13 @@
|
|
9
9
|
#define SkStrokeRec_DEFINED
|
10
10
|
|
11
11
|
#include "include/core/SkPaint.h"
|
12
|
+
#include "include/core/SkScalar.h"
|
13
|
+
#include "include/core/SkTypes.h"
|
12
14
|
#include "include/private/base/SkMacros.h"
|
13
15
|
|
16
|
+
#include <cmath>
|
17
|
+
#include <cstdint>
|
18
|
+
|
14
19
|
class SkPath;
|
15
20
|
|
16
21
|
SK_BEGIN_REQUIRE_DENSE
|
@@ -68,7 +73,7 @@ public:
|
|
68
73
|
}
|
69
74
|
|
70
75
|
void setResScale(SkScalar rs) {
|
71
|
-
SkASSERT(rs > 0 &&
|
76
|
+
SkASSERT(rs > 0 && std::isfinite(rs));
|
72
77
|
fResScale = rs;
|
73
78
|
}
|
74
79
|
|
@@ -370,7 +370,9 @@ public:
|
|
370
370
|
Copies each readable pixel intersecting both rectangles, without scaling,
|
371
371
|
converting to dst.colorType() and dst.alphaType() if required.
|
372
372
|
|
373
|
-
Pixels are readable when SkSurface is raster, or backed by a GPU.
|
373
|
+
Pixels are readable when SkSurface is raster, or backed by a Ganesh GPU backend. Graphite
|
374
|
+
has deprecated this API in favor of the equivalent asynchronous API on
|
375
|
+
skgpu::graphite::Context (with an optional explicit synchonization).
|
374
376
|
|
375
377
|
The destination pixel storage must be allocated by the caller.
|
376
378
|
|
@@ -401,7 +403,9 @@ public:
|
|
401
403
|
Copies each readable pixel intersecting both rectangles, without scaling,
|
402
404
|
converting to dstInfo.colorType() and dstInfo.alphaType() if required.
|
403
405
|
|
404
|
-
Pixels are readable when SkSurface is raster, or backed by a GPU.
|
406
|
+
Pixels are readable when SkSurface is raster, or backed by a Ganesh GPU backend. Graphite
|
407
|
+
has deprecated this API in favor of the equivalent asynchronous API on
|
408
|
+
skgpu::graphite::Context (with an optional explicit synchonization).
|
405
409
|
|
406
410
|
The destination pixel storage must be allocated by the caller.
|
407
411
|
|
@@ -433,7 +437,9 @@ public:
|
|
433
437
|
Copies each readable pixel intersecting both rectangles, without scaling,
|
434
438
|
converting to bitmap.colorType() and bitmap.alphaType() if required.
|
435
439
|
|
436
|
-
Pixels are readable when SkSurface is raster, or backed by a GPU.
|
440
|
+
Pixels are readable when SkSurface is raster, or backed by a Ganesh GPU backend. Graphite
|
441
|
+
has deprecated this API in favor of the equivalent asynchronous API on
|
442
|
+
skgpu::graphite::Context (with an optional explicit synchonization).
|
437
443
|
|
438
444
|
The destination pixel storage must be allocated by the caller.
|
439
445
|
|
@@ -477,10 +483,13 @@ public:
|
|
477
483
|
/** Makes surface pixel data available to caller, possibly asynchronously. It can also rescale
|
478
484
|
the surface pixels.
|
479
485
|
|
480
|
-
Currently asynchronous reads are only supported
|
486
|
+
Currently asynchronous reads are only supported in the Ganesh GPU backend and only when the
|
481
487
|
underlying 3D API supports transfer buffers and CPU/GPU synchronization primitives. In all
|
482
488
|
other cases this operates synchronously.
|
483
489
|
|
490
|
+
For the Graphite backend this API has been deprecated in favor of the equivalent API
|
491
|
+
on skgpu::graphite::Context.
|
492
|
+
|
484
493
|
Data is read from the source sub-rectangle, is optionally converted to a linear gamma, is
|
485
494
|
rescaled to the size indicated by 'info', is then converted to the color space, color type,
|
486
495
|
and alpha type of 'info'. A 'srcRect' that is not contained by the bounds of the surface
|
@@ -76,6 +76,11 @@ public:
|
|
76
76
|
return SkSurfaceProps(fFlags, newPixelGeometry, fTextContrast, fTextGamma);
|
77
77
|
}
|
78
78
|
|
79
|
+
static constexpr SkScalar kMaxContrastInclusive = 1;
|
80
|
+
static constexpr SkScalar kMinContrastInclusive = 0;
|
81
|
+
static constexpr SkScalar kMaxGammaExclusive = 4;
|
82
|
+
static constexpr SkScalar kMinGammaInclusive = 0;
|
83
|
+
|
79
84
|
uint32_t flags() const { return fFlags; }
|
80
85
|
SkPixelGeometry pixelGeometry() const { return fPixelGeometry; }
|
81
86
|
SkScalar textContrast() const { return fTextContrast; }
|
@@ -11,6 +11,7 @@
|
|
11
11
|
#include "include/core/SkFontArguments.h"
|
12
12
|
#include "include/core/SkFontParameters.h"
|
13
13
|
#include "include/core/SkFontStyle.h"
|
14
|
+
#include "include/core/SkFourByteTag.h"
|
14
15
|
#include "include/core/SkRect.h"
|
15
16
|
#include "include/core/SkRefCnt.h"
|
16
17
|
#include "include/core/SkString.h"
|
@@ -23,7 +23,6 @@
|
|
23
23
|
#include "include/private/base/SkDebug.h"
|
24
24
|
// IWYU pragma: end_exports
|
25
25
|
|
26
|
-
#include <climits>
|
27
26
|
#include <cstdint>
|
28
27
|
|
29
28
|
#if !defined(SK_GANESH) && !defined(SK_GRAPHITE)
|
@@ -154,7 +153,7 @@
|
|
154
153
|
#endif
|
155
154
|
|
156
155
|
#if !defined(GR_GPU_STATS)
|
157
|
-
#if defined(SK_DEBUG) || defined(SK_DUMP_STATS) || defined(
|
156
|
+
#if defined(SK_DEBUG) || defined(SK_DUMP_STATS) || defined(GPU_TEST_UTILS)
|
158
157
|
#define GR_GPU_STATS 1
|
159
158
|
#else
|
160
159
|
#define GR_GPU_STATS 0
|
@@ -163,13 +162,6 @@
|
|
163
162
|
|
164
163
|
////////////////////////////////////////////////////////////////////////////////
|
165
164
|
|
166
|
-
typedef uint32_t SkFourByteTag;
|
167
|
-
static inline constexpr SkFourByteTag SkSetFourByteTag(char a, char b, char c, char d) {
|
168
|
-
return (((uint32_t)a << 24) | ((uint32_t)b << 16) | ((uint32_t)c << 8) | (uint32_t)d);
|
169
|
-
}
|
170
|
-
|
171
|
-
////////////////////////////////////////////////////////////////////////////////
|
172
|
-
|
173
165
|
/** 32 bit integer to hold a unicode value
|
174
166
|
*/
|
175
167
|
typedef int32_t SkUnichar;
|
@@ -178,15 +170,6 @@ typedef int32_t SkUnichar;
|
|
178
170
|
*/
|
179
171
|
typedef uint16_t SkGlyphID;
|
180
172
|
|
181
|
-
/** 32 bit value to hold a millisecond duration
|
182
|
-
Note that SK_MSecMax is about 25 days.
|
183
|
-
*/
|
184
|
-
typedef uint32_t SkMSec;
|
185
|
-
|
186
|
-
/** Maximum representable milliseconds; 24d 20h 31m 23.647s.
|
187
|
-
*/
|
188
|
-
static constexpr SkMSec SK_MSecMax = INT32_MAX;
|
189
|
-
|
190
173
|
/** The generation IDs in Skia reserve 0 has an invalid marker.
|
191
174
|
*/
|
192
175
|
static constexpr uint32_t SK_InvalidGenID = 0;
|
@@ -195,5 +178,4 @@ static constexpr uint32_t SK_InvalidGenID = 0;
|
|
195
178
|
*/
|
196
179
|
static constexpr uint32_t SK_InvalidUniqueID = 0;
|
197
180
|
|
198
|
-
|
199
181
|
#endif
|
@@ -5,15 +5,14 @@
|
|
5
5
|
* Use of this source code is governed by a BSD-style license that can be
|
6
6
|
* found in the LICENSE file.
|
7
7
|
*/
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
8
|
#ifndef SkUnPreMultiply_DEFINED
|
14
9
|
#define SkUnPreMultiply_DEFINED
|
15
10
|
|
16
11
|
#include "include/core/SkColor.h"
|
12
|
+
#include "include/core/SkTypes.h"
|
13
|
+
#include "include/private/base/SkCPUTypes.h"
|
14
|
+
|
15
|
+
#include <cstdint>
|
17
16
|
|
18
17
|
class SK_API SkUnPreMultiply {
|
19
18
|
public:
|
@@ -9,13 +9,15 @@
|
|
9
9
|
#define SkVertices_DEFINED
|
10
10
|
|
11
11
|
#include "include/core/SkColor.h"
|
12
|
+
#include "include/core/SkPoint.h"
|
12
13
|
#include "include/core/SkRect.h"
|
13
14
|
#include "include/core/SkRefCnt.h"
|
15
|
+
#include "include/private/base/SkAPI.h"
|
14
16
|
|
17
|
+
#include <cstddef>
|
18
|
+
#include <cstdint>
|
15
19
|
#include <memory>
|
16
20
|
|
17
|
-
class SkData;
|
18
|
-
struct SkPoint;
|
19
21
|
class SkVerticesPriv;
|
20
22
|
|
21
23
|
/**
|
@@ -4,22 +4,25 @@
|
|
4
4
|
#define SkPDFDocument_DEFINED
|
5
5
|
|
6
6
|
#include "include/core/SkDocument.h"
|
7
|
-
|
8
|
-
#include <vector>
|
9
|
-
|
10
|
-
#include "include/core/SkColor.h"
|
11
7
|
#include "include/core/SkMilestone.h"
|
8
|
+
#include "include/core/SkRefCnt.h"
|
12
9
|
#include "include/core/SkScalar.h"
|
13
10
|
#include "include/core/SkString.h"
|
11
|
+
#include "include/private/base/SkAPI.h"
|
14
12
|
#include "include/private/base/SkNoncopyable.h"
|
15
|
-
#include "src/base/SkTime.h"
|
16
13
|
|
17
|
-
#
|
18
|
-
#
|
14
|
+
#include <cstdint>
|
15
|
+
#include <memory>
|
16
|
+
#include <vector>
|
19
17
|
|
18
|
+
class SkCanvas;
|
20
19
|
class SkExecutor;
|
21
20
|
class SkPDFArray;
|
22
21
|
class SkPDFTagTree;
|
22
|
+
class SkWStream;
|
23
|
+
|
24
|
+
#define SKPDF_STRING(X) SKPDF_STRING_IMPL(X)
|
25
|
+
#define SKPDF_STRING_IMPL(X) #X
|
23
26
|
|
24
27
|
namespace SkPDF {
|
25
28
|
|
@@ -179,15 +182,9 @@ struct Metadata {
|
|
179
182
|
HighButSlow = 9,
|
180
183
|
} fCompressionLevel = CompressionLevel::Default;
|
181
184
|
|
182
|
-
/** Preferred Subsetter.
|
183
|
-
|
184
|
-
The Sfntly subsetter is deprecated.
|
185
|
-
|
186
|
-
Experimental.
|
187
|
-
*/
|
185
|
+
/** Preferred Subsetter. */
|
188
186
|
enum Subsetter {
|
189
187
|
kHarfbuzz_Subsetter,
|
190
|
-
kSfntly_Subsetter,
|
191
188
|
} fSubsetter = kHarfbuzz_Subsetter;
|
192
189
|
};
|
193
190
|
|
@@ -37,16 +37,16 @@ struct SkHighContrastConfig {
|
|
37
37
|
SkHighContrastConfig(bool grayscale,
|
38
38
|
InvertStyle invertStyle,
|
39
39
|
SkScalar contrast)
|
40
|
-
: fGrayscale(grayscale)
|
41
|
-
|
42
|
-
|
40
|
+
: fGrayscale(grayscale)
|
41
|
+
, fInvertStyle(invertStyle)
|
42
|
+
, fContrast(contrast) {}
|
43
43
|
|
44
44
|
// Returns true if all of the fields are set within the valid range.
|
45
45
|
bool isValid() const {
|
46
46
|
return fInvertStyle >= InvertStyle::kNoInvert &&
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
fInvertStyle <= InvertStyle::kInvertLightness &&
|
48
|
+
fContrast >= -1.0 &&
|
49
|
+
fContrast <= 1.0;
|
50
50
|
}
|
51
51
|
|
52
52
|
// If true, the color will be converted to grayscale.
|