@shopify/react-native-skia 0.1.213 → 0.1.215
Sign up to get free protection for your applications and to get access to all the features.
- package/android/cpp/rnskia-android/SkiaOpenGLHelper.h +3 -2
- package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.cpp +9 -2
- package/cpp/api/JsiSkMatrix.h +31 -0
- package/cpp/api/JsiSkPath.h +15 -7
- package/cpp/api/JsiSkSurface.h +4 -1
- package/cpp/skia/include/android/GrAHardwareBufferUtils.h +99 -0
- package/cpp/skia/include/android/SkHeifDecoder.h +10 -3
- package/cpp/skia/include/codec/SkAvifDecoder.h +1 -0
- package/cpp/skia/include/codec/SkBmpDecoder.h +1 -0
- package/cpp/skia/include/codec/SkCodec.h +4 -3
- package/cpp/skia/include/codec/SkEncodedImageFormat.h +0 -3
- package/cpp/skia/include/codec/SkGifDecoder.h +1 -0
- package/cpp/skia/include/codec/SkIcoDecoder.h +1 -0
- package/cpp/skia/include/codec/SkJpegDecoder.h +1 -0
- package/cpp/skia/include/codec/SkJpegxlDecoder.h +1 -0
- package/cpp/skia/include/codec/SkPngDecoder.h +1 -0
- package/cpp/skia/include/codec/SkRawDecoder.h +1 -0
- package/cpp/skia/include/codec/SkWbmpDecoder.h +1 -0
- package/cpp/skia/include/codec/SkWebpDecoder.h +1 -0
- package/cpp/skia/include/config/SkUserConfig.h +0 -2
- package/cpp/skia/include/core/SkBitmap.h +8 -8
- package/cpp/skia/include/core/SkCanvas.h +37 -50
- package/cpp/skia/include/core/SkCapabilities.h +2 -7
- package/cpp/skia/include/core/SkColor.h +1 -1
- package/cpp/skia/include/core/SkColorFilter.h +6 -0
- package/cpp/skia/include/core/SkColorTable.h +3 -0
- package/cpp/skia/include/core/SkColorType.h +2 -0
- package/cpp/skia/include/core/SkContourMeasure.h +12 -8
- package/cpp/skia/include/core/SkDocument.h +1 -0
- package/cpp/skia/include/core/SkFont.h +11 -2
- package/cpp/skia/include/core/SkFontMgr.h +2 -3
- package/cpp/skia/include/core/SkGraphics.h +3 -13
- package/cpp/skia/include/core/SkImage.h +57 -111
- package/cpp/skia/include/core/SkImageFilter.h +6 -1
- package/cpp/skia/include/core/SkImageGenerator.h +8 -0
- package/cpp/skia/include/core/SkImageInfo.h +0 -2
- package/cpp/skia/include/core/SkM44.h +7 -3
- package/cpp/skia/include/core/SkMallocPixelRef.h +4 -1
- package/cpp/skia/include/core/SkMatrix.h +17 -17
- package/cpp/skia/include/core/SkMesh.h +71 -61
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkOverdrawCanvas.h +25 -0
- package/cpp/skia/include/core/SkPaint.h +1 -1
- package/cpp/skia/include/core/SkPath.h +12 -4
- package/cpp/skia/include/core/SkPathMeasure.h +3 -4
- package/cpp/skia/include/core/SkPicture.h +19 -6
- package/cpp/skia/include/core/SkPictureRecorder.h +6 -6
- package/cpp/skia/include/core/SkPixmap.h +2 -3
- package/cpp/skia/include/core/SkRRect.h +1 -1
- package/cpp/skia/include/core/SkRect.h +107 -110
- package/cpp/skia/include/core/SkRefCnt.h +1 -1
- package/cpp/skia/include/core/SkRegion.h +7 -1
- package/cpp/skia/include/core/SkSerialProcs.h +14 -0
- package/cpp/skia/include/core/SkShader.h +9 -0
- package/cpp/skia/include/core/SkStream.h +9 -9
- package/cpp/skia/include/core/SkString.h +1 -1
- package/cpp/skia/include/core/SkSurface.h +14 -25
- package/cpp/skia/include/core/SkTextBlob.h +17 -4
- package/cpp/skia/include/core/SkTiledImageUtils.h +28 -0
- package/cpp/skia/include/core/SkTypeface.h +7 -2
- package/cpp/skia/include/core/SkTypes.h +4 -12
- package/cpp/skia/include/docs/SkPDFDocument.h +17 -3
- package/cpp/skia/include/effects/SkImageFilters.h +73 -24
- package/cpp/skia/include/effects/SkRuntimeEffect.h +20 -51
- package/cpp/skia/include/gpu/GpuTypes.h +13 -0
- package/cpp/skia/include/gpu/GrBackendSurface.h +95 -262
- package/cpp/skia/include/gpu/GrContextOptions.h +7 -1
- package/cpp/skia/include/gpu/GrDirectContext.h +138 -128
- package/cpp/skia/include/gpu/GrRecordingContext.h +9 -4
- package/cpp/skia/include/gpu/GrSurfaceInfo.h +0 -24
- package/cpp/skia/include/gpu/GrTypes.h +16 -1
- package/cpp/skia/include/gpu/GrYUVABackendTextures.h +4 -4
- package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +2 -2
- package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +44 -12
- package/cpp/skia/include/gpu/ganesh/SkMeshGanesh.h +57 -0
- package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +2 -1
- package/cpp/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h +58 -0
- package/cpp/skia/include/gpu/ganesh/gl/GrGLDirectContext.h +29 -0
- package/cpp/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h +1 -1
- package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h +67 -0
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -2
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +14 -3
- package/cpp/skia/include/gpu/graphite/Context.h +93 -13
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +19 -8
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +23 -0
- package/cpp/skia/include/gpu/graphite/Image.h +56 -0
- package/cpp/skia/include/gpu/graphite/ImageProvider.h +5 -0
- package/cpp/skia/include/gpu/graphite/Recorder.h +26 -9
- package/cpp/skia/include/gpu/graphite/Recording.h +7 -5
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +8 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +2 -2
- package/cpp/skia/include/gpu/mtl/GrMtlTypes.h +2 -2
- package/cpp/skia/include/gpu/vk/GrVkTypes.h +4 -3
- package/cpp/skia/include/ports/SkCFObject.h +1 -1
- package/cpp/skia/include/private/SkGainmapInfo.h +4 -13
- package/cpp/skia/include/private/SkJpegGainmapEncoder.h +1 -24
- package/cpp/skia/include/private/SkWeakRefCnt.h +1 -1
- package/cpp/skia/include/private/base/SkAnySubclass.h +73 -0
- package/cpp/skia/include/private/base/SkAssert.h +106 -12
- package/cpp/skia/include/private/base/SkAttributes.h +0 -12
- package/cpp/skia/include/private/base/SkFeatures.h +0 -3
- package/cpp/skia/include/private/base/SkFloatingPoint.h +58 -105
- package/cpp/skia/include/private/base/SkSpan_impl.h +18 -12
- package/cpp/skia/include/private/base/SkTArray.h +22 -17
- package/cpp/skia/include/private/base/SkTDArray.h +5 -6
- package/cpp/skia/include/private/base/SkTemplates.h +50 -30
- package/cpp/skia/include/private/chromium/GrDeferredDisplayListRecorder.h +5 -2
- package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +2 -2
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +13 -8
- package/cpp/skia/include/private/chromium/SkDiscardableMemory.h +1 -1
- package/cpp/skia/include/private/chromium/SkImageChromium.h +16 -3
- package/cpp/skia/include/private/chromium/Slug.h +11 -4
- package/cpp/skia/include/private/gpu/ganesh/GrD3DTypesMinimal.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +6 -9
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +29 -13
- package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +2 -28
- package/cpp/skia/include/private/gpu/graphite/ContextOptionsPriv.h +34 -0
- package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +6 -0
- package/cpp/skia/include/private/gpu/graphite/MtlGraphiteTypesPriv.h +8 -0
- package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +10 -0
- package/cpp/skia/include/utils/SkBase64.h +2 -2
- package/cpp/skia/include/utils/SkNWayCanvas.h +1 -11
- package/cpp/skia/include/utils/SkNoDrawCanvas.h +0 -2
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +1 -2
- package/cpp/skia/include/utils/SkShadowUtils.h +15 -1
- package/cpp/skia/include/utils/SkTextUtils.h +1 -1
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +107 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +3 -2
- package/cpp/skia/modules/skparagraph/include/ParagraphStyle.h +4 -0
- package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +5 -3
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +4 -0
- package/cpp/skia/src/core/SkChecksum.h +2 -1
- package/cpp/skia/src/core/SkPathPriv.h +1 -1
- package/cpp/skia/src/core/SkTHash.h +19 -9
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +3 -1
- package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm +1 -1
- package/lib/commonjs/animation/functions/interpolatePaths.d.ts +1 -1
- package/lib/commonjs/animation/functions/interpolatePaths.js +4 -4
- package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js +5 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/commonjs/external/reanimated/index.d.ts +3 -1
- package/lib/commonjs/external/reanimated/index.js +30 -4
- package/lib/commonjs/external/reanimated/index.js.map +1 -1
- package/lib/commonjs/external/reanimated/interpolators.d.ts +9 -0
- package/lib/commonjs/external/reanimated/interpolators.js +56 -0
- package/lib/commonjs/external/reanimated/interpolators.js.map +1 -0
- package/lib/commonjs/external/reanimated/moduleWrapper.d.ts +8 -6
- package/lib/commonjs/external/reanimated/moduleWrapper.js +8 -18
- package/lib/commonjs/external/reanimated/moduleWrapper.js.map +1 -1
- package/lib/commonjs/external/reanimated/renderHelpers.js +46 -1
- package/lib/commonjs/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/commonjs/external/reanimated/useAnimatedImageValue.d.ts +2 -0
- package/lib/commonjs/external/reanimated/useAnimatedImageValue.js +53 -0
- package/lib/commonjs/external/reanimated/useAnimatedImageValue.js.map +1 -0
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.d.ts +1 -0
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js +27 -0
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js.map +1 -0
- package/lib/commonjs/mock/index.js +8 -0
- package/lib/commonjs/mock/index.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +5 -5
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/skia/core/AnimatedImage.d.ts +0 -1
- package/lib/commonjs/skia/core/AnimatedImage.js +1 -45
- package/lib/commonjs/skia/core/AnimatedImage.js.map +1 -1
- package/lib/commonjs/skia/types/MaskFilter.js +4 -0
- package/lib/commonjs/skia/types/MaskFilter.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix.d.ts +4 -0
- package/lib/commonjs/skia/types/Matrix.js.map +1 -1
- package/lib/commonjs/skia/types/Path/Path.d.ts +10 -9
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMatrix.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js +33 -5
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPath.d.ts +9 -9
- package/lib/commonjs/skia/web/JsiSkPath.js +15 -2
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js +2 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.js +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
- package/lib/commonjs/views/types.js +3 -0
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/module/animation/functions/interpolatePaths.d.ts +1 -1
- package/lib/module/animation/functions/interpolatePaths.js +4 -4
- package/lib/module/animation/functions/interpolatePaths.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Rect.js +5 -1
- package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/module/external/reanimated/index.d.ts +3 -1
- package/lib/module/external/reanimated/index.js +3 -1
- package/lib/module/external/reanimated/index.js.map +1 -1
- package/lib/module/external/reanimated/interpolators.d.ts +9 -0
- package/lib/module/external/reanimated/interpolators.js +34 -0
- package/lib/module/external/reanimated/interpolators.js.map +1 -0
- package/lib/module/external/reanimated/moduleWrapper.d.ts +8 -6
- package/lib/module/external/reanimated/moduleWrapper.js +5 -16
- package/lib/module/external/reanimated/moduleWrapper.js.map +1 -1
- package/lib/module/external/reanimated/renderHelpers.js +48 -2
- package/lib/module/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/module/external/reanimated/useAnimatedImageValue.d.ts +2 -0
- package/lib/module/external/reanimated/useAnimatedImageValue.js +41 -0
- package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -0
- package/lib/module/external/reanimated/useDerivedValueOnJS.d.ts +1 -0
- package/lib/module/external/reanimated/useDerivedValueOnJS.js +16 -0
- package/lib/module/external/reanimated/useDerivedValueOnJS.js.map +1 -0
- package/lib/module/mock/index.js +8 -0
- package/lib/module/mock/index.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +1 -1
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/skia/core/AnimatedImage.d.ts +0 -1
- package/lib/module/skia/core/AnimatedImage.js +0 -40
- package/lib/module/skia/core/AnimatedImage.js.map +1 -1
- package/lib/module/skia/types/MaskFilter.js +3 -0
- package/lib/module/skia/types/MaskFilter.js.map +1 -1
- package/lib/module/skia/types/Matrix.d.ts +4 -0
- package/lib/module/skia/types/Matrix.js.map +1 -1
- package/lib/module/skia/types/Path/Path.d.ts +10 -9
- package/lib/module/skia/types/Path/Path.js.map +1 -1
- package/lib/module/skia/web/JsiSkMatrix.d.ts +6 -0
- package/lib/module/skia/web/JsiSkMatrix.js +33 -5
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/module/skia/web/JsiSkPath.d.ts +9 -9
- package/lib/module/skia/web/JsiSkPath.js +15 -2
- package/lib/module/skia/web/JsiSkPath.js.map +1 -1
- package/lib/module/views/types.js +3 -0
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/jestEnv.d.mts +5 -0
- package/lib/typescript/jestSetup.d.mts +1 -0
- package/lib/typescript/src/animation/functions/interpolatePaths.d.ts +1 -1
- package/lib/typescript/src/external/reanimated/index.d.ts +3 -1
- package/lib/typescript/src/external/reanimated/interpolators.d.ts +9 -0
- package/lib/typescript/src/external/reanimated/moduleWrapper.d.ts +8 -6
- package/lib/typescript/src/external/reanimated/useAnimatedImageValue.d.ts +2 -0
- package/lib/typescript/src/external/reanimated/useDerivedValueOnJS.d.ts +1 -0
- package/lib/typescript/src/skia/core/AnimatedImage.d.ts +0 -1
- package/lib/typescript/src/skia/types/Matrix.d.ts +4 -0
- package/lib/typescript/src/skia/types/Path/Path.d.ts +10 -9
- package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkPath.d.ts +9 -9
- 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.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.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.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.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/libskparagraph.xcframework/Info.plist +5 -5
- 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/libskunicode.xcframework/Info.plist +5 -5
- 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/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 +4 -3
- package/react-native-skia.podspec +1 -1
- package/src/animation/functions/interpolatePaths.ts +7 -4
- package/src/dom/nodes/datatypes/Rect.ts +6 -2
- package/src/external/reanimated/index.ts +3 -1
- package/src/external/reanimated/interpolators.ts +89 -0
- package/src/external/reanimated/moduleWrapper.ts +38 -25
- package/src/external/reanimated/renderHelpers.ts +42 -2
- package/src/external/reanimated/useAnimatedImageValue.ts +51 -0
- package/src/external/reanimated/useDerivedValueOnJS.ts +25 -0
- package/src/mock/index.ts +5 -0
- package/src/renderer/HostConfig.ts +1 -1
- package/src/skia/core/AnimatedImage.ts +0 -47
- package/src/skia/types/Matrix.ts +4 -0
- package/src/skia/types/Path/Path.ts +10 -9
- package/src/skia/web/JsiSkMatrix.ts +33 -27
- package/src/skia/web/JsiSkPath.ts +15 -2
- package/cpp/skia/include/core/SkDeferredDisplayList.h +0 -15
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +0 -15
- package/cpp/skia/include/core/SkPromiseImageTexture.h +0 -20
- package/cpp/skia/include/core/SkSurfaceCharacterization.h +0 -15
- package/cpp/skia/include/core/SkTime.h +0 -63
- package/cpp/skia/include/effects/SkOpPathEffect.h +0 -43
- package/cpp/skia/include/effects/SkStrokeAndFillPathEffect.h +0 -28
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +0 -32
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +0 -95
- package/cpp/skia/include/private/SkBitmaskEnum.h +0 -59
- package/cpp/skia/include/private/SkSLDefines.h +0 -64
- package/cpp/skia/include/private/SkShadowFlags.h +0 -27
- package/cpp/skia/include/private/gpu/ganesh/GrDawnTypesPriv.h +0 -26
- package/globalJestSetup.js +0 -6
- package/lib/commonjs/external/reanimated/useSharedValueEffect.d.ts +0 -8
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js +0 -52
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js.map +0 -1
- package/lib/module/external/reanimated/useSharedValueEffect.d.ts +0 -8
- package/lib/module/external/reanimated/useSharedValueEffect.js +0 -42
- package/lib/module/external/reanimated/useSharedValueEffect.js.map +0 -1
- package/lib/typescript/globalJestSetup.d.ts +0 -2
- package/lib/typescript/src/external/reanimated/useSharedValueEffect.d.ts +0 -8
- package/src/external/reanimated/useSharedValueEffect.ts +0 -58
- /package/cpp/skia/{include/private/base → src/core}/SkPathEnums.h +0 -0
@@ -62,7 +62,7 @@ enum class BackendSurfaceAccess;
|
|
62
62
|
|
63
63
|
class SK_API GrDirectContext : public GrRecordingContext {
|
64
64
|
public:
|
65
|
-
#
|
65
|
+
#if defined(SK_GL) && !defined(SK_DISABLE_LEGACY_GL_GRDIRECTCONTEXT_FACTORIES)
|
66
66
|
/**
|
67
67
|
* Creates a GrDirectContext for a backend context. If no GrGLInterface is provided then the
|
68
68
|
* result of GrGLMakeNativeInterface() is used if it succeeds.
|
@@ -116,12 +116,6 @@ public:
|
|
116
116
|
static sk_sp<GrDirectContext> MakeDirect3D(const GrD3DBackendContext&);
|
117
117
|
#endif
|
118
118
|
|
119
|
-
#ifdef SK_DAWN
|
120
|
-
static sk_sp<GrDirectContext> MakeDawn(const wgpu::Device&,
|
121
|
-
const GrContextOptions&);
|
122
|
-
static sk_sp<GrDirectContext> MakeDawn(const wgpu::Device&);
|
123
|
-
#endif
|
124
|
-
|
125
119
|
static sk_sp<GrDirectContext> MakeMock(const GrMockOptions*, const GrContextOptions&);
|
126
120
|
static sk_sp<GrDirectContext> MakeMock(const GrMockOptions*);
|
127
121
|
|
@@ -171,13 +165,20 @@ public:
|
|
171
165
|
void abandonContext() override;
|
172
166
|
|
173
167
|
/**
|
174
|
-
* Returns true if the context was abandoned or if the
|
175
|
-
*
|
168
|
+
* Returns true if the context was abandoned or if the backend specific context has gotten into
|
169
|
+
* an unrecoverarble, lost state (e.g. in Vulkan backend if we've gotten a
|
176
170
|
* VK_ERROR_DEVICE_LOST). If the backend context is lost, this call will also abandon this
|
177
171
|
* context.
|
178
172
|
*/
|
179
173
|
bool abandoned() override;
|
180
174
|
|
175
|
+
/**
|
176
|
+
* Returns true if the backend specific context has gotten into an unrecoverarble, lost state
|
177
|
+
* (e.g. in Vulkan backend if we've gotten a VK_ERROR_DEVICE_LOST). If the backend context is
|
178
|
+
* lost, this call will also abandon this context.
|
179
|
+
*/
|
180
|
+
bool isDeviceLost();
|
181
|
+
|
181
182
|
// TODO: Remove this from public after migrating Chrome.
|
182
183
|
sk_sp<GrContextThreadSafeProxy> threadSafeProxy();
|
183
184
|
|
@@ -272,18 +273,19 @@ public:
|
|
272
273
|
/**
|
273
274
|
* Purge GPU resources that haven't been used in the past 'msNotUsed' milliseconds or are
|
274
275
|
* otherwise marked for deletion, regardless of whether the context is under budget.
|
276
|
+
|
275
277
|
*
|
276
|
-
*
|
277
|
-
*
|
278
|
-
*
|
279
|
-
* purged
|
280
|
-
*
|
281
|
-
*
|
282
|
-
* will be cleaned up.
|
283
|
-
* @param scratchResourcesOnly If true only unlocked scratch resources will be purged.
|
278
|
+
* @param msNotUsed Only unlocked resources not used in these last milliseconds will be
|
279
|
+
* cleaned up.
|
280
|
+
* @param opts Specify which resources should be cleaned up. If kScratchResourcesOnly
|
281
|
+
* then, all unlocked scratch resources older than 'msNotUsed' will be purged
|
282
|
+
* but the unlocked resources with persistent data will remain. If
|
283
|
+
* kAllResources
|
284
284
|
*/
|
285
|
-
|
286
|
-
|
285
|
+
|
286
|
+
void performDeferredCleanup(
|
287
|
+
std::chrono::milliseconds msNotUsed,
|
288
|
+
GrPurgeResourceOptions opts = GrPurgeResourceOptions::kAllResources);
|
287
289
|
|
288
290
|
// Temporary compatibility API for Android.
|
289
291
|
void purgeResourcesNotUsedInMs(std::chrono::milliseconds msNotUsed) {
|
@@ -312,10 +314,10 @@ public:
|
|
312
314
|
* ensure that resource usage is under budget (i.e., even if 'scratchResourcesOnly' is true
|
313
315
|
* some resources with persistent data may be purged to be under budget).
|
314
316
|
*
|
315
|
-
* @param
|
316
|
-
*
|
317
|
+
* @param opts If kScratchResourcesOnly only unlocked scratch resources will be purged prior
|
318
|
+
* enforcing the budget requirements.
|
317
319
|
*/
|
318
|
-
void purgeUnlockedResources(
|
320
|
+
void purgeUnlockedResources(GrPurgeResourceOptions opts);
|
319
321
|
|
320
322
|
/**
|
321
323
|
* Gets the maximum supported texture size.
|
@@ -332,6 +334,11 @@ public:
|
|
332
334
|
*/
|
333
335
|
using GrRecordingContext::colorTypeSupportedAsImage;
|
334
336
|
|
337
|
+
/**
|
338
|
+
* Does this context support protected content?
|
339
|
+
*/
|
340
|
+
using GrRecordingContext::supportsProtectedContent;
|
341
|
+
|
335
342
|
/**
|
336
343
|
* Can a SkSurface be created with the given color type. To check whether MSAA is supported
|
337
344
|
* use maxSurfaceSampleCountForColorType().
|
@@ -365,11 +372,11 @@ public:
|
|
365
372
|
/**
|
366
373
|
* Call to ensure all drawing to the context has been flushed and submitted to the underlying 3D
|
367
374
|
* API. This is equivalent to calling GrContext::flush with a default GrFlushInfo followed by
|
368
|
-
* GrContext::submit(
|
375
|
+
* GrContext::submit(sync).
|
369
376
|
*/
|
370
|
-
void flushAndSubmit(
|
377
|
+
void flushAndSubmit(GrSyncCpu sync = GrSyncCpu::kNo) {
|
371
378
|
this->flush(GrFlushInfo());
|
372
|
-
this->submit(
|
379
|
+
this->submit(sync);
|
373
380
|
}
|
374
381
|
|
375
382
|
/**
|
@@ -391,7 +398,7 @@ public:
|
|
391
398
|
* the GPU. Thus the client should not have the GPU wait on any of the semaphores passed in with
|
392
399
|
* the GrFlushInfo. Regardless of whether semaphores were submitted to the GPU or not, the
|
393
400
|
* client is still responsible for deleting any initialized semaphores.
|
394
|
-
*
|
401
|
+
* Regardless of semaphore submission the context will still be flushed. It should be
|
395
402
|
* emphasized that a return value of GrSemaphoresSubmitted::kNo does not mean the flush did not
|
396
403
|
* happen. It simply means there were no semaphores submitted to the GPU. A caller should only
|
397
404
|
* take this as a failure if they passed in semaphores to be submitted.
|
@@ -462,9 +469,6 @@ public:
|
|
462
469
|
* @param access type of access the call will do on the backend object after flush
|
463
470
|
* @param info flush options
|
464
471
|
*/
|
465
|
-
GrSemaphoresSubmitted flush(sk_sp<SkSurface> surface,
|
466
|
-
SkSurfaces::BackendSurfaceAccess access,
|
467
|
-
const GrFlushInfo& info);
|
468
472
|
GrSemaphoresSubmitted flush(SkSurface* surface,
|
469
473
|
SkSurfaces::BackendSurfaceAccess access,
|
470
474
|
const GrFlushInfo& info);
|
@@ -488,9 +492,6 @@ public:
|
|
488
492
|
* @param info flush options
|
489
493
|
* @param newState optional state change request after flush
|
490
494
|
*/
|
491
|
-
GrSemaphoresSubmitted flush(sk_sp<SkSurface> surface,
|
492
|
-
const GrFlushInfo& info,
|
493
|
-
const skgpu::MutableTextureState* newState = nullptr);
|
494
495
|
GrSemaphoresSubmitted flush(SkSurface* surface,
|
495
496
|
const GrFlushInfo& info,
|
496
497
|
const skgpu::MutableTextureState* newState = nullptr);
|
@@ -503,14 +504,14 @@ public:
|
|
503
504
|
*
|
504
505
|
* Has no effect on a CPU-backed surface.
|
505
506
|
*/
|
506
|
-
void flushAndSubmit(
|
507
|
+
void flushAndSubmit(SkSurface* surface, GrSyncCpu sync = GrSyncCpu::kNo);
|
507
508
|
|
508
509
|
/**
|
509
510
|
* Flushes the given surface with the default GrFlushInfo.
|
510
511
|
*
|
511
512
|
* Has no effect on a CPU-backed surface.
|
512
513
|
*/
|
513
|
-
void flush(
|
514
|
+
void flush(SkSurface* surface);
|
514
515
|
|
515
516
|
/**
|
516
517
|
* Submit outstanding work to the gpu from all previously un-submitted flushes. The return
|
@@ -523,10 +524,10 @@ public:
|
|
523
524
|
* If it returns false, then those same semaphores will not have been submitted and we will not
|
524
525
|
* try to submit them again. The caller is free to delete the semaphores at any time.
|
525
526
|
*
|
526
|
-
* If
|
527
|
+
* If sync flag is GrSyncCpu::kYes, this function will return once the gpu has finished with all
|
527
528
|
* submitted work.
|
528
529
|
*/
|
529
|
-
bool submit(
|
530
|
+
bool submit(GrSyncCpu sync = GrSyncCpu::kNo);
|
530
531
|
|
531
532
|
/**
|
532
533
|
* Checks whether any asynchronous work is complete and if so calls related callbacks.
|
@@ -574,93 +575,96 @@ public:
|
|
574
575
|
GrBackendTexture createBackendTexture(int width,
|
575
576
|
int height,
|
576
577
|
const GrBackendFormat&,
|
577
|
-
|
578
|
+
skgpu::Mipmapped,
|
578
579
|
GrRenderable,
|
579
580
|
GrProtected = GrProtected::kNo,
|
580
581
|
std::string_view label = {});
|
581
582
|
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
583
|
+
/**
|
584
|
+
* If possible, create an uninitialized backend texture. The client should ensure that the
|
585
|
+
* returned backend texture is valid.
|
586
|
+
* If successful, the created backend texture will be compatible with the provided
|
587
|
+
* SkColorType.
|
588
|
+
* For the Vulkan backend the layout of the created VkImage will be:
|
589
|
+
* VK_IMAGE_LAYOUT_UNDEFINED.
|
590
|
+
*/
|
591
|
+
GrBackendTexture createBackendTexture(int width,
|
592
|
+
int height,
|
593
|
+
SkColorType,
|
594
|
+
skgpu::Mipmapped,
|
595
|
+
GrRenderable,
|
596
|
+
GrProtected = GrProtected::kNo,
|
597
|
+
std::string_view label = {});
|
596
598
|
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
599
|
+
/**
|
600
|
+
* If possible, create a backend texture initialized to a particular color. The client should
|
601
|
+
* ensure that the returned backend texture is valid. The client can pass in a finishedProc
|
602
|
+
* to be notified when the data has been uploaded by the gpu and the texture can be deleted. The
|
603
|
+
* client is required to call `submit` to send the upload work to the gpu. The
|
604
|
+
* finishedProc will always get called even if we failed to create the GrBackendTexture.
|
605
|
+
* For the Vulkan backend the layout of the created VkImage will be:
|
606
|
+
* VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
|
607
|
+
*/
|
608
|
+
GrBackendTexture createBackendTexture(int width,
|
609
|
+
int height,
|
610
|
+
const GrBackendFormat&,
|
611
|
+
const SkColor4f& color,
|
612
|
+
skgpu::Mipmapped,
|
613
|
+
GrRenderable,
|
614
|
+
GrProtected = GrProtected::kNo,
|
615
|
+
GrGpuFinishedProc finishedProc = nullptr,
|
616
|
+
GrGpuFinishedContext finishedContext = nullptr,
|
617
|
+
std::string_view label = {});
|
615
618
|
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
619
|
+
/**
|
620
|
+
* If possible, create a backend texture initialized to a particular color. The client should
|
621
|
+
* ensure that the returned backend texture is valid. The client can pass in a finishedProc
|
622
|
+
* to be notified when the data has been uploaded by the gpu and the texture can be deleted. The
|
623
|
+
* client is required to call `submit` to send the upload work to the gpu. The
|
624
|
+
* finishedProc will always get called even if we failed to create the GrBackendTexture.
|
625
|
+
* If successful, the created backend texture will be compatible with the provided
|
626
|
+
* SkColorType.
|
627
|
+
* For the Vulkan backend the layout of the created VkImage will be:
|
628
|
+
* VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
|
629
|
+
*/
|
630
|
+
GrBackendTexture createBackendTexture(int width,
|
631
|
+
int height,
|
632
|
+
SkColorType,
|
633
|
+
const SkColor4f& color,
|
634
|
+
skgpu::Mipmapped,
|
635
|
+
GrRenderable,
|
636
|
+
GrProtected = GrProtected::kNo,
|
637
|
+
GrGpuFinishedProc finishedProc = nullptr,
|
638
|
+
GrGpuFinishedContext finishedContext = nullptr,
|
639
|
+
std::string_view label = {});
|
636
640
|
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
641
|
+
/**
|
642
|
+
* If possible, create a backend texture initialized with the provided pixmap data. The client
|
643
|
+
* should ensure that the returned backend texture is valid. The client can pass in a
|
644
|
+
* finishedProc to be notified when the data has been uploaded by the gpu and the texture can be
|
645
|
+
* deleted. The client is required to call `submit` to send the upload work to the gpu.
|
646
|
+
* The finishedProc will always get called even if we failed to create the GrBackendTexture.
|
647
|
+
* If successful, the created backend texture will be compatible with the provided
|
648
|
+
* pixmap(s). Compatible, in this case, means that the backend format will be the result
|
649
|
+
* of calling defaultBackendFormat on the base pixmap's colortype. The src data can be deleted
|
650
|
+
* when this call returns.
|
651
|
+
* If numLevels is 1 a non-mipmapped texture will result. If a mipmapped texture is desired
|
652
|
+
* the data for all the mipmap levels must be provided. In the mipmapped case all the
|
653
|
+
* colortypes of the provided pixmaps must be the same. Additionally, all the miplevels
|
654
|
+
* must be sized correctly (please see SkMipmap::ComputeLevelSize and ComputeLevelCount). The
|
655
|
+
* GrSurfaceOrigin controls whether the pixmap data is vertically flipped in the texture.
|
656
|
+
* Note: the pixmap's alphatypes and colorspaces are ignored.
|
657
|
+
* For the Vulkan backend the layout of the created VkImage will be:
|
658
|
+
* VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
|
659
|
+
*/
|
660
|
+
GrBackendTexture createBackendTexture(const SkPixmap srcData[],
|
661
|
+
int numLevels,
|
662
|
+
GrSurfaceOrigin,
|
663
|
+
GrRenderable,
|
664
|
+
GrProtected,
|
665
|
+
GrGpuFinishedProc finishedProc = nullptr,
|
666
|
+
GrGpuFinishedContext finishedContext = nullptr,
|
667
|
+
std::string_view label = {});
|
664
668
|
|
665
669
|
/**
|
666
670
|
* Convenience version createBackendTexture() that takes just a base level pixmap.
|
@@ -786,18 +790,20 @@ public:
|
|
786
790
|
* For the Vulkan backend the layout of the created VkImage will be:
|
787
791
|
* VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
|
788
792
|
*/
|
789
|
-
GrBackendTexture createCompressedBackendTexture(int width,
|
793
|
+
GrBackendTexture createCompressedBackendTexture(int width,
|
794
|
+
int height,
|
790
795
|
const GrBackendFormat&,
|
791
796
|
const SkColor4f& color,
|
792
|
-
|
797
|
+
skgpu::Mipmapped,
|
793
798
|
GrProtected = GrProtected::kNo,
|
794
799
|
GrGpuFinishedProc finishedProc = nullptr,
|
795
800
|
GrGpuFinishedContext finishedContext = nullptr);
|
796
801
|
|
797
|
-
GrBackendTexture createCompressedBackendTexture(int width,
|
802
|
+
GrBackendTexture createCompressedBackendTexture(int width,
|
803
|
+
int height,
|
798
804
|
SkTextureCompressionType,
|
799
805
|
const SkColor4f& color,
|
800
|
-
|
806
|
+
skgpu::Mipmapped,
|
801
807
|
GrProtected = GrProtected::kNo,
|
802
808
|
GrGpuFinishedProc finishedProc = nullptr,
|
803
809
|
GrGpuFinishedContext finishedContext = nullptr);
|
@@ -814,18 +820,22 @@ public:
|
|
814
820
|
* For the Vulkan backend the layout of the created VkImage will be:
|
815
821
|
* VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
|
816
822
|
*/
|
817
|
-
GrBackendTexture createCompressedBackendTexture(int width,
|
823
|
+
GrBackendTexture createCompressedBackendTexture(int width,
|
824
|
+
int height,
|
818
825
|
const GrBackendFormat&,
|
819
|
-
const void* data,
|
820
|
-
|
826
|
+
const void* data,
|
827
|
+
size_t dataSize,
|
828
|
+
skgpu::Mipmapped,
|
821
829
|
GrProtected = GrProtected::kNo,
|
822
830
|
GrGpuFinishedProc finishedProc = nullptr,
|
823
831
|
GrGpuFinishedContext finishedContext = nullptr);
|
824
832
|
|
825
|
-
GrBackendTexture createCompressedBackendTexture(int width,
|
833
|
+
GrBackendTexture createCompressedBackendTexture(int width,
|
834
|
+
int height,
|
826
835
|
SkTextureCompressionType,
|
827
|
-
const void* data,
|
828
|
-
|
836
|
+
const void* data,
|
837
|
+
size_t dataSize,
|
838
|
+
skgpu::Mipmapped,
|
829
839
|
GrProtected = GrProtected::kNo,
|
830
840
|
GrGpuFinishedProc finishedProc = nullptr,
|
831
841
|
GrGpuFinishedContext finishedContext = nullptr);
|
@@ -892,7 +902,7 @@ public:
|
|
892
902
|
GrGpuFinishedProc finishedProc = nullptr,
|
893
903
|
GrGpuFinishedContext finishedContext = nullptr);
|
894
904
|
|
895
|
-
void deleteBackendTexture(GrBackendTexture);
|
905
|
+
void deleteBackendTexture(const GrBackendTexture&);
|
896
906
|
|
897
907
|
// This interface allows clients to pre-compile shaders and populate the runtime program cache.
|
898
908
|
// The key and data blobs should be the ones passed to the PersistentCache, in SkSL format.
|
@@ -996,7 +1006,7 @@ private:
|
|
996
1006
|
// invoked after objects they depend upon have already been destroyed.
|
997
1007
|
std::unique_ptr<SkTaskGroup> fTaskGroup;
|
998
1008
|
std::unique_ptr<sktext::gpu::StrikeCache> fStrikeCache;
|
999
|
-
|
1009
|
+
std::unique_ptr<GrGpu> fGpu;
|
1000
1010
|
std::unique_ptr<GrResourceCache> fResourceCache;
|
1001
1011
|
std::unique_ptr<GrResourceProvider> fResourceProvider;
|
1002
1012
|
|
@@ -83,6 +83,11 @@ public:
|
|
83
83
|
*/
|
84
84
|
SK_API bool colorTypeSupportedAsImage(SkColorType) const;
|
85
85
|
|
86
|
+
/**
|
87
|
+
* Does this context support protected content?
|
88
|
+
*/
|
89
|
+
SK_API bool supportsProtectedContent() const;
|
90
|
+
|
86
91
|
/**
|
87
92
|
* Gets the maximum supported sample count for a color type. 1 is returned if only non-MSAA
|
88
93
|
* rendering is supported for the color type. 0 is returned if rendering to this color type
|
@@ -215,7 +220,7 @@ protected:
|
|
215
220
|
int numPathMaskCacheHits() const { return fNumPathMaskCacheHits; }
|
216
221
|
void incNumPathMasksCacheHits() { fNumPathMaskCacheHits++; }
|
217
222
|
|
218
|
-
#if GR_TEST_UTILS
|
223
|
+
#if defined(GR_TEST_UTILS)
|
219
224
|
void dump(SkString* out) const;
|
220
225
|
void dumpKeyValuePairs(skia_private::TArray<SkString>* keys,
|
221
226
|
skia_private::TArray<double>* values) const;
|
@@ -229,7 +234,7 @@ protected:
|
|
229
234
|
void incNumPathMasksGenerated() {}
|
230
235
|
void incNumPathMasksCacheHits() {}
|
231
236
|
|
232
|
-
#if GR_TEST_UTILS
|
237
|
+
#if defined(GR_TEST_UTILS)
|
233
238
|
void dump(SkString*) const {}
|
234
239
|
void dumpKeyValuePairs(skia_private::TArray<SkString>* keys,
|
235
240
|
skia_private::TArray<double>* values) const {}
|
@@ -237,7 +242,7 @@ protected:
|
|
237
242
|
#endif // GR_GPU_STATS
|
238
243
|
} fStats;
|
239
244
|
|
240
|
-
#if GR_GPU_STATS && GR_TEST_UTILS
|
245
|
+
#if GR_GPU_STATS && defined(GR_TEST_UTILS)
|
241
246
|
struct DMSAAStats {
|
242
247
|
void dumpKeyValuePairs(skia_private::TArray<SkString>* keys,
|
243
248
|
skia_private::TArray<double>* values) const;
|
@@ -265,7 +270,7 @@ private:
|
|
265
270
|
std::unique_ptr<GrDrawingManager> fDrawingManager;
|
266
271
|
std::unique_ptr<GrProxyProvider> fProxyProvider;
|
267
272
|
|
268
|
-
#if GR_TEST_UTILS
|
273
|
+
#if defined(GR_TEST_UTILS)
|
269
274
|
int fSuppressWarningMessages = 0;
|
270
275
|
#endif
|
271
276
|
};
|
@@ -23,9 +23,6 @@ struct GrD3DSurfaceInfo;
|
|
23
23
|
#ifdef SK_METAL
|
24
24
|
#include "include/private/gpu/ganesh/GrMtlTypesPriv.h"
|
25
25
|
#endif
|
26
|
-
#ifdef SK_DAWN
|
27
|
-
#include "include/private/gpu/ganesh/GrDawnTypesPriv.h"
|
28
|
-
#endif
|
29
26
|
#include "include/private/gpu/ganesh/GrMockTypesPriv.h"
|
30
27
|
|
31
28
|
class GrSurfaceInfo {
|
@@ -60,15 +57,6 @@ public:
|
|
60
57
|
, fLevelCount(mtlInfo.fLevelCount)
|
61
58
|
, fProtected(mtlInfo.fProtected)
|
62
59
|
, fMtlSpec(mtlInfo) {}
|
63
|
-
#endif
|
64
|
-
#ifdef SK_DAWN
|
65
|
-
GrSurfaceInfo(const GrDawnSurfaceInfo& dawnInfo)
|
66
|
-
: fBackend(GrBackendApi::kDawn)
|
67
|
-
, fValid(true)
|
68
|
-
, fSampleCount(dawnInfo.fSampleCount)
|
69
|
-
, fLevelCount(dawnInfo.fLevelCount)
|
70
|
-
, fProtected(dawnInfo.fProtected)
|
71
|
-
, fDawnSpec(dawnInfo) {}
|
72
60
|
#endif
|
73
61
|
GrSurfaceInfo(const GrMockSurfaceInfo& mockInfo)
|
74
62
|
: fBackend(GrBackendApi::kMock)
|
@@ -117,15 +105,6 @@ public:
|
|
117
105
|
*info = GrMtlTextureSpecToSurfaceInfo(fMtlSpec, fSampleCount, fLevelCount, fProtected);
|
118
106
|
return true;
|
119
107
|
}
|
120
|
-
#endif
|
121
|
-
#ifdef SK_DAWN
|
122
|
-
bool getDawnSurfaceInfo(GrDawnSurfaceInfo* info) const {
|
123
|
-
if (!this->isValid() || fBackend != GrBackendApi::kDawn) {
|
124
|
-
return false;
|
125
|
-
}
|
126
|
-
*info = GrDawnTextureSpecToSurfaceInfo(fDawnSpec, fSampleCount, fLevelCount, fProtected);
|
127
|
-
return true;
|
128
|
-
}
|
129
108
|
#endif
|
130
109
|
bool getMockSurfaceInfo(GrMockSurfaceInfo* info) const {
|
131
110
|
if (!this->isValid() || fBackend != GrBackendApi::kMock) {
|
@@ -155,9 +134,6 @@ private:
|
|
155
134
|
#endif
|
156
135
|
#ifdef SK_METAL
|
157
136
|
GrMtlTextureSpec fMtlSpec;
|
158
|
-
#endif
|
159
|
-
#ifdef SK_DAWN
|
160
|
-
GrDawnTextureSpec fDawnSpec;
|
161
137
|
#endif
|
162
138
|
GrMockTextureSpec fMockSpec;
|
163
139
|
};
|
@@ -98,13 +98,18 @@ enum class GrBackendApi : unsigned {
|
|
98
98
|
kVulkan,
|
99
99
|
kMetal,
|
100
100
|
kDirect3D,
|
101
|
-
|
101
|
+
|
102
102
|
/**
|
103
103
|
* Mock is a backend that does not draw anything. It is used for unit tests
|
104
104
|
* and to measure CPU overhead.
|
105
105
|
*/
|
106
106
|
kMock,
|
107
107
|
|
108
|
+
/**
|
109
|
+
* Ganesh doesn't support some context types (e.g. Dawn) and will return Unsupported.
|
110
|
+
*/
|
111
|
+
kUnsupported,
|
112
|
+
|
108
113
|
/**
|
109
114
|
* Added here to support the legacy GrBackend enum value and clients who referenced it using
|
110
115
|
* GrBackend::kOpenGL_GrBackend.
|
@@ -241,4 +246,14 @@ enum class GrSemaphoresSubmitted : bool {
|
|
241
246
|
kYes = true
|
242
247
|
};
|
243
248
|
|
249
|
+
enum class GrPurgeResourceOptions {
|
250
|
+
kAllResources,
|
251
|
+
kScratchResourcesOnly,
|
252
|
+
};
|
253
|
+
|
254
|
+
enum class GrSyncCpu : bool {
|
255
|
+
kNo = false,
|
256
|
+
kYes = true,
|
257
|
+
};
|
258
|
+
|
244
259
|
#endif
|
@@ -28,12 +28,12 @@ public:
|
|
28
28
|
* planes indicated by the SkYUVAInfo. The texture dimensions are taken from the SkYUVAInfo's
|
29
29
|
* plane dimensions. All the described textures share a common origin. The planar image this
|
30
30
|
* describes will be mip mapped if all the textures are individually mip mapped as indicated
|
31
|
-
* by
|
31
|
+
* by skgpu::Mipmapped. This will produce an invalid result (return false from isValid()) if the
|
32
32
|
* passed formats' channels don't agree with SkYUVAInfo.
|
33
33
|
*/
|
34
34
|
GrYUVABackendTextureInfo(const SkYUVAInfo&,
|
35
35
|
const GrBackendFormat[kMaxPlanes],
|
36
|
-
|
36
|
+
skgpu::Mipmapped,
|
37
37
|
GrSurfaceOrigin);
|
38
38
|
|
39
39
|
GrYUVABackendTextureInfo(const GrYUVABackendTextureInfo&) = default;
|
@@ -47,7 +47,7 @@ public:
|
|
47
47
|
|
48
48
|
SkYUVColorSpace yuvColorSpace() const { return fYUVAInfo.yuvColorSpace(); }
|
49
49
|
|
50
|
-
|
50
|
+
skgpu::Mipmapped mipmapped() const { return fMipmapped; }
|
51
51
|
|
52
52
|
GrSurfaceOrigin textureOrigin() const { return fTextureOrigin; }
|
53
53
|
|
@@ -72,7 +72,7 @@ public:
|
|
72
72
|
private:
|
73
73
|
SkYUVAInfo fYUVAInfo;
|
74
74
|
GrBackendFormat fPlaneFormats[kMaxPlanes];
|
75
|
-
|
75
|
+
skgpu::Mipmapped fMipmapped = skgpu::Mipmapped::kNo;
|
76
76
|
GrSurfaceOrigin fTextureOrigin = kTopLeft_GrSurfaceOrigin;
|
77
77
|
};
|
78
78
|
|
@@ -134,7 +134,7 @@ public:
|
|
134
134
|
* The caller must assume ownership of the object, and manage its reference count directly.
|
135
135
|
* No call to Release() will be made.
|
136
136
|
*/
|
137
|
-
T*
|
137
|
+
[[nodiscard]] T* release() {
|
138
138
|
T* obj = fObject;
|
139
139
|
fObject = nullptr;
|
140
140
|
return obj;
|
@@ -216,7 +216,7 @@ struct GrD3DTextureResourceInfo {
|
|
216
216
|
, fSampleQualityPattern(info.fSampleQualityPattern)
|
217
217
|
, fProtected(info.fProtected) {}
|
218
218
|
|
219
|
-
#if GR_TEST_UTILS
|
219
|
+
#if defined(GR_TEST_UTILS)
|
220
220
|
bool operator==(const GrD3DTextureResourceInfo& that) const {
|
221
221
|
return fResource == that.fResource && fResourceState == that.fResourceState &&
|
222
222
|
fFormat == that.fFormat && fSampleCount == that.fSampleCount &&
|