@shopify/react-native-skia 0.1.192 → 0.1.193
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 -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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/*
|
|
3
2
|
* Copyright 2006 The Android Open Source Project
|
|
4
3
|
*
|
|
@@ -6,7 +5,6 @@
|
|
|
6
5
|
* found in the LICENSE file.
|
|
7
6
|
*/
|
|
8
7
|
|
|
9
|
-
|
|
10
8
|
#ifndef SkUserConfig_DEFINED
|
|
11
9
|
#define SkUserConfig_DEFINED
|
|
12
10
|
|
|
@@ -16,9 +14,9 @@
|
|
|
16
14
|
|
|
17
15
|
Below are optional defines that add, subtract, or change default behavior
|
|
18
16
|
in Skia. Your port can locally edit this file to enable/disable flags as
|
|
19
|
-
you choose, or these can be
|
|
17
|
+
you choose, or these can be declared on your command line (i.e. -Dfoo).
|
|
20
18
|
|
|
21
|
-
By default, this include file will always default to having all
|
|
19
|
+
By default, this #include file will always default to having all the flags
|
|
22
20
|
commented out, so including it will have no effect.
|
|
23
21
|
*/
|
|
24
22
|
|
|
@@ -32,58 +30,92 @@
|
|
|
32
30
|
By default, these mutually exclusive flags are defined in SkTypes.h,
|
|
33
31
|
based on the presence or absence of NDEBUG, but that decision can be changed
|
|
34
32
|
here.
|
|
35
|
-
|
|
33
|
+
*/
|
|
36
34
|
//#define SK_DEBUG
|
|
37
35
|
//#define SK_RELEASE
|
|
38
36
|
|
|
39
37
|
/* To write debug messages to a console, skia will call SkDebugf(...) following
|
|
40
38
|
printf conventions (e.g. const char* format, ...). If you want to redirect
|
|
41
39
|
this to something other than printf, define yours here
|
|
42
|
-
|
|
40
|
+
*/
|
|
43
41
|
//#define SkDebugf(...) MyFunction(__VA_ARGS__)
|
|
44
42
|
|
|
45
|
-
/*
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
/* Skia has both debug and release asserts. When an assert fails SK_ABORT will
|
|
44
|
+
be used to report an abort message. SK_ABORT is expected not to return. Skia
|
|
45
|
+
provides a default implementation which will print the message with SkDebugf
|
|
46
|
+
and then call sk_abort_no_print.
|
|
47
|
+
*/
|
|
48
|
+
//#define SK_ABORT(message, ...)
|
|
49
|
+
|
|
50
|
+
/* To specify a different default font strike cache memory limit, define this. If this is
|
|
51
|
+
undefined, skia will use a built-in value.
|
|
52
|
+
*/
|
|
49
53
|
//#define SK_DEFAULT_FONT_CACHE_LIMIT (1024 * 1024)
|
|
50
54
|
|
|
51
|
-
/*
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
/* To specify a different default font strike cache count limit, define this. If this is
|
|
56
|
+
undefined, skia will use a built-in value.
|
|
57
|
+
*/
|
|
58
|
+
// #define SK_DEFAULT_FONT_CACHE_COUNT_LIMIT 2048
|
|
59
|
+
|
|
60
|
+
/* To specify the default size of the image cache, undefine this and set it to
|
|
61
|
+
the desired value (in bytes). SkGraphics.h as a runtime API to set this
|
|
62
|
+
value as well. If this is undefined, a built-in value will be used.
|
|
63
|
+
*/
|
|
56
64
|
//#define SK_DEFAULT_IMAGE_CACHE_LIMIT (1024 * 1024)
|
|
57
65
|
|
|
58
66
|
/* Define this to set the upper limit for text to support LCD. Values that
|
|
59
67
|
are very large increase the cost in the font cache and draw slower, without
|
|
60
68
|
improving readability. If this is undefined, Skia will use its default
|
|
61
69
|
value (e.g. 48)
|
|
62
|
-
|
|
70
|
+
*/
|
|
63
71
|
//#define SK_MAX_SIZE_FOR_LCDTEXT 48
|
|
64
72
|
|
|
65
73
|
/* Change the kN32_SkColorType ordering to BGRA to work in X windows.
|
|
66
|
-
|
|
74
|
+
*/
|
|
67
75
|
//#define SK_R32_SHIFT 16
|
|
68
76
|
|
|
69
|
-
|
|
70
|
-
/* Determines whether to build code that supports the GPU backend. Some classes
|
|
77
|
+
/* Determines whether to build code that supports the Ganesh GPU backend. Some classes
|
|
71
78
|
that are not GPU-specific, such as SkShader subclasses, have optional code
|
|
72
|
-
that is used allows them to interact with
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
that is used allows them to interact with this GPU backend. If you'd like to
|
|
80
|
+
include this code, include -DSK_GANESH in your cflags or uncomment below.
|
|
81
|
+
Defaults to not set (No Ganesh GPU backend).
|
|
82
|
+
This define affects the ABI of Skia, so make sure it matches the client which uses
|
|
83
|
+
the compiled version of Skia.
|
|
84
|
+
*/
|
|
85
|
+
//#define SK_GANESH
|
|
78
86
|
|
|
79
87
|
/* Skia makes use of histogram logging macros to trace the frequency of
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
events. By default, Skia provides no-op versions of these macros.
|
|
89
|
+
Skia consumers can provide their own definitions of these macros to
|
|
90
|
+
integrate with their histogram collection backend.
|
|
91
|
+
*/
|
|
84
92
|
//#define SK_HISTOGRAM_BOOLEAN(name, sample)
|
|
85
93
|
//#define SK_HISTOGRAM_ENUMERATION(name, sample, enum_size)
|
|
86
94
|
//#define SK_HISTOGRAM_EXACT_LINEAR(name, sample, value_max)
|
|
87
95
|
//#define SK_HISTOGRAM_MEMORY_KB(name, sample)
|
|
88
96
|
|
|
97
|
+
/* Skia tries to make use of some non-standard C++ language extensions.
|
|
98
|
+
By default, Skia provides msvc and clang/gcc versions of these macros.
|
|
99
|
+
Skia consumers can provide their own definitions of these macros to
|
|
100
|
+
integrate with their own compilers and build system.
|
|
101
|
+
*/
|
|
102
|
+
//#define SK_UNUSED [[maybe_unused]]
|
|
103
|
+
//#define SK_WARN_UNUSED_RESULT [[nodiscard]]
|
|
104
|
+
//#define SK_ALWAYS_INLINE inline __attribute__((always_inline))
|
|
105
|
+
//#define SK_NEVER_INLINE __attribute__((noinline))
|
|
106
|
+
//#define SK_PRINTF_LIKE(A, B) __attribute__((format(printf, (A), (B))))
|
|
107
|
+
//#define SK_NO_SANITIZE(A) __attribute__((no_sanitize(A)))
|
|
108
|
+
//#define SK_TRIVIAL_ABI [[clang::trivial_abi]]
|
|
109
|
+
|
|
110
|
+
/*
|
|
111
|
+
* If compiling Skia as a DLL, public APIs should be exported. Skia will set
|
|
112
|
+
* SK_API to something sensible for Clang and MSVC, but if clients need to
|
|
113
|
+
* customize it for their build system or compiler, they may.
|
|
114
|
+
* If a client needs to use SK_API (e.g. overriding SK_ABORT), then they
|
|
115
|
+
* *must* define their own, the default will not be defined prior to loading
|
|
116
|
+
* this file.
|
|
117
|
+
*/
|
|
118
|
+
//#define SK_API __declspec(dllexport)
|
|
119
|
+
|
|
120
|
+
|
|
89
121
|
#endif
|
|
@@ -8,24 +8,32 @@
|
|
|
8
8
|
#ifndef SkBitmap_DEFINED
|
|
9
9
|
#define SkBitmap_DEFINED
|
|
10
10
|
|
|
11
|
+
#include "include/core/SkAlphaType.h"
|
|
11
12
|
#include "include/core/SkColor.h"
|
|
12
13
|
#include "include/core/SkImageInfo.h"
|
|
13
|
-
#include "include/core/SkMatrix.h"
|
|
14
14
|
#include "include/core/SkPixmap.h"
|
|
15
15
|
#include "include/core/SkPoint.h"
|
|
16
|
+
#include "include/core/SkRect.h"
|
|
16
17
|
#include "include/core/SkRefCnt.h"
|
|
17
|
-
#include "include/core/
|
|
18
|
-
#include "include/core/
|
|
18
|
+
#include "include/core/SkSamplingOptions.h"
|
|
19
|
+
#include "include/core/SkSize.h"
|
|
20
|
+
#include "include/core/SkTypes.h"
|
|
21
|
+
#include "include/private/base/SkCPUTypes.h"
|
|
22
|
+
#include "include/private/base/SkDebug.h"
|
|
23
|
+
|
|
24
|
+
#include <cstddef>
|
|
25
|
+
#include <cstdint>
|
|
19
26
|
|
|
20
|
-
class SkBitmap;
|
|
21
27
|
class SkColorSpace;
|
|
22
|
-
|
|
28
|
+
class SkImage;
|
|
29
|
+
class SkMatrix;
|
|
23
30
|
class SkMipmap;
|
|
24
|
-
struct SkIRect;
|
|
25
|
-
struct SkRect;
|
|
26
31
|
class SkPaint;
|
|
27
32
|
class SkPixelRef;
|
|
28
33
|
class SkShader;
|
|
34
|
+
enum SkColorType : int;
|
|
35
|
+
enum class SkTileMode;
|
|
36
|
+
struct SkMask;
|
|
29
37
|
|
|
30
38
|
/** \class SkBitmap
|
|
31
39
|
SkBitmap describes a two-dimensional raster pixel array. SkBitmap is built on
|
|
@@ -766,11 +774,10 @@ public:
|
|
|
766
774
|
treated as opaque. If colorType() is kAlpha_8_SkColorType, then RGB is ignored.
|
|
767
775
|
|
|
768
776
|
@param c unpremultiplied color
|
|
769
|
-
@param colorSpace SkColorSpace of c
|
|
770
777
|
|
|
771
778
|
example: https://fiddle.skia.org/c/@Bitmap_eraseColor
|
|
772
779
|
*/
|
|
773
|
-
void eraseColor(SkColor4f
|
|
780
|
+
void eraseColor(SkColor4f) const;
|
|
774
781
|
|
|
775
782
|
/** Replaces pixel values with c, interpreted as being in the sRGB SkColorSpace.
|
|
776
783
|
All pixels contained by bounds() are affected. If the colorType() is
|
|
@@ -810,11 +817,9 @@ public:
|
|
|
810
817
|
|
|
811
818
|
@param c unpremultiplied color
|
|
812
819
|
@param area rectangle to fill
|
|
813
|
-
@param colorSpace SkColorSpace of c
|
|
814
820
|
|
|
815
821
|
example: https://fiddle.skia.org/c/@Bitmap_erase
|
|
816
822
|
*/
|
|
817
|
-
void erase(SkColor4f c, SkColorSpace* colorSpace, const SkIRect& area) const;
|
|
818
823
|
void erase(SkColor4f c, const SkIRect& area) const;
|
|
819
824
|
|
|
820
825
|
/** Replaces pixel values inside area with c. interpreted as being in the sRGB
|
|
@@ -1168,23 +1173,18 @@ public:
|
|
|
1168
1173
|
example: https://fiddle.skia.org/c/@Bitmap_peekPixels
|
|
1169
1174
|
*/
|
|
1170
1175
|
bool peekPixels(SkPixmap* pixmap) const;
|
|
1171
|
-
sk_sp<SkShader> makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions&,
|
|
1172
|
-
const SkMatrix* = nullptr) const;
|
|
1173
1176
|
|
|
1177
|
+
/**
|
|
1178
|
+
* Make a shader with the specified tiling, matrix and sampling.
|
|
1179
|
+
*/
|
|
1180
|
+
sk_sp<SkShader> makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions&,
|
|
1181
|
+
const SkMatrix* localMatrix = nullptr) const;
|
|
1174
1182
|
sk_sp<SkShader> makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions& sampling,
|
|
1175
|
-
const SkMatrix&
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
sk_sp<SkShader> makeShader(const SkSamplingOptions& sampling,
|
|
1180
|
-
const SkMatrix* localMatrix = nullptr) const {
|
|
1181
|
-
return this->makeShader(SkTileMode::kClamp, SkTileMode::kClamp, sampling, localMatrix);
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1183
|
+
const SkMatrix& lm) const;
|
|
1184
|
+
/** Defaults to clamp in both X and Y. */
|
|
1185
|
+
sk_sp<SkShader> makeShader(const SkSamplingOptions& sampling, const SkMatrix& lm) const;
|
|
1184
1186
|
sk_sp<SkShader> makeShader(const SkSamplingOptions& sampling,
|
|
1185
|
-
const SkMatrix
|
|
1186
|
-
return this->makeShader(sampling, &localMatrix);
|
|
1187
|
-
}
|
|
1187
|
+
const SkMatrix* lm = nullptr) const;
|
|
1188
1188
|
|
|
1189
1189
|
/**
|
|
1190
1190
|
* Returns a new image from the bitmap. If the bitmap is marked immutable, this will
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
#include "include/core/SkClipOp.h"
|
|
13
13
|
#include "include/core/SkColor.h"
|
|
14
14
|
#include "include/core/SkFontTypes.h"
|
|
15
|
+
#include "include/core/SkImageFilter.h"
|
|
15
16
|
#include "include/core/SkImageInfo.h"
|
|
16
17
|
#include "include/core/SkM44.h"
|
|
17
18
|
#include "include/core/SkMatrix.h"
|
|
@@ -26,13 +27,13 @@
|
|
|
26
27
|
#include "include/core/SkString.h"
|
|
27
28
|
#include "include/core/SkSurfaceProps.h"
|
|
28
29
|
#include "include/core/SkTypes.h"
|
|
29
|
-
#include "include/private/
|
|
30
|
-
#include "include/private/
|
|
30
|
+
#include "include/private/base/SkCPUTypes.h"
|
|
31
|
+
#include "include/private/base/SkDeque.h"
|
|
31
32
|
|
|
33
|
+
#include <cstdint>
|
|
32
34
|
#include <cstring>
|
|
33
35
|
#include <memory>
|
|
34
36
|
#include <optional>
|
|
35
|
-
#include <vector>
|
|
36
37
|
|
|
37
38
|
#ifndef SK_SUPPORT_LEGACY_GETTOTALMATRIX
|
|
38
39
|
#define SK_SUPPORT_LEGACY_GETTOTALMATRIX
|
|
@@ -44,34 +45,39 @@ class GlyphRunList;
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
class AutoLayerForImageFilter;
|
|
47
|
-
class GrBackendRenderTarget;
|
|
48
48
|
class GrRecordingContext;
|
|
49
|
+
|
|
49
50
|
class SkBaseDevice;
|
|
50
51
|
class SkBitmap;
|
|
52
|
+
class SkBlender;
|
|
51
53
|
class SkData;
|
|
52
54
|
class SkDrawable;
|
|
53
|
-
struct SkDrawShadowRec;
|
|
54
55
|
class SkFont;
|
|
55
56
|
class SkImage;
|
|
56
|
-
class
|
|
57
|
+
class SkMesh;
|
|
57
58
|
class SkPaintFilterCanvas;
|
|
58
59
|
class SkPath;
|
|
59
60
|
class SkPicture;
|
|
60
61
|
class SkPixmap;
|
|
61
|
-
class SkRegion;
|
|
62
62
|
class SkRRect;
|
|
63
|
-
|
|
64
|
-
class
|
|
63
|
+
class SkRegion;
|
|
64
|
+
class SkShader;
|
|
65
65
|
class SkSpecialImage;
|
|
66
66
|
class SkSurface;
|
|
67
67
|
class SkSurface_Base;
|
|
68
68
|
class SkTextBlob;
|
|
69
69
|
class SkVertices;
|
|
70
|
+
struct SkDrawShadowRec;
|
|
71
|
+
struct SkRSXform;
|
|
70
72
|
|
|
71
73
|
namespace skgpu::graphite { class Recorder; }
|
|
72
74
|
namespace sktext::gpu { class Slug; }
|
|
73
75
|
namespace SkRecords { class Draw; }
|
|
74
76
|
|
|
77
|
+
#if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) && defined(SK_GANESH)
|
|
78
|
+
class GrBackendRenderTarget;
|
|
79
|
+
#endif
|
|
80
|
+
|
|
75
81
|
// TODO:
|
|
76
82
|
// This is not ideal but Chrome is depending on a forward decl of GrSlug here.
|
|
77
83
|
// It should be removed once Chrome has migrated to sktext::gpu::Slug.
|
|
@@ -650,7 +656,7 @@ public:
|
|
|
650
656
|
SkRect bounds suggests but does not define layer size. To clip drawing to
|
|
651
657
|
a specific rectangle, use clipRect().
|
|
652
658
|
|
|
653
|
-
alpha of zero is fully transparent,
|
|
659
|
+
alpha of zero is fully transparent, 1.0f is fully opaque.
|
|
654
660
|
|
|
655
661
|
Call restoreToCount() with returned value to restore this and subsequent saves.
|
|
656
662
|
|
|
@@ -660,7 +666,11 @@ public:
|
|
|
660
666
|
|
|
661
667
|
example: https://fiddle.skia.org/c/@Canvas_saveLayerAlpha
|
|
662
668
|
*/
|
|
663
|
-
int
|
|
669
|
+
int saveLayerAlphaf(const SkRect* bounds, float alpha);
|
|
670
|
+
// Helper that accepts an int between 0 and 255, and divides it by 255.0
|
|
671
|
+
int saveLayerAlpha(const SkRect* bounds, U8CPU alpha) {
|
|
672
|
+
return this->saveLayerAlphaf(bounds, alpha * (1.0f / 255));
|
|
673
|
+
}
|
|
664
674
|
|
|
665
675
|
/** \enum SkCanvas::SaveLayerFlagsSet
|
|
666
676
|
SaveLayerFlags provides options that may be used in any combination in SaveLayerRec,
|
|
@@ -2173,7 +2183,7 @@ public:
|
|
|
2173
2183
|
|
|
2174
2184
|
///////////////////////////////////////////////////////////////////////////
|
|
2175
2185
|
|
|
2176
|
-
#if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) &&
|
|
2186
|
+
#if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) && defined(SK_GANESH)
|
|
2177
2187
|
// These methods exist to support WebView in Android Framework.
|
|
2178
2188
|
SkIRect topLayerBounds() const;
|
|
2179
2189
|
GrBackendRenderTarget topLayerBackendRenderTarget() const;
|
|
@@ -2290,7 +2300,7 @@ protected:
|
|
|
2290
2300
|
|
|
2291
2301
|
virtual void onDiscard();
|
|
2292
2302
|
|
|
2293
|
-
#if (
|
|
2303
|
+
#if (defined(SK_GANESH) || defined(SK_GRAPHITE))
|
|
2294
2304
|
/** Experimental
|
|
2295
2305
|
*/
|
|
2296
2306
|
virtual sk_sp<sktext::gpu::Slug> onConvertGlyphRunListToSlug(
|
|
@@ -2352,6 +2362,13 @@ private:
|
|
|
2352
2362
|
|
|
2353
2363
|
// Encapsulate state needed to restore from saveBehind()
|
|
2354
2364
|
struct BackImage {
|
|
2365
|
+
// Out of line to avoid including SkSpecialImage.h
|
|
2366
|
+
BackImage(sk_sp<SkSpecialImage>, SkIPoint);
|
|
2367
|
+
BackImage(const BackImage&);
|
|
2368
|
+
BackImage(BackImage&&);
|
|
2369
|
+
BackImage& operator=(const BackImage&);
|
|
2370
|
+
~BackImage();
|
|
2371
|
+
|
|
2355
2372
|
sk_sp<SkSpecialImage> fImage;
|
|
2356
2373
|
SkIPoint fLoc;
|
|
2357
2374
|
};
|
|
@@ -2406,7 +2423,7 @@ private:
|
|
|
2406
2423
|
fSurfaceBase = sb;
|
|
2407
2424
|
}
|
|
2408
2425
|
friend class SkSurface_Base;
|
|
2409
|
-
friend class
|
|
2426
|
+
friend class SkSurface_Ganesh;
|
|
2410
2427
|
|
|
2411
2428
|
SkIRect fClipRestrictionRect = SkIRect::MakeEmpty();
|
|
2412
2429
|
int fClipRestrictionSaveCount = -1;
|
|
@@ -2440,7 +2457,7 @@ private:
|
|
|
2440
2457
|
SkCanvas& operator=(SkCanvas&&) = delete;
|
|
2441
2458
|
SkCanvas& operator=(const SkCanvas&) = delete;
|
|
2442
2459
|
|
|
2443
|
-
#if (
|
|
2460
|
+
#if (defined(SK_GANESH) || defined(SK_GRAPHITE))
|
|
2444
2461
|
friend class sktext::gpu::Slug;
|
|
2445
2462
|
/** Experimental
|
|
2446
2463
|
* Convert a SkTextBlob to a sktext::gpu::Slug using the current canvas state.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
namespace SkSL { struct ShaderCaps; }
|
|
16
16
|
#endif
|
|
17
17
|
|
|
18
|
-
#if defined(
|
|
18
|
+
#if defined(SK_GRAPHITE)
|
|
19
19
|
namespace skgpu::graphite { class Caps; }
|
|
20
20
|
#endif
|
|
21
21
|
|
|
@@ -28,7 +28,7 @@ public:
|
|
|
28
28
|
#endif
|
|
29
29
|
|
|
30
30
|
protected:
|
|
31
|
-
#if defined(
|
|
31
|
+
#if defined(SK_GRAPHITE)
|
|
32
32
|
friend class skgpu::graphite::Caps; // for ctor
|
|
33
33
|
#endif
|
|
34
34
|
|
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
#define SkColorPriv_DEFINED
|
|
10
10
|
|
|
11
11
|
#include "include/core/SkColor.h"
|
|
12
|
-
#include "include/
|
|
13
|
-
#include "include/private/SkTPin.h"
|
|
14
|
-
#include "include/private/SkTo.h"
|
|
12
|
+
#include "include/private/base/SkMath.h"
|
|
13
|
+
#include "include/private/base/SkTPin.h"
|
|
14
|
+
#include "include/private/base/SkTo.h"
|
|
15
|
+
|
|
16
|
+
#include <algorithm>
|
|
15
17
|
|
|
16
18
|
/** Turn 0..255 into 0..256 by adding 1 at the half-way point. Used to turn a
|
|
17
19
|
byte into a scale value, so that we can say scale * value >> 8 instead of
|
|
@@ -146,7 +148,20 @@ static SK_ALWAYS_INLINE uint32_t SkAlphaMulQ(uint32_t c, unsigned scale) {
|
|
|
146
148
|
}
|
|
147
149
|
|
|
148
150
|
static inline SkPMColor SkPMSrcOver(SkPMColor src, SkPMColor dst) {
|
|
149
|
-
|
|
151
|
+
uint32_t scale = SkAlpha255To256(255 - SkGetPackedA32(src));
|
|
152
|
+
|
|
153
|
+
uint32_t mask = 0xFF00FF;
|
|
154
|
+
uint32_t rb = (((dst & mask) * scale) >> 8) & mask;
|
|
155
|
+
uint32_t ag = (((dst >> 8) & mask) * scale) & ~mask;
|
|
156
|
+
|
|
157
|
+
rb += (src & mask);
|
|
158
|
+
ag += (src & ~mask);
|
|
159
|
+
|
|
160
|
+
// Color channels (but not alpha) can overflow, so we have to saturate to 0xFF in each lane.
|
|
161
|
+
return std::min(rb & 0x000001FF, 0x000000FFU) |
|
|
162
|
+
std::min(ag & 0x0001FF00, 0x0000FF00U) |
|
|
163
|
+
std::min(rb & 0x01FF0000, 0x00FF0000U) |
|
|
164
|
+
(ag & 0xFF000000);
|
|
150
165
|
}
|
|
151
166
|
|
|
152
167
|
#endif
|
|
@@ -9,10 +9,13 @@
|
|
|
9
9
|
#define SkColorSpace_DEFINED
|
|
10
10
|
|
|
11
11
|
#include "include/core/SkRefCnt.h"
|
|
12
|
-
#include "include/
|
|
13
|
-
#include "include/private/
|
|
12
|
+
#include "include/core/SkTypes.h"
|
|
13
|
+
#include "include/private/base/SkFixed.h"
|
|
14
|
+
#include "include/private/base/SkOnce.h"
|
|
14
15
|
#include "modules/skcms/skcms.h"
|
|
15
|
-
|
|
16
|
+
|
|
17
|
+
#include <cstddef>
|
|
18
|
+
#include <cstdint>
|
|
16
19
|
|
|
17
20
|
class SkData;
|
|
18
21
|
|
|
@@ -147,8 +150,7 @@ public:
|
|
|
147
150
|
bool isNumericalTransferFn(skcms_TransferFunction* fn) const;
|
|
148
151
|
|
|
149
152
|
/**
|
|
150
|
-
* Returns true and sets |toXYZD50
|
|
151
|
-
* Returns false otherwise.
|
|
153
|
+
* Returns true and sets |toXYZD50|.
|
|
152
154
|
*/
|
|
153
155
|
bool toXYZD50(skcms_Matrix3x3* toXYZD50) const;
|
|
154
156
|
|
|
@@ -160,23 +162,19 @@ public:
|
|
|
160
162
|
|
|
161
163
|
/**
|
|
162
164
|
* Returns a color space with the same gamut as this one, but with a linear gamma.
|
|
163
|
-
* For color spaces whose gamut can not be described in terms of XYZ D50, returns
|
|
164
|
-
* linear sRGB.
|
|
165
165
|
*/
|
|
166
166
|
sk_sp<SkColorSpace> makeLinearGamma() const;
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
|
-
* Returns a color space with the same gamut as this one,
|
|
170
|
-
* function.
|
|
171
|
-
* sRGB.
|
|
169
|
+
* Returns a color space with the same gamut as this one, but with the sRGB transfer
|
|
170
|
+
* function.
|
|
172
171
|
*/
|
|
173
172
|
sk_sp<SkColorSpace> makeSRGBGamma() const;
|
|
174
173
|
|
|
175
174
|
/**
|
|
176
175
|
* Returns a color space with the same transfer function as this one, but with the primary
|
|
177
|
-
* colors rotated.
|
|
178
|
-
* (when applied to a source), and maps RGB to BRG (when applied to a destination).
|
|
179
|
-
* types of color spaces, returns nullptr.
|
|
176
|
+
* colors rotated. In other words, this produces a new color space that maps RGB to GBR
|
|
177
|
+
* (when applied to a source), and maps RGB to BRG (when applied to a destination).
|
|
180
178
|
*
|
|
181
179
|
* This is used for testing, to construct color spaces that have severe and testable behavior.
|
|
182
180
|
*/
|
|
@@ -190,15 +188,14 @@ public:
|
|
|
190
188
|
* in some cases: converting ICC fixed point to float, converting white point to D50,
|
|
191
189
|
* rounding decisions on transfer function and matrix.
|
|
192
190
|
*
|
|
193
|
-
* This does not consider a 2.2f exponential transfer function to be sRGB.
|
|
191
|
+
* This does not consider a 2.2f exponential transfer function to be sRGB. While these
|
|
194
192
|
* functions are similar (and it is sometimes useful to consider them together), this
|
|
195
193
|
* function checks for logical equality.
|
|
196
194
|
*/
|
|
197
195
|
bool isSRGB() const;
|
|
198
196
|
|
|
199
197
|
/**
|
|
200
|
-
* Returns
|
|
201
|
-
* the data is too large to serialize.
|
|
198
|
+
* Returns a serialized representation of this color space.
|
|
202
199
|
*/
|
|
203
200
|
sk_sp<SkData> serialize() const;
|
|
204
201
|
|
|
@@ -211,7 +208,7 @@ public:
|
|
|
211
208
|
static sk_sp<SkColorSpace> Deserialize(const void* data, size_t length);
|
|
212
209
|
|
|
213
210
|
/**
|
|
214
|
-
* If both are null, we return true.
|
|
211
|
+
* If both are null, we return true. If one is null and the other is not, we return false.
|
|
215
212
|
* If both are non-null, we do a deeper compare.
|
|
216
213
|
*/
|
|
217
214
|
static bool Equals(const SkColorSpace*, const SkColorSpace*);
|
|
@@ -28,6 +28,7 @@ enum SkColorType : int {
|
|
|
28
28
|
kBGRA_1010102_SkColorType, //!< 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
|
|
29
29
|
kRGB_101010x_SkColorType, //!< pixel with 10 bits each for red, green, blue; in 32-bit word
|
|
30
30
|
kBGR_101010x_SkColorType, //!< pixel with 10 bits each for blue, green, red; in 32-bit word
|
|
31
|
+
kBGR_101010x_XR_SkColorType, //!< pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
|
|
31
32
|
kGray_8_SkColorType, //!< pixel with grayscale level in 8-bit byte
|
|
32
33
|
kRGBA_F16Norm_SkColorType, //!< pixel with half floats in [0,1] for red, green, blue, alpha;
|
|
33
34
|
// in 64-bit word
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
#ifndef SkCoverageMode_DEFINED
|
|
9
9
|
#define SkCoverageMode_DEFINED
|
|
10
10
|
|
|
11
|
-
#include "include/core/SkTypes.h"
|
|
12
|
-
|
|
13
11
|
/**
|
|
14
12
|
* Describes geometric operations (ala SkRegion::Op) that can be applied to coverage bytes.
|
|
15
13
|
* These can be thought of as variants of porter-duff (SkBlendMode) modes, but only applied
|
|
@@ -8,9 +8,12 @@
|
|
|
8
8
|
#ifndef SkData_DEFINED
|
|
9
9
|
#define SkData_DEFINED
|
|
10
10
|
|
|
11
|
-
#include <stdio.h>
|
|
12
|
-
|
|
13
11
|
#include "include/core/SkRefCnt.h"
|
|
12
|
+
#include "include/private/base/SkAPI.h"
|
|
13
|
+
#include "include/private/base/SkAssert.h"
|
|
14
|
+
|
|
15
|
+
#include <cstdint>
|
|
16
|
+
#include <cstdio>
|
|
14
17
|
|
|
15
18
|
class SkStream;
|
|
16
19
|
|
|
@@ -8,8 +8,12 @@
|
|
|
8
8
|
#ifndef SkDataTable_DEFINED
|
|
9
9
|
#define SkDataTable_DEFINED
|
|
10
10
|
|
|
11
|
-
#include "include/core/
|
|
12
|
-
#include "include/private/
|
|
11
|
+
#include "include/core/SkRefCnt.h"
|
|
12
|
+
#include "include/private/base/SkAPI.h"
|
|
13
|
+
#include "include/private/base/SkAssert.h"
|
|
14
|
+
|
|
15
|
+
#include <cstdint>
|
|
16
|
+
#include <cstring>
|
|
13
17
|
|
|
14
18
|
/**
|
|
15
19
|
* Like SkData, SkDataTable holds an immutable data buffer. The data buffer is
|