@shopify/react-native-skia 2.6.5 → 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/CMakeLists.txt +1 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaWebGPUViewManagerDelegate.java +35 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaWebGPUViewManagerInterface.java +17 -0
- package/cpp/api/JsiSkCanvas.h +33 -0
- package/cpp/api/JsiSkImage.h +12 -4
- package/cpp/api/JsiSkSurface.h +5 -1
- package/cpp/rnwgpu/api/GPU.cpp +0 -3
- package/cpp/rnwgpu/api/GPUAdapter.cpp +9 -5
- package/cpp/rnwgpu/api/GPUDevice.cpp +55 -4
- package/cpp/rnwgpu/api/GPUDevice.h +6 -0
- package/cpp/rnwgpu/api/GPUShaderModule.cpp +1 -1
- package/cpp/rnwgpu/api/GPUSharedFence.cpp +80 -0
- package/cpp/rnwgpu/api/GPUSharedFence.h +53 -0
- package/cpp/rnwgpu/api/GPUSharedTextureMemory.cpp +64 -11
- package/cpp/rnwgpu/api/GPUSharedTextureMemory.h +13 -8
- package/cpp/rnwgpu/api/descriptors/GPUSharedFenceDescriptor.h +58 -0
- package/cpp/rnwgpu/api/descriptors/GPUSharedFenceState.h +51 -0
- package/cpp/skia/include/android/GrAHardwareBufferUtils.h +1 -1
- package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +1 -1
- package/cpp/skia/include/android/SkAnimatedImage.h +1 -1
- package/cpp/skia/include/codec/SkCodec.h +0 -8
- package/cpp/skia/include/codec/SkEncodedOrigin.h +1 -1
- package/cpp/skia/include/codec/SkPngRustDecoder.h +1 -1
- package/cpp/skia/include/core/SkBitmap.h +2 -8
- package/cpp/skia/include/core/SkCPURecorder.h +3 -1
- package/cpp/skia/include/core/SkCanvasVirtualEnforcer.h +1 -1
- package/cpp/skia/include/core/SkColorType.h +5 -3
- package/cpp/skia/include/core/SkContourMeasure.h +1 -1
- package/cpp/skia/include/core/SkCoverageMode.h +1 -1
- package/cpp/skia/include/core/SkCubicMap.h +1 -1
- package/cpp/skia/include/core/SkExecutor.h +1 -1
- package/cpp/skia/include/core/SkFont.h +15 -0
- package/cpp/skia/include/core/SkFontArguments.h +6 -1
- package/cpp/skia/include/core/SkFontMetrics.h +1 -1
- package/cpp/skia/include/core/SkFontMgr.h +36 -1
- package/cpp/skia/include/core/SkFontParameters.h +1 -1
- package/cpp/skia/include/core/SkFontScanner.h +1 -1
- package/cpp/skia/include/core/SkFontTypes.h +1 -1
- package/cpp/skia/include/core/SkM44.h +1 -1
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +1 -1
- package/cpp/skia/include/core/SkPathBuilder.h +10 -4
- package/cpp/skia/include/core/SkPathIter.h +1 -1
- package/cpp/skia/include/core/SkPathTypes.h +1 -1
- package/cpp/skia/include/core/SkPixelRef.h +4 -1
- package/cpp/skia/include/core/SkRecorder.h +2 -1
- package/cpp/skia/include/core/SkRegion.h +7 -1
- package/cpp/skia/include/core/SkSamplingOptions.h +1 -1
- package/cpp/skia/include/core/SkSerialProcs.h +8 -1
- package/cpp/skia/include/core/SkShader.h +3 -5
- package/cpp/skia/include/core/SkSpan.h +1 -1
- package/cpp/skia/include/core/SkStream.h +1 -1
- package/cpp/skia/include/core/SkStrikeRef.h +80 -0
- package/cpp/skia/include/core/SkTileMode.h +1 -1
- package/cpp/skia/include/core/SkVertices.h +1 -1
- package/cpp/skia/include/core/SkYUVAPixmaps.h +3 -5
- package/cpp/skia/include/docs/SkPDFDocument.h +1 -1
- package/cpp/skia/include/docs/SkXPSDocument.h +1 -1
- package/cpp/skia/include/effects/SkGradient.h +1 -1
- package/cpp/skia/include/effects/SkHighContrastFilter.h +1 -1
- package/cpp/skia/include/effects/SkShaderMaskFilter.h +1 -1
- package/cpp/skia/include/effects/SkTrimPathEffect.h +1 -1
- package/cpp/skia/include/encode/SkEncoder.h +1 -1
- package/cpp/skia/include/encode/SkJpegEncoder.h +1 -1
- package/cpp/skia/include/encode/SkPngEncoder.h +1 -1
- package/cpp/skia/include/encode/SkPngRustEncoder.h +1 -1
- package/cpp/skia/include/encode/SkWebpEncoder.h +1 -1
- package/cpp/skia/include/gpu/GpuTypes.h +2 -0
- package/cpp/skia/include/gpu/MutableTextureState.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrBackendSemaphore.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrBackendSurface.h +6 -62
- package/cpp/skia/include/gpu/ganesh/GrContextThreadSafeProxy.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrDirectContext.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkarounds.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrRecordingContext.h +2 -1
- package/cpp/skia/include/gpu/ganesh/mock/GrMockBackendSurface.h +59 -0
- package/cpp/skia/include/gpu/ganesh/mock/GrMockTypes.h +1 -1
- package/cpp/skia/include/gpu/ganesh/mtl/GrMtlBackendContext.h +1 -1
- package/cpp/skia/include/gpu/ganesh/mtl/GrMtlTypes.h +1 -1
- package/cpp/skia/include/gpu/ganesh/vk/GrBackendDrawableInfo.h +1 -1
- package/cpp/skia/include/gpu/graphite/Context.h +11 -4
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +6 -0
- package/cpp/skia/include/gpu/graphite/Image.h +82 -9
- package/cpp/skia/include/gpu/graphite/PrecompileContext.h +7 -2
- package/cpp/skia/include/gpu/graphite/Recorder.h +6 -4
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileColorFilter.h +11 -1
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileShader.h +1 -0
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +1 -1
- package/cpp/skia/include/gpu/mtl/MtlMemoryAllocator.h +1 -1
- package/cpp/skia/include/gpu/vk/VulkanExtensions.h +1 -1
- package/cpp/skia/include/gpu/vk/VulkanMemoryAllocator.h +1 -1
- package/cpp/skia/include/gpu/vk/VulkanTypes.h +1 -1
- package/cpp/skia/include/ports/SkCFObject.h +1 -1
- package/cpp/skia/include/ports/SkFontMgr_Fontations.h +1 -1
- package/cpp/skia/include/ports/SkFontMgr_android_ndk.h +1 -1
- package/cpp/skia/include/ports/SkFontMgr_data.h +1 -1
- package/cpp/skia/include/ports/SkFontMgr_fuchsia.h +1 -1
- package/cpp/skia/include/ports/SkFontMgr_mac_ct.h +1 -1
- package/cpp/skia/include/ports/SkFontScanner_Fontations.h +1 -1
- package/cpp/skia/include/ports/SkFontScanner_FreeType.h +1 -1
- package/cpp/skia/include/ports/SkTypeface_fontations.h +1 -1
- package/cpp/skia/include/private/SkExif.h +1 -1
- package/cpp/skia/include/private/SkGainmapInfo.h +1 -1
- package/cpp/skia/include/private/SkGainmapShader.h +1 -1
- package/cpp/skia/include/private/SkHdrMetadata.h +21 -0
- package/cpp/skia/include/private/SkJpegGainmapEncoder.h +1 -1
- package/cpp/skia/include/private/SkPixelStorage.h +37 -0
- package/cpp/skia/include/private/SkXmp.h +1 -1
- package/cpp/skia/include/private/base/SkAssert.h +6 -5
- package/cpp/skia/include/private/base/SkContainers.h +1 -1
- package/cpp/skia/include/private/base/SkFeatures.h +30 -30
- package/cpp/skia/include/private/base/SkLog.h +1 -7
- package/cpp/skia/include/private/base/SkLogPriority.h +4 -5
- package/cpp/skia/include/private/base/SkMacros.h +1 -1
- package/cpp/skia/include/private/base/SkMalloc.h +1 -1
- package/cpp/skia/include/private/base/SkSafe32.h +1 -1
- package/cpp/skia/include/private/base/SkSpan_impl.h +1 -1
- package/cpp/skia/include/private/base/SkTDArray.h +13 -1
- package/cpp/skia/include/private/base/SkTPin.h +1 -1
- package/cpp/skia/include/private/base/SkTo.h +1 -1
- package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +1 -1
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +1 -1
- package/cpp/skia/include/private/chromium/SkCodecsICCProfileChromium.h +52 -0
- package/cpp/skia/include/private/chromium/SkExifChromium.h +26 -0
- package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +2 -1
- package/cpp/skia/include/private/gpu/vk/SkiaVulkan.h +1 -1
- package/cpp/skia/include/sksl/SkSLDebugTrace.h +1 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_icd.h +41 -51
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_layer.h +42 -53
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_platform.h +2 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std.h +158 -154
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std_decode.h +68 -65
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std_encode.h +90 -87
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std.h +9 -9
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std_decode.h +2 -2
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std_encode.h +82 -79
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std.h +24 -24
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std_decode.h +2 -2
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std_encode.h +95 -96
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_vp9std.h +151 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_vp9std_decode.h +68 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codecs_common.h +1 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +5 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +7 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_beta.h +291 -158
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +13174 -10113
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_directfb.h +23 -19
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_fuchsia.h +159 -165
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ggp.h +22 -19
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ios.h +3 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_macos.h +3 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_metal.h +94 -88
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ohos.h +120 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_screen.h +55 -51
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_vi.h +18 -15
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_wayland.h +23 -19
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_win32.h +31 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xcb.h +5 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xlib.h +27 -27
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xlib_xrandr.h +20 -16
- package/cpp/skia/include/utils/SkEventTracer.h +6 -1
- package/cpp/skia/include/utils/SkOrderedFontMgr.h +1 -1
- package/cpp/skia/include/utils/SkShadowUtils.h +1 -1
- package/cpp/skia/include/utils/SkTextUtils.h +1 -1
- package/cpp/skia/modules/jsonreader/SkJSONReader.cpp +20 -4
- package/cpp/skia/modules/skcms/src/Transform_inl.h +11 -15
- package/cpp/skia/modules/skcms/src/skcms_public.h +2 -0
- package/cpp/skia/modules/skottie/include/ExternalLayer.h +1 -1
- package/cpp/skia/modules/skottie/include/Skottie.h +1 -1
- package/cpp/skia/modules/skottie/include/SkottieProperty.h +1 -1
- package/cpp/skia/modules/skottie/include/SlotManager.h +1 -1
- package/cpp/skia/modules/skottie/include/TextShaper.h +1 -1
- package/cpp/skia/modules/skottie/src/SkottieValue.h +1 -1
- package/cpp/skia/modules/skottie/src/animator/Animator.h +1 -1
- package/cpp/skia/modules/skottie/src/text/Font.h +1 -1
- package/cpp/skia/modules/skottie/src/text/TextAdapter.h +1 -1
- package/cpp/skia/modules/skottie/src/text/TextAnimator.h +3 -2
- package/cpp/skia/modules/skottie/src/text/TextValue.h +1 -1
- package/cpp/skia/modules/skparagraph/include/DartTypes.h +1 -1
- package/cpp/skia/modules/skparagraph/include/FontArguments.h +1 -1
- package/cpp/skia/modules/skparagraph/include/FontCollection.h +5 -1
- package/cpp/skia/modules/skparagraph/include/Metrics.h +1 -1
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +1 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +1 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphCache.h +1 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphPainter.h +1 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphStyle.h +12 -5
- package/cpp/skia/modules/skparagraph/include/TextShadow.h +1 -1
- package/cpp/skia/modules/skparagraph/include/TextStyle.h +1 -1
- package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGClipEffect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGColorFilter.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGDraw.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGEffectNode.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGGeometryEffect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGGeometryNode.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGGradient.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGGroup.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGImage.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGInvalidationController.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGMaskEffect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGMerge.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGNode.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGOpacityEffect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGPaint.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGPath.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGPlane.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGRect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGRenderEffect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGRenderNode.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGScene.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGText.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGTransform.h +1 -1
- package/cpp/skia/modules/skshaper/include/SkShaper_coretext.h +8 -1
- package/cpp/skia/modules/svg/include/SkSVGFe.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeComponentTransfer.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeImage.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeMerge.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeMorphology.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFilter.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGGradient.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGImage.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGMask.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGPattern.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
- package/cpp/skia/src/base/SkAutoLocaleSetter.h +94 -0
- package/cpp/skia/src/base/SkUTF.h +1 -1
- package/lib/commonjs/skia/types/WebGPU.d.ts +70 -5
- package/lib/commonjs/skia/types/WebGPU.js.map +1 -1
- package/lib/module/skia/types/WebGPU.d.ts +70 -5
- package/lib/module/skia/types/WebGPU.js.map +1 -1
- package/lib/typescript/src/skia/types/WebGPU.d.ts +70 -5
- package/package.json +5 -5
- package/src/skia/types/WebGPU.ts +83 -5
|
@@ -52,18 +52,56 @@ using GraphitePromiseTextureReleaseProc = void (*)(GraphitePromiseTextureRelease
|
|
|
52
52
|
/** Creates an SkImage from a GPU texture associated with the recorder. The client is still
|
|
53
53
|
responsible for managing the backend texture's lifetime.
|
|
54
54
|
|
|
55
|
-
SkImage is returned if the format of backendTexture is recognized and supported.
|
|
56
|
-
|
|
55
|
+
SkImage is returned if the format of backendTexture is recognized and supported. Recognized
|
|
56
|
+
formats vary by GPU back-end.
|
|
57
|
+
|
|
58
|
+
The provided `alphaType` determines how the wrapped texture is sampled:
|
|
59
|
+
- kUnknown_SkAlphaType: Sampled as RGB1, ignoring any alpha data. G and B are automatically
|
|
60
|
+
treated as 0 if the format does not provide them. Single channel
|
|
61
|
+
texture formats are interpretd as the "red" SkColorTypes instead of
|
|
62
|
+
the "alpha-only" SkColorTypes.
|
|
63
|
+
- kOpaque_SkAlphaType: Sampled as RGBA but higher-level logic *assumes* that all A values are
|
|
64
|
+
equal to 1. Single channel texture formats are interpeted as "red"
|
|
65
|
+
instead of "alpha-only" for disambiguating SkColorTypes.
|
|
66
|
+
- kPremul_SkAlphaType: Sampled as RGBA and higher-level logic assumes the RGB values have
|
|
67
|
+
been premultiplied with the A value. Single channel texture formats
|
|
68
|
+
are interpreted as "alpha-only" color types (e.g. 000A or 000R
|
|
69
|
+
swizzles depending on the texture format).
|
|
70
|
+
- kUnpremul_SkAlphaType: Sampled as RGBA and higher-level logic assumes the RGB values have not
|
|
71
|
+
been multiplied with A yet. Single channel texture formats are
|
|
72
|
+
interpreted as "alpha-only" color types the same as
|
|
73
|
+
kPremul_SkAlphaType.
|
|
74
|
+
|
|
75
|
+
The SkColorType of the returned SkImage is selected to best match the bit depth and
|
|
76
|
+
representation of the texture format of the backend texture. This is not necessarily an exact
|
|
77
|
+
match since texture formats may have more options than SkColorType. Any mismatch between the
|
|
78
|
+
format and the SkColorType is handled automatically for read/write operations on the image (the
|
|
79
|
+
SkColorType represents how the image data will be made available on the CPU).
|
|
80
|
+
|
|
81
|
+
If possible, the color type will also take into account the behavior of `alphaType`, such as
|
|
82
|
+
using kRGB_888x_SkColorType for an RGBA8 texture with kUnknown_SkAlphaType. For single-channel
|
|
83
|
+
textures with kUnknown|kOpaque_SkAlphaType, the best "red-only" color type is chosen, e.g.
|
|
84
|
+
kR8_unorm_SkColorType. For single-channel textures with kPremul|kUnpremul_SkAlphaType, the best
|
|
85
|
+
"alpha-only" color type is chosen, e.g. kAlpha_8_SkColorType. This preserves the semantic
|
|
86
|
+
behaviors in Skia's high-level shading logic that treats red formats as color data, and
|
|
87
|
+
automatically colorizes alpha formats based on the paint's color or shader.
|
|
88
|
+
|
|
89
|
+
When using such a single-channel texture in a runtime effect, this semantic distinction defines
|
|
90
|
+
which channel of the float4 shader value has the interesting data (R001 vs 000A). When combining
|
|
91
|
+
multiple single-channel textures into a multiplaner YUV[A] SkImage, either colortype behaves the
|
|
92
|
+
same. The most significant distinction occurs when the SkImage is used in
|
|
93
|
+
SkCanvas::drawImageRect() or combined into a non-runtime SkShader.
|
|
57
94
|
|
|
58
95
|
@param recorder The recorder
|
|
59
96
|
@param backendTexture texture residing on GPU
|
|
60
|
-
@param
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
well (e.g.,
|
|
97
|
+
@param alphaType The nature of alpha channel data provided in the texture.
|
|
98
|
+
@param colorSpace This describes the color space of this image's contents, as seen
|
|
99
|
+
after sampling. In general, if the format of the backend texture
|
|
100
|
+
is SRGB, some linear colorSpace should be supplied (e.g.,
|
|
101
|
+
SkColorSpace::MakeSRGBLinear()). If the format of the backend
|
|
102
|
+
texture is linear, then the colorSpace should include a
|
|
103
|
+
description of the transfer function as well (e.g.,
|
|
104
|
+
SkColorSpace::MakeSRGB()).
|
|
67
105
|
@param origin Whether the Texture logically treats the origin as TopLeft or
|
|
68
106
|
BottomLeft
|
|
69
107
|
@param generateMipmapsFromBase If kYes then the pixel contents of the textures upper mipmap
|
|
@@ -74,6 +112,41 @@ using GraphitePromiseTextureReleaseProc = void (*)(GraphitePromiseTextureRelease
|
|
|
74
112
|
valid.
|
|
75
113
|
@return created SkImage, or nullptr
|
|
76
114
|
*/
|
|
115
|
+
SK_API sk_sp<SkImage> WrapTexture(skgpu::graphite::Recorder*,
|
|
116
|
+
const skgpu::graphite::BackendTexture&,
|
|
117
|
+
SkAlphaType alphaType,
|
|
118
|
+
sk_sp<SkColorSpace> colorSpace,
|
|
119
|
+
skgpu::Origin origin,
|
|
120
|
+
GenerateMipmapsFromBase genMipmaps,
|
|
121
|
+
TextureReleaseProc = nullptr,
|
|
122
|
+
ReleaseContext = nullptr,
|
|
123
|
+
std::string_view label = {});
|
|
124
|
+
|
|
125
|
+
SK_API inline sk_sp<SkImage> WrapTexture(skgpu::graphite::Recorder* recorder,
|
|
126
|
+
const skgpu::graphite::BackendTexture& backendTex,
|
|
127
|
+
SkAlphaType alphaType,
|
|
128
|
+
sk_sp<SkColorSpace> colorSpace,
|
|
129
|
+
skgpu::Origin origin,
|
|
130
|
+
TextureReleaseProc releaseP = nullptr,
|
|
131
|
+
ReleaseContext releaseC = nullptr,
|
|
132
|
+
std::string_view label = {}) {
|
|
133
|
+
return WrapTexture(recorder, backendTex, alphaType, std::move(colorSpace), origin,
|
|
134
|
+
GenerateMipmapsFromBase::kNo, releaseP, releaseC, label);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
SK_API inline sk_sp<SkImage> WrapTexture(skgpu::graphite::Recorder* recorder,
|
|
138
|
+
const skgpu::graphite::BackendTexture& backendTex,
|
|
139
|
+
SkAlphaType alphaType,
|
|
140
|
+
sk_sp<SkColorSpace> colorSpace,
|
|
141
|
+
TextureReleaseProc releaseP = nullptr,
|
|
142
|
+
ReleaseContext releaseC = nullptr,
|
|
143
|
+
std::string_view label = {}) {
|
|
144
|
+
return WrapTexture(recorder, backendTex, alphaType, std::move(colorSpace),
|
|
145
|
+
skgpu::Origin::kTopLeft, releaseP, releaseC, label);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// DEPRECATED: The WrapTexture calls that take an SkColorType are deprecated. Use the new versions
|
|
149
|
+
// that automatically pick a compatible color type from the texture's format.
|
|
77
150
|
SK_API sk_sp<SkImage> WrapTexture(skgpu::graphite::Recorder*,
|
|
78
151
|
const skgpu::graphite::BackendTexture&,
|
|
79
152
|
SkColorType colorType,
|
|
@@ -63,12 +63,17 @@ public:
|
|
|
63
63
|
bool precompile(sk_sp<SkData> serializedPipelineKey);
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
* Get a human-readable version of a serialized pipeline key
|
|
66
|
+
* Get a human-readable version of a serialized pipeline key and, optionally, the unique
|
|
67
|
+
* hash of the Pipeline.
|
|
67
68
|
*
|
|
68
69
|
* @param serializedPipelineKey serialized Pipeline key.
|
|
70
|
+
* @param uniqueHash If non-null, this will be filled in with the unique hash.
|
|
71
|
+
* Note that the uniqueHash is only valid for the lifetime
|
|
72
|
+
* of the Context used to create this PrecompileContext.
|
|
69
73
|
* @return A human-readable version of the provided key; "" on failure.
|
|
70
74
|
*/
|
|
71
|
-
std::string getPipelineLabel(sk_sp<SkData> serializedPipelineKey
|
|
75
|
+
std::string getPipelineLabel(sk_sp<SkData> serializedPipelineKey,
|
|
76
|
+
uint32_t* uniqueHash = nullptr);
|
|
72
77
|
|
|
73
78
|
// Provides access to functions that aren't part of the public API.
|
|
74
79
|
PrecompileContextPriv priv();
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
#include "include/private/base/SingleOwner.h"
|
|
18
18
|
#include "include/private/base/SkAPI.h"
|
|
19
19
|
#include "include/private/base/SkTArray.h"
|
|
20
|
-
#include "include/private/base/SkTDArray.h"
|
|
21
20
|
|
|
22
21
|
#include <chrono>
|
|
23
22
|
#include <cstddef>
|
|
@@ -210,9 +209,12 @@ public:
|
|
|
210
209
|
/**
|
|
211
210
|
* Purge GPU resources on the Recorder that haven't been used in the past 'msNotUsed'
|
|
212
211
|
* milliseconds or are otherwise marked for deletion, regardless of whether the context is under
|
|
213
|
-
* budget.
|
|
212
|
+
* budget. Optionally provide a `microsMaxPurgingDur` after which Skia should stop purging
|
|
213
|
+
* resources.
|
|
214
214
|
*/
|
|
215
|
-
void performDeferredCleanup(
|
|
215
|
+
void performDeferredCleanup(
|
|
216
|
+
std::chrono::milliseconds msNotUsed,
|
|
217
|
+
std::optional<std::chrono::microseconds> microsMaxPurgingDur = std::nullopt);
|
|
216
218
|
|
|
217
219
|
/**
|
|
218
220
|
* Returns the number of bytes of the Recorder's gpu memory cache budget that are currently in
|
|
@@ -281,7 +283,7 @@ private:
|
|
|
281
283
|
void deregisterDevice(const Device*);
|
|
282
284
|
|
|
283
285
|
SkCanvas* makeCaptureCanvas(SkCanvas*) override;
|
|
284
|
-
|
|
286
|
+
SkContentID createCaptureBreakpoint(SkSurface*) override;
|
|
285
287
|
|
|
286
288
|
sk_sp<SharedContext> fSharedContext;
|
|
287
289
|
ResourceProvider* fResourceProvider; // May point to the Context's resource provider
|
|
@@ -14,6 +14,8 @@ enum class SkBlendMode;
|
|
|
14
14
|
|
|
15
15
|
namespace skgpu::graphite {
|
|
16
16
|
|
|
17
|
+
class PrecompileColorFilterPriv;
|
|
18
|
+
|
|
17
19
|
/** \class PrecompileColorFilter
|
|
18
20
|
This class corresponds to the SkColorFilter class in the main API.
|
|
19
21
|
*/
|
|
@@ -36,9 +38,17 @@ public:
|
|
|
36
38
|
*/
|
|
37
39
|
sk_sp<PrecompileColorFilter> makeComposed(sk_sp<PrecompileColorFilter> inner) const;
|
|
38
40
|
|
|
41
|
+
// Provides access to functions that aren't part of the public API.
|
|
42
|
+
PrecompileColorFilterPriv priv();
|
|
43
|
+
const PrecompileColorFilterPriv priv() const; // NOLINT(readability-const-return-type)
|
|
44
|
+
|
|
39
45
|
protected:
|
|
46
|
+
friend class PrecompileColorFilterPriv;
|
|
47
|
+
|
|
40
48
|
PrecompileColorFilter() : PrecompileBase(Type::kColorFilter) {}
|
|
41
49
|
~PrecompileColorFilter() override;
|
|
50
|
+
|
|
51
|
+
virtual bool isAlphaUnchanged(int /*desiredCombination*/) const = 0;
|
|
42
52
|
};
|
|
43
53
|
|
|
44
54
|
//--------------------------------------------------------------------------------------------------
|
|
@@ -54,7 +64,7 @@ namespace PrecompileColorFilters {
|
|
|
54
64
|
SK_API sk_sp<PrecompileColorFilter> Blend(); // Prefer the explicit blend mode variant
|
|
55
65
|
|
|
56
66
|
// This encompasses both variants of SkColorFilters::Matrix
|
|
57
|
-
SK_API sk_sp<PrecompileColorFilter> Matrix();
|
|
67
|
+
SK_API sk_sp<PrecompileColorFilter> Matrix(bool clamp=true);
|
|
58
68
|
|
|
59
69
|
// This encompasses both variants of SkColorFilters::HSLAMatrix
|
|
60
70
|
SK_API sk_sp<PrecompileColorFilter> HSLAMatrix();
|
|
@@ -86,6 +86,7 @@ protected:
|
|
|
86
86
|
~PrecompileShader() override;
|
|
87
87
|
|
|
88
88
|
virtual bool isConstant(int /* desiredCombination */) const { return false; }
|
|
89
|
+
virtual bool isOpaque(int /* desiredCombination */) const = 0;
|
|
89
90
|
|
|
90
91
|
virtual bool isALocalMatrixShader() const { return false; }
|
|
91
92
|
};
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
#include "include/core/SkData.h"
|
|
13
13
|
#include "include/private/base/SkAPI.h"
|
|
14
14
|
|
|
15
|
+
#include <algorithm>
|
|
16
|
+
#include <cmath>
|
|
15
17
|
#include <memory>
|
|
16
18
|
#include <optional>
|
|
17
19
|
#include <vector>
|
|
@@ -54,6 +56,20 @@ struct SK_API ContentLightLevelInformation {
|
|
|
54
56
|
*/
|
|
55
57
|
sk_sp<SkData> serialize() const;
|
|
56
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Helper functions for accessing members as uint16_t, which is often needed when interacting
|
|
61
|
+
* with libraries using the CTA semantics.
|
|
62
|
+
*/
|
|
63
|
+
static ContentLightLevelInformation MakeUint16(uint16_t maxCLL, uint16_t maxFALL) {
|
|
64
|
+
return { .fMaxCLL = static_cast<float>(maxCLL), .fMaxFALL = static_cast<float>(maxFALL) };
|
|
65
|
+
}
|
|
66
|
+
uint16_t getUint16MaxCLL() const {
|
|
67
|
+
return static_cast<uint16_t>(std::clamp(std::round(fMaxCLL), 0.f, 65535.f));
|
|
68
|
+
}
|
|
69
|
+
uint16_t getUint16MaxFALL() const {
|
|
70
|
+
return static_cast<uint16_t>(std::clamp(std::round(fMaxFALL), 0.f, 65535.f));
|
|
71
|
+
}
|
|
72
|
+
|
|
57
73
|
/**
|
|
58
74
|
* Decode from the binary encoding listed at:
|
|
59
75
|
* Portable Network Graphics (PNG) Specification (Third Edition)
|
|
@@ -242,6 +258,11 @@ struct SK_API AdaptiveGlobalToneMap {
|
|
|
242
258
|
*/
|
|
243
259
|
SkString toString() const;
|
|
244
260
|
|
|
261
|
+
/**
|
|
262
|
+
* Return true if this metadata satisfies all normative constraints.
|
|
263
|
+
*/
|
|
264
|
+
bool isValid() const;
|
|
265
|
+
|
|
245
266
|
bool operator==(const AdaptiveGlobalToneMap& other) const {
|
|
246
267
|
return fHdrReferenceWhite == other.fHdrReferenceWhite &&
|
|
247
268
|
fHeadroomAdaptiveToneMap == other.fHeadroomAdaptiveToneMap;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 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 SkPixelStorage_DEFINED
|
|
9
|
+
#define SkPixelStorage_DEFINED
|
|
10
|
+
|
|
11
|
+
#include <cstdint>
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* SkPixelStorage is the class representing the storage block for pixel data. It serves as the
|
|
15
|
+
* abstract source of pixel memory—the 2D array of data—that is read from and written to by
|
|
16
|
+
* higher-level Skia objects like SkImage and SkSurface.
|
|
17
|
+
*/
|
|
18
|
+
class SkPixelStorage {
|
|
19
|
+
public:
|
|
20
|
+
SkPixelStorage();
|
|
21
|
+
virtual ~SkPixelStorage() = default;
|
|
22
|
+
|
|
23
|
+
enum Type {
|
|
24
|
+
kTextureProxy,
|
|
25
|
+
kPixelRef,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
uint32_t getPixelStorageId() const { return fID; }
|
|
29
|
+
virtual Type type() const = 0;
|
|
30
|
+
|
|
31
|
+
private:
|
|
32
|
+
uint32_t fID;
|
|
33
|
+
|
|
34
|
+
static uint32_t NextId();
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
#endif
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
#include "include/private/base/SkAPI.h"
|
|
12
12
|
#include "include/private/base/SkAttributes.h"
|
|
13
13
|
#include "include/private/base/SkDebug.h" // IWYU pragma: keep
|
|
14
|
+
#include "include/private/base/SkLog.h"
|
|
14
15
|
|
|
15
16
|
#include <cstddef>
|
|
16
17
|
#include <limits>
|
|
@@ -69,7 +70,7 @@
|
|
|
69
70
|
# endif
|
|
70
71
|
# define SK_ABORT(message, ...) \
|
|
71
72
|
do { \
|
|
72
|
-
|
|
73
|
+
SKIA_LOG_E(SK_DUMP_LINE_FORMAT ": fatal error: \"" message "\"", \
|
|
73
74
|
__FILE__, __LINE__, ##__VA_ARGS__); \
|
|
74
75
|
SK_DUMP_GOOGLE3_STACK(); \
|
|
75
76
|
sk_abort_no_print(); \
|
|
@@ -137,7 +138,7 @@
|
|
|
137
138
|
#endif
|
|
138
139
|
|
|
139
140
|
[[noreturn]] SK_API inline void sk_print_index_out_of_bounds(size_t i, size_t size) {
|
|
140
|
-
SK_ABORT("Index (%zu) out of bounds for size %zu
|
|
141
|
+
SK_ABORT("Index (%zu) out of bounds for size %zu.", i, size);
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
template <typename T> SK_API inline T sk_collection_check_bounds(T i, T size) {
|
|
@@ -155,7 +156,7 @@ template <typename T> SK_API inline T sk_collection_check_bounds(T i, T size) {
|
|
|
155
156
|
}
|
|
156
157
|
|
|
157
158
|
[[noreturn]] SK_API inline void sk_print_length_too_big(size_t i, size_t size) {
|
|
158
|
-
SK_ABORT("Length (%zu) is too big for size %zu
|
|
159
|
+
SK_ABORT("Length (%zu) is too big for size %zu.", i, size);
|
|
159
160
|
}
|
|
160
161
|
|
|
161
162
|
template <typename T> SK_API inline T sk_collection_check_length(T i, T size) {
|
|
@@ -175,7 +176,7 @@ template <typename T> SK_API inline T sk_collection_check_length(T i, T size) {
|
|
|
175
176
|
SK_API inline void sk_collection_not_empty(bool empty) {
|
|
176
177
|
if (empty) SK_UNLIKELY {
|
|
177
178
|
#if defined(SK_DEBUG)
|
|
178
|
-
SK_ABORT("Collection is empty
|
|
179
|
+
SK_ABORT("Collection is empty.");
|
|
179
180
|
#else
|
|
180
181
|
SkUNREACHABLE;
|
|
181
182
|
#endif
|
|
@@ -183,7 +184,7 @@ SK_API inline void sk_collection_not_empty(bool empty) {
|
|
|
183
184
|
}
|
|
184
185
|
|
|
185
186
|
[[noreturn]] SK_API inline void sk_print_size_too_big(size_t size, size_t maxSize) {
|
|
186
|
-
SK_ABORT("Size (%zu) can't be represented in bytes. Max size is %zu
|
|
187
|
+
SK_ABORT("Size (%zu) can't be represented in bytes. Max size is %zu.", size, maxSize);
|
|
187
188
|
}
|
|
188
189
|
|
|
189
190
|
template <typename T>
|
|
@@ -78,20 +78,20 @@
|
|
|
78
78
|
#endif
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* SK_CPU_X64_LEVEL
|
|
82
82
|
*
|
|
83
|
-
* If defined,
|
|
84
|
-
* On non-
|
|
83
|
+
* If defined, SK_CPU_X64_LEVEL should be set to the highest supported level.
|
|
84
|
+
* On non-Intel, non-AMD CPUs this should be undefined.
|
|
85
85
|
*/
|
|
86
|
-
#define
|
|
87
|
-
#define
|
|
88
|
-
#define
|
|
89
|
-
#define
|
|
90
|
-
#define
|
|
91
|
-
#define
|
|
92
|
-
#define
|
|
93
|
-
#define
|
|
94
|
-
#define
|
|
86
|
+
#define SK_CPU_X64_LEVEL_SSE1 10
|
|
87
|
+
#define SK_CPU_X64_LEVEL_SSE2 20
|
|
88
|
+
#define SK_CPU_X64_LEVEL_SSE3 30
|
|
89
|
+
#define SK_CPU_X64_LEVEL_SSSE3 31
|
|
90
|
+
#define SK_CPU_X64_LEVEL_SSE41 41
|
|
91
|
+
#define SK_CPU_X64_LEVEL_SSE42 42
|
|
92
|
+
#define SK_CPU_X64_LEVEL_AVX 51
|
|
93
|
+
#define SK_CPU_X64_LEVEL_AVX2 52
|
|
94
|
+
#define SK_CPU_X64_LEVEL_ML4 60
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
97
|
* SK_CPU_LSX_LEVEL
|
|
@@ -99,32 +99,32 @@
|
|
|
99
99
|
* If defined, SK_CPU_LSX_LEVEL should be set to the highest supported level.
|
|
100
100
|
* On non-loongarch CPU this should be undefined.
|
|
101
101
|
*/
|
|
102
|
-
#define SK_CPU_LSX_LEVEL_LSX
|
|
103
|
-
#define SK_CPU_LSX_LEVEL_LASX
|
|
102
|
+
#define SK_CPU_LSX_LEVEL_LSX 10
|
|
103
|
+
#define SK_CPU_LSX_LEVEL_LASX 20
|
|
104
104
|
|
|
105
105
|
// TODO(kjlubick) clean up these checks
|
|
106
106
|
|
|
107
107
|
// Are we in GCC/Clang?
|
|
108
|
-
#ifndef
|
|
108
|
+
#ifndef SK_CPU_X64_LEVEL
|
|
109
109
|
// These checks must be done in descending order to ensure we set the highest
|
|
110
110
|
// available SSE level.
|
|
111
111
|
#if defined(__AVX512F__) && defined(__AVX512DQ__) && defined(__AVX512CD__) && \
|
|
112
112
|
defined(__AVX512BW__) && defined(__AVX512VL__)
|
|
113
|
-
#define
|
|
113
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_ML4
|
|
114
114
|
#elif defined(__AVX2__)
|
|
115
|
-
#define
|
|
115
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_AVX2
|
|
116
116
|
#elif defined(__AVX__)
|
|
117
|
-
#define
|
|
117
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_AVX
|
|
118
118
|
#elif defined(__SSE4_2__)
|
|
119
|
-
#define
|
|
119
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE42
|
|
120
120
|
#elif defined(__SSE4_1__)
|
|
121
|
-
#define
|
|
121
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE41
|
|
122
122
|
#elif defined(__SSSE3__)
|
|
123
|
-
#define
|
|
123
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSSE3
|
|
124
124
|
#elif defined(__SSE3__)
|
|
125
|
-
#define
|
|
125
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE3
|
|
126
126
|
#elif defined(__SSE2__)
|
|
127
|
-
#define
|
|
127
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE2
|
|
128
128
|
#endif
|
|
129
129
|
#endif
|
|
130
130
|
|
|
@@ -137,23 +137,23 @@
|
|
|
137
137
|
#endif
|
|
138
138
|
|
|
139
139
|
// Are we in VisualStudio?
|
|
140
|
-
#ifndef
|
|
140
|
+
#ifndef SK_CPU_X64_LEVEL
|
|
141
141
|
// These checks must be done in descending order to ensure we set the highest
|
|
142
142
|
// available SSE level. 64-bit intel guarantees at least SSE2 support.
|
|
143
143
|
#if defined(__AVX512F__) && defined(__AVX512DQ__) && defined(__AVX512CD__) && \
|
|
144
144
|
defined(__AVX512BW__) && defined(__AVX512VL__)
|
|
145
|
-
#define
|
|
145
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_ML4
|
|
146
146
|
#elif defined(__AVX2__)
|
|
147
|
-
#define
|
|
147
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_AVX2
|
|
148
148
|
#elif defined(__AVX__)
|
|
149
|
-
#define
|
|
149
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_AVX
|
|
150
150
|
#elif defined(_M_X64) || defined(_M_AMD64)
|
|
151
|
-
#define
|
|
151
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE2
|
|
152
152
|
#elif defined(_M_IX86_FP)
|
|
153
153
|
#if _M_IX86_FP >= 2
|
|
154
|
-
#define
|
|
154
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE2
|
|
155
155
|
#elif _M_IX86_FP == 1
|
|
156
|
-
#define
|
|
156
|
+
#define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE1
|
|
157
157
|
#endif
|
|
158
158
|
#endif
|
|
159
159
|
#endif
|
|
@@ -50,16 +50,10 @@ void SK_SPI SkLog(SkLogPriority priority, const char format[], ...) SK_PRINTF_LI
|
|
|
50
50
|
#define SKIA_LOG(priority, fmt, ...) \
|
|
51
51
|
do { \
|
|
52
52
|
if constexpr (priority <= SKIA_LOWEST_ACTIVE_LOG_PRIORITY) { \
|
|
53
|
-
|
|
54
|
-
SK_ABORT("[skia] " fmt, ##__VA_ARGS__); \
|
|
55
|
-
} \
|
|
56
|
-
else { \
|
|
57
|
-
SkLog(priority, "[skia] " fmt "\n", ##__VA_ARGS__); \
|
|
58
|
-
} \
|
|
53
|
+
SkLog(priority, "[skia] " fmt "\n", ##__VA_ARGS__); \
|
|
59
54
|
} \
|
|
60
55
|
} while (0)
|
|
61
56
|
|
|
62
|
-
#define SKIA_LOG_F(fmt, ...) SKIA_LOG(SkLogPriority::kFatal, "** ERROR ** " fmt, ##__VA_ARGS__)
|
|
63
57
|
#define SKIA_LOG_E(fmt, ...) SKIA_LOG(SkLogPriority::kError, "** ERROR ** " fmt, ##__VA_ARGS__)
|
|
64
58
|
#define SKIA_LOG_W(fmt, ...) SKIA_LOG(SkLogPriority::kWarning, "WARNING - " fmt, ##__VA_ARGS__)
|
|
65
59
|
#define SKIA_LOG_I(fmt, ...) SKIA_LOG(SkLogPriority::kInfo, fmt, ##__VA_ARGS__)
|
|
@@ -25,11 +25,10 @@
|
|
|
25
25
|
* However, debug logs would be omitted.
|
|
26
26
|
*/
|
|
27
27
|
enum class SkLogPriority : int {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
kDebug = 4,
|
|
28
|
+
kError = 0,
|
|
29
|
+
kWarning = 1,
|
|
30
|
+
kInfo = 2,
|
|
31
|
+
kDebug = 3,
|
|
33
32
|
};
|
|
34
33
|
|
|
35
34
|
#endif // SkLogPriority_DEFINED
|