@shopify/react-native-skia 0.1.192 → 0.1.193
Sign up to get free protection for your applications and to get access to all the features.
- package/android/CMakeLists.txt +1 -1
- package/android/build.gradle +1 -0
- package/android/cpp/jni/JniPlatformContext.cpp +1 -1
- package/cpp/api/JsiSkImage.h +25 -4
- package/cpp/api/JsiSkImageFactory.h +2 -2
- package/cpp/api/JsiSkPath.h +8 -6
- package/cpp/rnskia/dom/base/Declaration.h +5 -7
- package/cpp/rnskia/dom/nodes/JsiBlurMaskNode.h +1 -0
- package/cpp/rnskia/dom/nodes/JsiPathNode.h +2 -2
- package/cpp/rnskia/dom/props/BoxShadowProps.h +2 -0
- package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +2 -8
- package/cpp/skia/include/android/SkImageAndroid.h +101 -0
- package/cpp/skia/include/codec/SkAndroidCodec.h +26 -8
- package/cpp/skia/include/codec/SkCodec.h +31 -17
- package/cpp/skia/include/codec/SkEncodedImageFormat.h +36 -0
- package/cpp/skia/include/codec/SkPixmapUtils.h +31 -0
- package/cpp/skia/include/config/SkUserConfig.h +61 -29
- package/cpp/skia/include/core/SkBitmap.h +25 -25
- package/cpp/skia/include/core/SkBlurTypes.h +0 -2
- package/cpp/skia/include/core/SkCanvas.h +32 -15
- package/cpp/skia/include/core/SkCapabilities.h +2 -2
- package/cpp/skia/include/core/SkColor.h +2 -0
- package/cpp/skia/include/core/SkColorPriv.h +19 -4
- package/cpp/skia/include/core/SkColorSpace.h +14 -17
- package/cpp/skia/include/core/SkColorType.h +1 -0
- package/cpp/skia/include/core/SkContourMeasure.h +1 -1
- package/cpp/skia/include/core/SkCoverageMode.h +0 -2
- package/cpp/skia/include/core/SkCubicMap.h +2 -0
- package/cpp/skia/include/core/SkData.h +5 -2
- package/cpp/skia/include/core/SkDataTable.h +6 -2
- package/cpp/skia/include/core/SkDeferredDisplayList.h +11 -10
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +9 -8
- package/cpp/skia/include/core/SkDrawable.h +10 -2
- package/cpp/skia/include/core/SkEncodedImageFormat.h +3 -30
- package/cpp/skia/include/core/SkFlattenable.h +4 -2
- package/cpp/skia/include/core/SkFont.h +1 -0
- package/cpp/skia/include/core/SkFontMetrics.h +1 -0
- package/cpp/skia/include/core/SkFontMgr.h +20 -29
- package/cpp/skia/include/core/SkFontStyle.h +4 -1
- package/cpp/skia/include/core/SkGraphics.h +21 -18
- package/cpp/skia/include/core/SkICC.h +3 -13
- package/cpp/skia/include/core/SkImage.h +395 -717
- package/cpp/skia/include/core/SkImageGenerator.h +19 -74
- package/cpp/skia/include/core/SkImageInfo.h +7 -5
- package/cpp/skia/include/core/SkM44.h +11 -0
- package/cpp/skia/include/core/SkMaskFilter.h +6 -3
- package/cpp/skia/include/core/SkMatrix.h +14 -4
- package/cpp/skia/include/core/SkMesh.h +52 -18
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkPaint.h +11 -34
- package/cpp/skia/include/core/SkPath.h +23 -4
- package/cpp/skia/include/core/SkPathBuilder.h +13 -5
- package/cpp/skia/include/core/SkPathMeasure.h +1 -1
- package/cpp/skia/include/core/SkPathTypes.h +0 -2
- package/cpp/skia/include/core/SkPathUtils.h +42 -0
- package/cpp/skia/include/core/SkPicture.h +3 -2
- package/cpp/skia/include/core/SkPictureRecorder.h +2 -0
- package/cpp/skia/include/core/SkPixelRef.h +4 -8
- package/cpp/skia/include/core/SkPixmap.h +12 -20
- package/cpp/skia/include/core/SkPoint.h +4 -2
- package/cpp/skia/include/core/SkPromiseImageTexture.h +2 -2
- package/cpp/skia/include/core/SkRRect.h +5 -1
- package/cpp/skia/include/core/SkRect.h +6 -3
- package/cpp/skia/include/core/SkRefCnt.h +9 -14
- package/cpp/skia/include/core/SkRegion.h +1 -1
- package/cpp/skia/include/core/SkScalar.h +2 -4
- package/cpp/skia/include/core/SkSerialProcs.h +18 -10
- package/cpp/skia/include/core/SkShader.h +1 -64
- package/cpp/skia/include/core/SkSize.h +2 -0
- package/cpp/skia/include/core/SkSpan.h +4 -112
- package/cpp/skia/include/core/SkStream.h +11 -12
- package/cpp/skia/include/core/SkString.h +9 -25
- package/cpp/skia/include/core/SkStrokeRec.h +1 -1
- package/cpp/skia/include/core/SkSurface.h +83 -61
- package/cpp/skia/include/core/SkSurfaceCharacterization.h +3 -3
- package/cpp/skia/include/core/SkSurfaceProps.h +9 -1
- package/cpp/skia/include/core/SkTextBlob.h +2 -2
- package/cpp/skia/include/core/SkTextureCompressionType.h +30 -0
- package/cpp/skia/include/core/SkTime.h +1 -1
- package/cpp/skia/include/core/SkTypeface.h +9 -2
- package/cpp/skia/include/core/SkTypes.h +37 -466
- package/cpp/skia/include/core/SkVertices.h +2 -0
- package/cpp/skia/include/core/SkYUVAInfo.h +4 -0
- package/cpp/skia/include/core/SkYUVAPixmaps.h +7 -1
- package/cpp/skia/include/docs/SkPDFDocument.h +12 -1
- package/cpp/skia/include/effects/SkColorMatrix.h +2 -1
- package/cpp/skia/include/effects/SkGradientShader.h +65 -14
- package/cpp/skia/include/effects/SkImageFilters.h +0 -11
- package/cpp/skia/include/effects/SkRuntimeEffect.h +41 -11
- package/cpp/skia/include/encode/SkEncoder.h +7 -3
- package/cpp/skia/include/encode/SkICC.h +36 -0
- package/cpp/skia/include/encode/SkJpegEncoder.h +102 -71
- package/cpp/skia/include/encode/SkPngEncoder.h +89 -71
- package/cpp/skia/include/encode/SkWebpEncoder.h +65 -38
- package/cpp/skia/include/gpu/GpuTypes.h +23 -1
- package/cpp/skia/include/gpu/GrBackendSurface.h +9 -7
- package/cpp/skia/include/gpu/GrContextOptions.h +28 -9
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +6 -4
- package/cpp/skia/include/gpu/GrDirectContext.h +84 -63
- package/cpp/skia/include/gpu/GrDriverBugWorkarounds.h +2 -1
- package/cpp/skia/include/gpu/GrRecordingContext.h +9 -5
- package/cpp/skia/include/gpu/GrTypes.h +18 -18
- package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +4 -4
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +3 -3
- package/cpp/skia/include/gpu/ganesh/GrTextureGenerator.h +77 -0
- package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +385 -0
- package/cpp/skia/include/gpu/gl/GrGLExtensions.h +3 -3
- package/cpp/skia/include/gpu/gl/GrGLFunctions.h +1 -1
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +0 -3
- package/cpp/skia/include/gpu/gl/GrGLTypes.h +2 -1
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +72 -3
- package/cpp/skia/include/gpu/graphite/Context.h +85 -32
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +15 -11
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +55 -5
- package/cpp/skia/include/gpu/graphite/ImageProvider.h +6 -4
- package/cpp/skia/include/gpu/graphite/Recorder.h +41 -11
- package/cpp/skia/include/gpu/graphite/Recording.h +50 -3
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +47 -8
- package/cpp/skia/include/gpu/graphite/YUVABackendTextures.h +139 -0
- package/cpp/skia/include/gpu/graphite/dawn/DawnTypes.h +40 -0
- package/cpp/skia/include/gpu/graphite/dawn/DawnUtils.h +28 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +1 -1
- package/cpp/skia/include/gpu/graphite/mtl/{MtlTypes.h → MtlGraphiteTypes.h} +7 -6
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteUtils.h +27 -0
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +4 -9
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteUtils.h +28 -0
- package/cpp/skia/include/gpu/mock/GrMockTypes.h +17 -13
- package/cpp/skia/include/gpu/mtl/GrMtlTypes.h +2 -2
- package/cpp/skia/include/gpu/vk/GrVkBackendContext.h +1 -1
- package/cpp/skia/include/gpu/vk/GrVkTypes.h +3 -3
- package/cpp/skia/include/gpu/vk/VulkanExtensions.h +3 -3
- package/cpp/skia/include/gpu/vk/VulkanMemoryAllocator.h +5 -7
- package/cpp/skia/include/pathops/SkPathOps.h +3 -3
- package/cpp/skia/include/ports/SkFontMgr_data.h +22 -0
- package/cpp/skia/include/ports/SkFontMgr_indirect.h +14 -14
- package/cpp/skia/include/ports/SkRemotableFontMgr.h +2 -2
- package/cpp/skia/include/ports/SkTypeface_win.h +2 -1
- package/cpp/skia/include/private/SkChecksum.h +32 -7
- package/cpp/skia/include/private/SkColorData.h +1 -26
- package/cpp/skia/include/private/SkGainmapInfo.h +97 -0
- package/cpp/skia/include/private/SkGainmapShader.h +53 -0
- package/cpp/skia/include/private/SkIDChangeListener.h +4 -3
- package/cpp/skia/include/private/SkJpegGainmapEncoder.h +71 -0
- package/cpp/skia/include/private/SkJpegMetadataDecoder.h +61 -0
- package/cpp/skia/include/private/SkOpts_spi.h +3 -1
- package/cpp/skia/include/private/SkPathRef.h +64 -47
- package/cpp/skia/include/private/SkSLDefines.h +5 -5
- package/cpp/skia/include/private/SkSLSampleUsage.h +0 -4
- package/cpp/skia/include/private/SkSpinlock.h +1 -1
- package/cpp/skia/include/private/SkWeakRefCnt.h +3 -0
- package/cpp/skia/include/private/{SingleOwner.h → base/SingleOwner.h} +8 -5
- package/cpp/skia/include/private/base/SkAPI.h +52 -0
- package/cpp/skia/include/private/base/SkAlign.h +39 -0
- package/cpp/skia/include/private/base/SkAlignedStorage.h +32 -0
- package/cpp/skia/include/private/base/SkAssert.h +92 -0
- package/cpp/skia/include/private/base/SkAttributes.h +102 -0
- package/cpp/skia/include/private/base/SkCPUTypes.h +25 -0
- package/cpp/skia/include/private/base/SkContainers.h +46 -0
- package/cpp/skia/include/private/base/SkDebug.h +27 -0
- package/cpp/skia/include/private/{SkDeque.h → base/SkDeque.h} +3 -1
- package/cpp/skia/include/private/base/SkFeatures.h +151 -0
- package/cpp/skia/include/private/{SkFixed.h → base/SkFixed.h} +9 -7
- package/cpp/skia/include/private/{SkFloatBits.h → base/SkFloatBits.h} +2 -3
- package/cpp/skia/include/private/{SkFloatingPoint.h → base/SkFloatingPoint.h} +18 -9
- package/cpp/skia/include/private/base/SkLoadUserConfig.h +63 -0
- package/cpp/skia/include/private/{SkMacros.h → base/SkMacros.h} +17 -2
- package/cpp/skia/include/private/{SkMalloc.h → base/SkMalloc.h} +4 -7
- package/cpp/skia/include/{core → private/base}/SkMath.h +25 -2
- package/cpp/skia/include/private/{SkMutex.h → base/SkMutex.h} +5 -5
- package/cpp/skia/include/private/{SkNoncopyable.h → base/SkNoncopyable.h} +2 -2
- package/cpp/skia/include/private/{SkOnce.h → base/SkOnce.h} +3 -1
- package/cpp/skia/include/private/base/SkPathEnums.h +25 -0
- package/cpp/skia/include/private/{SkSafe32.h → base/SkSafe32.h} +16 -1
- package/cpp/skia/include/private/{SkSemaphore.h → base/SkSemaphore.h} +4 -3
- package/cpp/skia/include/private/base/SkSpan_impl.h +129 -0
- package/cpp/skia/include/private/base/SkTArray.h +694 -0
- package/cpp/skia/include/private/{SkTDArray.h → base/SkTDArray.h} +17 -54
- package/cpp/skia/include/private/{SkTFitsIn.h → base/SkTFitsIn.h} +14 -8
- package/cpp/skia/include/private/{SkTLogic.h → base/SkTLogic.h} +1 -1
- package/cpp/skia/include/private/{SkTemplates.h → base/SkTemplates.h} +63 -88
- package/cpp/skia/include/private/{SkThreadID.h → base/SkThreadID.h} +5 -2
- package/cpp/skia/include/private/{SkTo.h → base/SkTo.h} +13 -2
- package/cpp/skia/include/private/base/SkTypeTraits.h +33 -0
- package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +130 -0
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +5 -9
- package/cpp/skia/include/private/chromium/SkDiscardableMemory.h +70 -0
- package/cpp/skia/include/private/chromium/Slug.h +0 -9
- package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +2 -1
- package/cpp/skia/include/private/gpu/ganesh/GrD3DTypesMinimal.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrDawnTypesPriv.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrMockTypesPriv.h +3 -2
- package/cpp/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +17 -23
- package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +2 -2
- package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +38 -0
- package/cpp/skia/include/private/gpu/graphite/{MtlTypesPriv.h → MtlGraphiteTypesPriv.h} +5 -5
- package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +1 -9
- package/cpp/skia/include/private/gpu/vk/SkiaVulkan.h +4 -0
- package/cpp/skia/include/utils/SkCamera.h +1 -1
- package/cpp/skia/include/utils/SkCustomTypeface.h +7 -1
- package/cpp/skia/include/utils/SkNWayCanvas.h +6 -6
- package/cpp/skia/include/utils/SkOrderedFontMgr.h +7 -6
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +2 -2
- package/cpp/skia/include/utils/SkParsePath.h +1 -1
- package/cpp/skia/modules/skcms/skcms.h +14 -0
- package/cpp/skia/modules/skcms/src/Transform_inl.h +19 -0
- package/cpp/skia/modules/skparagraph/include/FontCollection.h +2 -2
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +72 -2
- package/cpp/skia/modules/skparagraph/include/ParagraphCache.h +1 -11
- package/cpp/skia/modules/skparagraph/include/ParagraphPainter.h +63 -0
- package/cpp/skia/modules/skparagraph/include/TextStyle.h +27 -4
- package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +13 -13
- package/cpp/skia/modules/skresources/include/SkResources.h +18 -4
- package/cpp/skia/modules/svg/include/SkSVGAttribute.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGContainer.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGGradient.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGIDMapper.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
- package/cpp/skia/modules/svg/include/SkSVGSVG.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGTypes.h +22 -21
- package/cpp/skia/modules/svg/include/SkSVGValue.h +1 -1
- package/cpp/skia/{include/private → src/core}/SkTHash.h +41 -37
- package/ios/RNSkia-iOS/ViewScreenshotService.mm +1 -1
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libskottie.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/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/libsksg.a +0 -0
- package/libs/android/armeabi-v7a/libskshaper.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/libsksg.a +0 -0
- package/libs/android/x86/libskshaper.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/libsksg.a +0 -0
- package/libs/android/x86_64/libskshaper.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/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/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/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 +1 -1
- package/react-native-skia.podspec +1 -1
- package/scripts/install-npm.js +11 -1
- package/cpp/skia/include/core/SkImageEncoder.h +0 -71
- package/cpp/skia/include/gpu/GrConfig.h +0 -53
- package/cpp/skia/include/gpu/graphite/CombinationBuilder.h +0 -195
- package/cpp/skia/include/private/SkHalf.h +0 -38
- package/cpp/skia/include/private/SkImageInfoPriv.h +0 -199
- package/cpp/skia/include/private/SkSLIRNode.h +0 -64
- package/cpp/skia/include/private/SkSLLayout.h +0 -144
- package/cpp/skia/include/private/SkSLModifiers.h +0 -178
- package/cpp/skia/include/private/SkSLProgramElement.h +0 -77
- package/cpp/skia/include/private/SkSLProgramKind.h +0 -35
- package/cpp/skia/include/private/SkSLStatement.h +0 -86
- package/cpp/skia/include/private/SkSLString.h +0 -41
- package/cpp/skia/include/private/SkSLSymbol.h +0 -94
- package/cpp/skia/include/private/SkSafe_math.h +0 -52
- package/cpp/skia/include/private/SkStringView.h +0 -51
- package/cpp/skia/include/private/SkTArray.h +0 -655
- package/cpp/skia/include/private/SkUniquePaintParamsID.h +0 -35
- package/cpp/skia/include/private/SkVx.h +0 -1026
- package/cpp/skia/include/sksl/DSL.h +0 -37
- package/cpp/skia/include/sksl/DSLBlock.h +0 -58
- package/cpp/skia/include/sksl/DSLCase.h +0 -62
- package/cpp/skia/include/sksl/DSLCore.h +0 -492
- package/cpp/skia/include/sksl/DSLExpression.h +0 -241
- package/cpp/skia/include/sksl/DSLFunction.h +0 -113
- package/cpp/skia/include/sksl/DSLLayout.h +0 -92
- package/cpp/skia/include/sksl/DSLModifiers.h +0 -69
- package/cpp/skia/include/sksl/DSLStatement.h +0 -82
- package/cpp/skia/include/sksl/DSLSymbols.h +0 -61
- package/cpp/skia/include/sksl/DSLType.h +0 -271
- package/cpp/skia/include/sksl/DSLVar.h +0 -231
- package/cpp/skia/include/sksl/SkSLErrorReporter.h +0 -65
- package/cpp/skia/include/sksl/SkSLOperator.h +0 -154
- package/cpp/skia/include/sksl/SkSLPosition.h +0 -104
- package/cpp/skia/include/utils/SkRandom.h +0 -169
- package/cpp/skia/src/core/SkLRUCache.h +0 -126
- package/cpp/skia/src/core/SkTInternalLList.h +0 -302
- /package/cpp/skia/include/{core → codec}/SkPngChunkReader.h +0 -0
- /package/cpp/skia/include/private/{SkTPin.h → base/SkTPin.h} +0 -0
- /package/cpp/skia/include/private/{SkThreadAnnotations.h → base/SkThreadAnnotations.h} +0 -0
@@ -9,41 +9,61 @@
|
|
9
9
|
#define SkSurface_DEFINED
|
10
10
|
|
11
11
|
#include "include/core/SkImage.h"
|
12
|
+
#include "include/core/SkImageInfo.h"
|
12
13
|
#include "include/core/SkPixmap.h"
|
13
14
|
#include "include/core/SkRefCnt.h"
|
15
|
+
#include "include/core/SkSamplingOptions.h"
|
16
|
+
#include "include/core/SkScalar.h"
|
14
17
|
#include "include/core/SkSurfaceProps.h"
|
18
|
+
#include "include/core/SkTypes.h"
|
15
19
|
|
16
|
-
#if
|
20
|
+
#if defined(SK_GANESH)
|
17
21
|
#include "include/gpu/GrTypes.h"
|
22
|
+
#else
|
23
|
+
enum GrSurfaceOrigin: int;
|
24
|
+
#endif
|
25
|
+
|
26
|
+
#if defined(SK_GRAPHITE)
|
27
|
+
#include "include/gpu/GpuTypes.h"
|
28
|
+
namespace skgpu::graphite {
|
29
|
+
class BackendTexture;
|
30
|
+
}
|
18
31
|
#endif
|
19
32
|
|
20
33
|
#if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26
|
21
34
|
#include <android/hardware_buffer.h>
|
35
|
+
class GrDirectContext;
|
22
36
|
#endif
|
23
37
|
|
24
|
-
#if
|
38
|
+
#if defined(SK_GANESH) && defined(SK_METAL)
|
25
39
|
#include "include/gpu/mtl/GrMtlTypes.h"
|
26
40
|
#endif
|
27
41
|
|
42
|
+
#include <cstddef>
|
43
|
+
#include <cstdint>
|
44
|
+
#include <memory>
|
45
|
+
|
46
|
+
class GrBackendRenderTarget;
|
47
|
+
class GrBackendSemaphore;
|
48
|
+
class GrBackendTexture;
|
49
|
+
class GrRecordingContext;
|
50
|
+
class SkBitmap;
|
28
51
|
class SkCanvas;
|
29
52
|
class SkCapabilities;
|
53
|
+
class SkColorSpace;
|
30
54
|
class SkDeferredDisplayList;
|
31
55
|
class SkPaint;
|
32
56
|
class SkSurfaceCharacterization;
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
class GrDirectContext;
|
37
|
-
class GrRecordingContext;
|
38
|
-
class GrRenderTarget;
|
39
|
-
enum GrSurfaceOrigin: int;
|
57
|
+
enum SkColorType : int;
|
58
|
+
struct SkIRect;
|
59
|
+
struct SkISize;
|
40
60
|
|
41
61
|
namespace skgpu {
|
42
62
|
class MutableTextureState;
|
63
|
+
enum class Budgeted : bool;
|
43
64
|
}
|
44
65
|
|
45
66
|
namespace skgpu::graphite {
|
46
|
-
class BackendTexture;
|
47
67
|
class Recorder;
|
48
68
|
}
|
49
69
|
|
@@ -206,7 +226,7 @@ public:
|
|
206
226
|
backend API (accounting only for use of the texture by this surface). If SkSurface creation
|
207
227
|
fails textureReleaseProc is called before this function returns.
|
208
228
|
|
209
|
-
If
|
229
|
+
If defined(SK_GANESH) is defined as zero, has no effect and returns nullptr.
|
210
230
|
|
211
231
|
@param context GPU context
|
212
232
|
@param backendTexture texture residing on GPU
|
@@ -241,7 +261,7 @@ public:
|
|
241
261
|
backend API (accounting only for use of the render target by this surface). If SkSurface
|
242
262
|
creation fails releaseProc is called before this function returns.
|
243
263
|
|
244
|
-
If
|
264
|
+
If defined(SK_GANESH) is defined as zero, has no effect and returns nullptr.
|
245
265
|
|
246
266
|
@param context GPU context
|
247
267
|
@param backendRenderTarget GPU intermediate memory buffer
|
@@ -276,7 +296,7 @@ public:
|
|
276
296
|
|
277
297
|
shouldCreateWithMips hints that SkImage returned by makeImageSnapshot() is mip map.
|
278
298
|
|
279
|
-
If
|
299
|
+
If defined(SK_GANESH) is defined as zero, has no effect and returns nullptr.
|
280
300
|
|
281
301
|
@param context GPU context
|
282
302
|
@param imageInfo width, height, SkColorType, SkAlphaType, SkColorSpace;
|
@@ -287,9 +307,11 @@ public:
|
|
287
307
|
@param shouldCreateWithMips hint that SkSurface will host mip map images
|
288
308
|
@return SkSurface if all parameters are valid; otherwise, nullptr
|
289
309
|
*/
|
290
|
-
static sk_sp<SkSurface> MakeRenderTarget(GrRecordingContext* context,
|
310
|
+
static sk_sp<SkSurface> MakeRenderTarget(GrRecordingContext* context,
|
311
|
+
skgpu::Budgeted budgeted,
|
291
312
|
const SkImageInfo& imageInfo,
|
292
|
-
int sampleCount,
|
313
|
+
int sampleCount,
|
314
|
+
GrSurfaceOrigin surfaceOrigin,
|
293
315
|
const SkSurfaceProps* surfaceProps,
|
294
316
|
bool shouldCreateWithMips = false);
|
295
317
|
|
@@ -314,10 +336,12 @@ public:
|
|
314
336
|
fonts; may be nullptr
|
315
337
|
@return SkSurface if all parameters are valid; otherwise, nullptr
|
316
338
|
*/
|
317
|
-
static sk_sp<SkSurface> MakeRenderTarget(GrRecordingContext* context,
|
318
|
-
|
339
|
+
static sk_sp<SkSurface> MakeRenderTarget(GrRecordingContext* context,
|
340
|
+
skgpu::Budgeted budgeted,
|
341
|
+
const SkImageInfo& imageInfo,
|
342
|
+
int sampleCount,
|
319
343
|
const SkSurfaceProps* surfaceProps) {
|
320
|
-
#if
|
344
|
+
#if defined(SK_GANESH)
|
321
345
|
return MakeRenderTarget(context, budgeted, imageInfo, sampleCount,
|
322
346
|
kBottomLeft_GrSurfaceOrigin, surfaceProps);
|
323
347
|
#else
|
@@ -339,9 +363,10 @@ public:
|
|
339
363
|
of raster surface; width, or height, or both, may be zero
|
340
364
|
@return SkSurface if all parameters are valid; otherwise, nullptr
|
341
365
|
*/
|
342
|
-
static sk_sp<SkSurface> MakeRenderTarget(GrRecordingContext* context,
|
366
|
+
static sk_sp<SkSurface> MakeRenderTarget(GrRecordingContext* context,
|
367
|
+
skgpu::Budgeted budgeted,
|
343
368
|
const SkImageInfo& imageInfo) {
|
344
|
-
#if
|
369
|
+
#if defined(SK_GANESH)
|
345
370
|
if (!imageInfo.width() || !imageInfo.height()) {
|
346
371
|
return nullptr;
|
347
372
|
}
|
@@ -362,8 +387,7 @@ public:
|
|
362
387
|
*/
|
363
388
|
static sk_sp<SkSurface> MakeRenderTarget(GrRecordingContext* context,
|
364
389
|
const SkSurfaceCharacterization& characterization,
|
365
|
-
|
366
|
-
|
390
|
+
skgpu::Budgeted budgeted);
|
367
391
|
|
368
392
|
#if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26
|
369
393
|
/** Private.
|
@@ -398,7 +422,7 @@ public:
|
|
398
422
|
);
|
399
423
|
#endif
|
400
424
|
|
401
|
-
#
|
425
|
+
#if defined(SK_GRAPHITE)
|
402
426
|
/**
|
403
427
|
* In Graphite, while clients hold a ref on an SkSurface, the backing gpu object does _not_
|
404
428
|
* count against the budget. Once an SkSurface is freed, the backing gpu object may or may
|
@@ -408,7 +432,7 @@ public:
|
|
408
432
|
static sk_sp<SkSurface> MakeGraphite(
|
409
433
|
skgpu::graphite::Recorder*,
|
410
434
|
const SkImageInfo& imageInfo,
|
411
|
-
skgpu::
|
435
|
+
skgpu::Mipmapped = skgpu::Mipmapped::kNo,
|
412
436
|
const SkSurfaceProps* surfaceProps = nullptr);
|
413
437
|
|
414
438
|
/**
|
@@ -430,9 +454,9 @@ public:
|
|
430
454
|
sk_sp<SkColorSpace> colorSpace,
|
431
455
|
const SkSurfaceProps* props);
|
432
456
|
|
433
|
-
#endif //
|
457
|
+
#endif // SK_GRAPHITE
|
434
458
|
|
435
|
-
#if
|
459
|
+
#if defined(SK_GANESH) && defined(SK_METAL)
|
436
460
|
/** Creates SkSurface from CAMetalLayer.
|
437
461
|
Returned SkSurface takes a reference on the CAMetalLayer. The ref on the layer will be
|
438
462
|
released when the SkSurface is destroyed.
|
@@ -525,7 +549,7 @@ public:
|
|
525
549
|
|
526
550
|
/** Returns an ImageInfo describing the surface.
|
527
551
|
*/
|
528
|
-
SkImageInfo imageInfo();
|
552
|
+
virtual SkImageInfo imageInfo() const { return SkImageInfo::MakeUnknown(fWidth, fHeight); }
|
529
553
|
|
530
554
|
/** Returns unique value identifying the content of SkSurface. Returned value changes
|
531
555
|
each time the content changes. Content is changed by drawing, or by calling
|
@@ -566,7 +590,7 @@ public:
|
|
566
590
|
*/
|
567
591
|
skgpu::graphite::Recorder* recorder();
|
568
592
|
|
569
|
-
#if
|
593
|
+
#if defined(SK_GANESH)
|
570
594
|
enum BackendHandleAccess {
|
571
595
|
kFlushRead_BackendHandleAccess, //!< back-end object is readable
|
572
596
|
kFlushWrite_BackendHandleAccess, //!< back-end object is writable
|
@@ -669,7 +693,7 @@ public:
|
|
669
693
|
|
670
694
|
/** Returns SkImage capturing SkSurface contents. Subsequent drawing to SkSurface contents
|
671
695
|
are not captured. SkImage allocation is accounted for if SkSurface was created with
|
672
|
-
|
696
|
+
skgpu::Budgeted::kYes.
|
673
697
|
|
674
698
|
@return SkImage initialized with SkSurface contents
|
675
699
|
|
@@ -690,6 +714,34 @@ public:
|
|
690
714
|
*/
|
691
715
|
sk_sp<SkImage> makeImageSnapshot(const SkIRect& bounds);
|
692
716
|
|
717
|
+
#if defined(SK_GRAPHITE)
|
718
|
+
/**
|
719
|
+
* The 'asImage' and 'makeImageCopy' API/entry points are currently only available for
|
720
|
+
* Graphite.
|
721
|
+
*
|
722
|
+
* In this API, SkSurface no longer supports copy-on-write behavior. Instead, when creating
|
723
|
+
* an image for a surface, the client must explicitly indicate if a copy should be made.
|
724
|
+
* In both of the below calls the resource backing the surface will never change.
|
725
|
+
*
|
726
|
+
* The 'asImage' entry point has some major ramifications for the mutability of the
|
727
|
+
* returned SkImage. Since the originating surface and the returned image share the
|
728
|
+
* same backing, care must be taken by the client to ensure that the contents of the image
|
729
|
+
* reflect the desired contents when it is consumed by the gpu.
|
730
|
+
* Note: if the backing GPU buffer isn't textureable this method will return null. Graphite
|
731
|
+
* will not attempt to make a copy.
|
732
|
+
* Note: For 'asImage', the mipmapping of the image will match that of the source surface.
|
733
|
+
*
|
734
|
+
* The 'makeImageCopy' entry point allows subsetting and the addition of mipmaps (since
|
735
|
+
* a copy is already being made).
|
736
|
+
*
|
737
|
+
* In Graphite, the legacy API call (i.e., makeImageSnapshot) will just always make a copy.
|
738
|
+
*/
|
739
|
+
sk_sp<SkImage> asImage();
|
740
|
+
|
741
|
+
sk_sp<SkImage> makeImageCopy(const SkIRect* subset = nullptr,
|
742
|
+
skgpu::Mipmapped mipmapped = skgpu::Mipmapped::kNo);
|
743
|
+
#endif
|
744
|
+
|
693
745
|
/** Draws SkSurface contents to canvas, with its top-left corner at (x, y).
|
694
746
|
|
695
747
|
If SkPaint paint is not nullptr, apply SkColorFilter, alpha, SkImageFilter, and SkBlendMode.
|
@@ -834,36 +886,6 @@ public:
|
|
834
886
|
using RescaleGamma = SkImage::RescaleGamma;
|
835
887
|
using RescaleMode = SkImage::RescaleMode;
|
836
888
|
|
837
|
-
/** Makes surface pixel data available to caller, possibly asynchronously.
|
838
|
-
|
839
|
-
Currently asynchronous reads are only supported on the GPU backend and only when the
|
840
|
-
underlying 3D API supports transfer buffers and CPU/GPU synchronization primitives. In all
|
841
|
-
other cases this operates synchronously.
|
842
|
-
|
843
|
-
Data is read from the source sub-rectangle, then converted to the color space, color type,
|
844
|
-
and alpha type of 'info'. A 'srcRect' that is not contained by the bounds of the surface
|
845
|
-
causes failure.
|
846
|
-
|
847
|
-
When the pixel data is ready the caller's ReadPixelsCallback is called with a
|
848
|
-
AsyncReadResult containing pixel data in the requested color type, alpha type, and color
|
849
|
-
space. The AsyncReadResult will have count() == 1. Upon failure the callback is called
|
850
|
-
with nullptr for AsyncReadResult. For a GPU surface this flushes work but a submit must
|
851
|
-
occur to guarantee a finite time before the callback is called.
|
852
|
-
|
853
|
-
The data is valid for the lifetime of AsyncReadResult with the exception that if the
|
854
|
-
SkSurface is GPU-backed the data is immediately invalidated if the context is abandoned
|
855
|
-
or destroyed.
|
856
|
-
|
857
|
-
@param info info of the requested pixels
|
858
|
-
@param srcRect subrectangle of surface to read
|
859
|
-
@param callback function to call with result of the read
|
860
|
-
@param context passed to callback
|
861
|
-
*/
|
862
|
-
void asyncReadPixels(const SkImageInfo& info,
|
863
|
-
const SkIRect& srcRect,
|
864
|
-
ReadPixelsCallback callback,
|
865
|
-
ReadPixelsContext context);
|
866
|
-
|
867
889
|
/** Makes surface pixel data available to caller, possibly asynchronously. It can also rescale
|
868
890
|
the surface pixels.
|
869
891
|
|
@@ -994,7 +1016,7 @@ public:
|
|
994
1016
|
kPresent, //!< back-end surface will be used for presenting to screen
|
995
1017
|
};
|
996
1018
|
|
997
|
-
#if
|
1019
|
+
#if defined(SK_GANESH)
|
998
1020
|
/** If a surface is GPU texture backed, is being drawn with MSAA, and there is a resolve
|
999
1021
|
texture, this call will insert a resolve command into the stream of gpu commands. In order
|
1000
1022
|
for the resolve to actually have an effect, the work still needs to be flushed and submitted
|
@@ -1100,7 +1122,7 @@ public:
|
|
1100
1122
|
*/
|
1101
1123
|
GrSemaphoresSubmitted flush(const GrFlushInfo& info,
|
1102
1124
|
const skgpu::MutableTextureState* newState = nullptr);
|
1103
|
-
#endif //
|
1125
|
+
#endif // defined(SK_GANESH)
|
1104
1126
|
|
1105
1127
|
void flush();
|
1106
1128
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
class SkColorSpace;
|
18
18
|
|
19
19
|
|
20
|
-
#if
|
20
|
+
#if defined(SK_GANESH)
|
21
21
|
#include "include/gpu/GrBackendSurface.h"
|
22
22
|
#include "include/gpu/GrContextThreadSafeProxy.h"
|
23
23
|
#include "include/gpu/GrTypes.h"
|
@@ -118,7 +118,7 @@ public:
|
|
118
118
|
bool isCompatible(const GrBackendTexture&) const;
|
119
119
|
|
120
120
|
private:
|
121
|
-
friend class
|
121
|
+
friend class SkSurface_Ganesh; // for 'set' & 'config'
|
122
122
|
friend class GrVkSecondaryCBDrawContext; // for 'set' & 'config'
|
123
123
|
friend class GrContextThreadSafeProxy; // for private ctor
|
124
124
|
friend class SkDeferredDisplayListRecorder; // for 'config'
|
@@ -210,7 +210,7 @@ private:
|
|
210
210
|
SkSurfaceProps fSurfaceProps;
|
211
211
|
};
|
212
212
|
|
213
|
-
#else// !
|
213
|
+
#else// !defined(SK_GANESH)
|
214
214
|
class GrBackendFormat;
|
215
215
|
|
216
216
|
class SK_API SkSurfaceCharacterization {
|
@@ -9,6 +9,7 @@
|
|
9
9
|
#define SkSurfaceProps_DEFINED
|
10
10
|
|
11
11
|
#include "include/core/SkTypes.h"
|
12
|
+
#include "include/private/base/SkTo.h"
|
12
13
|
|
13
14
|
/**
|
14
15
|
* Description of how the LCD strips are arranged for each pixel. If this is unknown, or the
|
@@ -53,7 +54,10 @@ public:
|
|
53
54
|
enum Flags {
|
54
55
|
kUseDeviceIndependentFonts_Flag = 1 << 0,
|
55
56
|
// Use internal MSAA to render to non-MSAA GPU surfaces.
|
56
|
-
kDynamicMSAA_Flag = 1 << 1
|
57
|
+
kDynamicMSAA_Flag = 1 << 1,
|
58
|
+
// If set, all rendering will have dithering enabled
|
59
|
+
// Currently this only impacts GPU backends
|
60
|
+
kAlwaysDither_Flag = 1 << 2,
|
57
61
|
};
|
58
62
|
/** Deprecated alias used by Chromium. Will be removed. */
|
59
63
|
static const Flags kUseDistanceFieldFonts_Flag = kUseDeviceIndependentFonts_Flag;
|
@@ -76,6 +80,10 @@ public:
|
|
76
80
|
return SkToBool(fFlags & kUseDeviceIndependentFonts_Flag);
|
77
81
|
}
|
78
82
|
|
83
|
+
bool isAlwaysDither() const {
|
84
|
+
return SkToBool(fFlags & kAlwaysDither_Flag);
|
85
|
+
}
|
86
|
+
|
79
87
|
bool operator==(const SkSurfaceProps& that) const {
|
80
88
|
return fFlags == that.fFlags && fPixelGeometry == that.fPixelGeometry;
|
81
89
|
}
|
@@ -12,7 +12,7 @@
|
|
12
12
|
#include "include/core/SkPaint.h"
|
13
13
|
#include "include/core/SkRefCnt.h"
|
14
14
|
#include "include/core/SkString.h"
|
15
|
-
#include "include/private/SkTemplates.h"
|
15
|
+
#include "include/private/base/SkTemplates.h"
|
16
16
|
|
17
17
|
#include <atomic>
|
18
18
|
|
@@ -491,7 +491,7 @@ private:
|
|
491
491
|
friend class SkTextBlobPriv;
|
492
492
|
friend class SkTextBlobBuilderPriv;
|
493
493
|
|
494
|
-
|
494
|
+
skia_private::AutoTMalloc<uint8_t> fStorage;
|
495
495
|
size_t fStorageSize;
|
496
496
|
size_t fStorageUsed;
|
497
497
|
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2023 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 SkTextureCompressionType_DEFINED
|
9
|
+
#define SkTextureCompressionType_DEFINED
|
10
|
+
/*
|
11
|
+
* Skia | GL_COMPRESSED_* | MTLPixelFormat* | VK_FORMAT_*_BLOCK
|
12
|
+
* --------------------------------------------------------------------------------------
|
13
|
+
* kETC2_RGB8_UNORM | ETC1_RGB8 | ETC2_RGB8 (iOS-only) | ETC2_R8G8B8_UNORM
|
14
|
+
* | RGB8_ETC2 | |
|
15
|
+
* --------------------------------------------------------------------------------------
|
16
|
+
* kBC1_RGB8_UNORM | RGB_S3TC_DXT1_EXT | N/A | BC1_RGB_UNORM
|
17
|
+
* --------------------------------------------------------------------------------------
|
18
|
+
* kBC1_RGBA8_UNORM | RGBA_S3TC_DXT1_EXT | BC1_RGBA (macOS-only)| BC1_RGBA_UNORM
|
19
|
+
*/
|
20
|
+
enum class SkTextureCompressionType {
|
21
|
+
kNone,
|
22
|
+
kETC2_RGB8_UNORM,
|
23
|
+
|
24
|
+
kBC1_RGB8_UNORM,
|
25
|
+
kBC1_RGBA8_UNORM,
|
26
|
+
kLast = kBC1_RGBA8_UNORM,
|
27
|
+
kETC1_RGB8 = kETC2_RGB8_UNORM,
|
28
|
+
};
|
29
|
+
|
30
|
+
#endif
|
@@ -14,8 +14,8 @@
|
|
14
14
|
#include "include/core/SkFontTypes.h"
|
15
15
|
#include "include/core/SkRect.h"
|
16
16
|
#include "include/core/SkString.h"
|
17
|
-
#include "include/private/SkOnce.h"
|
18
17
|
#include "include/private/SkWeakRefCnt.h"
|
18
|
+
#include "include/private/base/SkOnce.h"
|
19
19
|
|
20
20
|
class SkData;
|
21
21
|
class SkDescriptor;
|
@@ -360,6 +360,12 @@ public:
|
|
360
360
|
return this->onGetCTFontRef();
|
361
361
|
}
|
362
362
|
|
363
|
+
/* Skia reserves all tags that begin with a lower case letter and 0 */
|
364
|
+
using FactoryId = SkFourByteTag;
|
365
|
+
static void Register(
|
366
|
+
FactoryId id,
|
367
|
+
sk_sp<SkTypeface> (*make)(std::unique_ptr<SkStreamAsset>, const SkFontArguments&));
|
368
|
+
|
363
369
|
protected:
|
364
370
|
explicit SkTypeface(const SkFontStyle& style, bool isFixedPitch = false);
|
365
371
|
~SkTypeface() override;
|
@@ -435,7 +441,8 @@ private:
|
|
435
441
|
* typefaces that contain a COLR table.
|
436
442
|
*/
|
437
443
|
bool glyphMaskNeedsCurrentColor() const;
|
438
|
-
friend class SkStrikeServerImpl;
|
444
|
+
friend class SkStrikeServerImpl; // glyphMaskNeedsCurrentColor
|
445
|
+
friend class SkTypefaceProxyPrototype; // glyphMaskNeedsCurrentColor
|
439
446
|
|
440
447
|
/** Retrieve detailed typeface metrics. Used by the PDF backend. */
|
441
448
|
std::unique_ptr<SkAdvancedTypefaceMetrics> getAdvancedMetrics() const;
|