@shopify/react-native-skia 1.11.9-next.1 → 1.11.10
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 +153 -30
- package/android/build.gradle +1 -1
- package/cpp/skia/include/codec/SkCodec.h +2 -7
- package/cpp/skia/include/config/SkUserConfig.h +0 -11
- package/cpp/skia/include/core/SkCanvas.h +7 -11
- package/cpp/skia/include/core/SkColor.h +0 -10
- package/cpp/skia/include/core/SkColorSpace.h +2 -184
- package/cpp/skia/include/core/SkColorType.h +32 -114
- package/cpp/skia/include/core/SkFontScanner.h +8 -5
- package/cpp/skia/include/core/SkFontStyle.h +1 -1
- package/cpp/skia/include/core/SkMaskFilter.h +8 -0
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkPath.h +1 -1
- package/cpp/skia/include/core/SkRRect.h +1 -3
- package/cpp/skia/include/core/SkShader.h +3 -3
- package/cpp/skia/include/core/SkString.h +8 -8
- package/cpp/skia/include/core/SkSurface.h +0 -14
- package/cpp/skia/include/core/SkTypeface.h +7 -24
- package/cpp/skia/include/effects/SkGradientShader.h +1 -6
- package/cpp/skia/include/effects/SkRuntimeEffect.h +0 -1
- package/cpp/skia/include/encode/SkPngEncoder.h +0 -14
- package/cpp/skia/include/gpu/GpuTypes.h +0 -9
- package/cpp/skia/include/gpu/ganesh/GrContextOptions.h +133 -135
- package/cpp/skia/include/gpu/ganesh/GrDirectContext.h +0 -5
- package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkarounds.h +3 -3
- package/cpp/skia/include/gpu/ganesh/GrTypes.h +9 -14
- package/cpp/skia/include/gpu/graphite/Context.h +2 -25
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +5 -23
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +1 -20
- package/cpp/skia/include/gpu/graphite/Image.h +0 -1
- package/cpp/skia/include/gpu/graphite/Recorder.h +0 -6
- package/cpp/skia/include/gpu/graphite/Recording.h +1 -3
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +36 -4
- package/cpp/skia/include/gpu/graphite/precompile/Precompile.h +2 -3
- package/cpp/skia/include/pathops/SkPathOps.h +1 -9
- package/cpp/skia/include/ports/SkFontMgr_FontConfigInterface.h +0 -3
- package/cpp/skia/include/private/SkPathRef.h +21 -15
- package/cpp/skia/include/private/base/SkAttributes.h +10 -16
- package/cpp/skia/include/private/base/SkMutex.h +0 -8
- package/cpp/skia/include/private/base/SkTArray.h +1 -1
- package/cpp/skia/include/private/base/SkTDArray.h +1 -1
- package/cpp/skia/include/private/base/SkTemplates.h +11 -24
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +1 -1
- package/cpp/skia/include/sksl/SkSLDebugTrace.h +3 -0
- package/cpp/skia/modules/skcms/src/Transform_inl.h +20 -20
- package/cpp/skia/modules/skcms/src/skcms_Transform.h +3 -4
- package/cpp/skia/modules/skcms/src/skcms_public.h +15 -19
- package/cpp/skia/modules/skresources/include/SkResources.h +1 -3
- package/cpp/skia/modules/svg/include/SkSVGCircle.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGContainer.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGImage.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGPath.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGPoly.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGRect.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +0 -2
- package/cpp/skia/modules/svg/include/SkSVGShape.h +0 -1
- package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +0 -4
- package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
- package/cpp/skia/src/core/SkLRUCache.h +13 -19
- package/cpp/skia/src/core/SkTHash.h +4 -50
- package/cpp/skia/src/gpu/ganesh/gl/GrGLDefines.h +0 -1
- package/lib/commonjs/external/reanimated/textures.js +3 -4
- package/lib/commonjs/external/reanimated/textures.js.map +1 -1
- package/lib/commonjs/headless/index.d.ts +1 -1
- package/lib/commonjs/headless/index.js +2 -2
- package/lib/commonjs/headless/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.d.ts +2 -2
- package/lib/commonjs/renderer/Canvas.js +28 -11
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/Offscreen.d.ts +2 -2
- package/lib/commonjs/renderer/Offscreen.js +4 -4
- package/lib/commonjs/renderer/Offscreen.js.map +1 -1
- package/lib/commonjs/renderer/__tests__/setup.d.ts +5 -5
- package/lib/commonjs/sksg/Container.d.ts +1 -3
- package/lib/commonjs/sksg/Container.js +1 -7
- package/lib/commonjs/sksg/Container.js.map +1 -1
- package/lib/commonjs/sksg/HostConfig.d.ts +1 -1
- package/lib/commonjs/sksg/HostConfig.js +6 -36
- package/lib/commonjs/sksg/HostConfig.js.map +1 -1
- package/lib/commonjs/sksg/HostConfig2.d.ts +19 -0
- package/lib/commonjs/sksg/HostConfig2.js +159 -0
- package/lib/commonjs/sksg/HostConfig2.js.map +1 -0
- package/lib/commonjs/sksg/Reconciler.d.ts +2 -3
- package/lib/commonjs/sksg/Reconciler.js +6 -16
- package/lib/commonjs/sksg/Reconciler.js.map +1 -1
- package/lib/module/Platform/Platform.web.js +1 -1
- package/lib/module/Platform/Platform.web.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Circle.js +2 -1
- package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Gradient.js +3 -3
- package/lib/module/dom/nodes/datatypes/Gradient.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Rect.js +5 -3
- package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/module/external/reanimated/buffers.js +2 -1
- package/lib/module/external/reanimated/buffers.js.map +1 -1
- package/lib/module/external/reanimated/textures.js +4 -5
- package/lib/module/external/reanimated/textures.js.map +1 -1
- package/lib/module/external/reanimated/useAnimatedImageValue.js +1 -1
- package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -1
- package/lib/module/external/reanimated/useVideo.js +23 -10
- package/lib/module/external/reanimated/useVideo.js.map +1 -1
- package/lib/module/headless/index.d.ts +1 -1
- package/lib/module/headless/index.js +2 -2
- package/lib/module/headless/index.js.map +1 -1
- package/lib/module/renderer/Canvas.d.ts +2 -2
- package/lib/module/renderer/Canvas.js +28 -10
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/Offscreen.d.ts +2 -2
- package/lib/module/renderer/Offscreen.js +4 -4
- package/lib/module/renderer/Offscreen.js.map +1 -1
- package/lib/module/renderer/__tests__/setup.d.ts +5 -5
- package/lib/module/skia/core/Vector.js +1 -1
- package/lib/module/skia/core/Vector.js.map +1 -1
- package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js +4 -1
- package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js.map +1 -1
- package/lib/module/skia/web/Host.js +7 -1
- package/lib/module/skia/web/Host.js.map +1 -1
- package/lib/module/skia/web/JsiSkAnimatedImage.js +6 -3
- package/lib/module/skia/web/JsiSkAnimatedImage.js.map +1 -1
- package/lib/module/skia/web/JsiSkCanvas.js +6 -3
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/module/skia/web/JsiSkColorFilter.js +6 -3
- package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkContourMeasure.js +6 -3
- package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
- package/lib/module/skia/web/JsiSkContourMeasureIter.js +6 -3
- package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
- package/lib/module/skia/web/JsiSkData.js +6 -3
- package/lib/module/skia/web/JsiSkData.js.map +1 -1
- package/lib/module/skia/web/JsiSkFont.js +6 -3
- package/lib/module/skia/web/JsiSkFont.js.map +1 -1
- package/lib/module/skia/web/JsiSkImage.js +12 -8
- package/lib/module/skia/web/JsiSkImage.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFilter.js +6 -3
- package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkMaskFilter.js +6 -3
- package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkMatrix.js +8 -5
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/module/skia/web/JsiSkPaint.js +6 -3
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/module/skia/web/JsiSkParagraphBuilder.js +3 -2
- package/lib/module/skia/web/JsiSkParagraphBuilder.js.map +1 -1
- package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +1 -1
- package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkParagraphStyle.js +15 -15
- package/lib/module/skia/web/JsiSkParagraphStyle.js.map +1 -1
- package/lib/module/skia/web/JsiSkPath.js +6 -3
- package/lib/module/skia/web/JsiSkPath.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathEffect.js +6 -3
- package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
- package/lib/module/skia/web/JsiSkPicture.js +6 -3
- package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/module/skia/web/JsiSkPictureRecorder.js +6 -3
- package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
- package/lib/module/skia/web/JsiSkPoint.js +6 -3
- package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
- package/lib/module/skia/web/JsiSkRRect.js +6 -3
- package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRSXform.js +6 -3
- package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
- package/lib/module/skia/web/JsiSkRect.js +6 -3
- package/lib/module/skia/web/JsiSkRect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRuntimeEffect.js +6 -3
- package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
- package/lib/module/skia/web/JsiSkSVG.js +8 -5
- package/lib/module/skia/web/JsiSkSVG.js.map +1 -1
- package/lib/module/skia/web/JsiSkShader.js +6 -3
- package/lib/module/skia/web/JsiSkShader.js.map +1 -1
- package/lib/module/skia/web/JsiSkSurface.js +6 -3
- package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/module/skia/web/JsiSkTextBlob.js +6 -3
- package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
- package/lib/module/skia/web/JsiSkTypeface.js +6 -3
- package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
- package/lib/module/skia/web/JsiSkTypefaceFontProvider.js +4 -1
- package/lib/module/skia/web/JsiSkTypefaceFontProvider.js.map +1 -1
- package/lib/module/skia/web/JsiSkVertices.js +6 -3
- package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
- package/lib/module/skia/web/JsiVideo.js +5 -2
- package/lib/module/skia/web/JsiVideo.js.map +1 -1
- package/lib/module/sksg/Container.d.ts +1 -3
- package/lib/module/sksg/Container.js +8 -11
- package/lib/module/sksg/Container.js.map +1 -1
- package/lib/module/sksg/HostConfig.d.ts +1 -1
- package/lib/module/sksg/HostConfig.js +7 -36
- package/lib/module/sksg/HostConfig.js.map +1 -1
- package/lib/module/sksg/HostConfig2.d.ts +19 -0
- package/lib/module/sksg/HostConfig2.js +152 -0
- package/lib/module/sksg/HostConfig2.js.map +1 -0
- package/lib/module/sksg/Reconciler.d.ts +2 -3
- package/lib/module/sksg/Reconciler.js +11 -16
- package/lib/module/sksg/Reconciler.js.map +1 -1
- package/lib/module/sksg/Recorder/ReanimatedRecorder.js +5 -1
- package/lib/module/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
- package/lib/module/sksg/Recorder/Recorder.js +6 -3
- package/lib/module/sksg/Recorder/Recorder.js.map +1 -1
- package/lib/module/sksg/Recorder/Visitor.js +1 -1
- package/lib/module/sksg/Recorder/Visitor.js.map +1 -1
- package/lib/module/sksg/Recorder/commands/Drawing.js +4 -2
- package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -1
- package/lib/module/sksg/Recorder/commands/Shaders.js +3 -2
- package/lib/module/sksg/Recorder/commands/Shaders.js.map +1 -1
- package/lib/module/views/SkiaBaseWebView.js +12 -9
- package/lib/module/views/SkiaBaseWebView.js.map +1 -1
- package/lib/module/views/SkiaPictureView.js +5 -1
- package/lib/module/views/SkiaPictureView.js.map +1 -1
- package/lib/module/views/SkiaPictureView.web.js +4 -1
- package/lib/module/views/SkiaPictureView.web.js.map +1 -1
- package/lib/module/web/LoadSkiaWeb.js +2 -1
- package/lib/module/web/LoadSkiaWeb.js.map +1 -1
- package/lib/module/web/WithSkiaWeb.js +1 -1
- package/lib/module/web/WithSkiaWeb.js.map +1 -1
- package/lib/typescript/lib/commonjs/headless/index.d.ts +1 -1
- package/lib/typescript/lib/commonjs/renderer/Canvas.d.ts +1 -9
- package/lib/typescript/lib/commonjs/renderer/Offscreen.d.ts +2 -2
- package/lib/typescript/lib/commonjs/sksg/Container.d.ts +0 -3
- package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +4 -21
- package/lib/typescript/lib/commonjs/sksg/HostConfig2.d.ts +44 -0
- package/lib/typescript/lib/commonjs/sksg/Reconciler.d.ts +2 -9
- package/lib/typescript/lib/module/headless/index.d.ts +1 -1
- package/lib/typescript/lib/module/renderer/Canvas.d.ts +1 -9
- package/lib/typescript/lib/module/renderer/Offscreen.d.ts +2 -2
- package/lib/typescript/lib/module/skia/web/CanvasKitWebGLBufferImpl.d.ts +2 -2
- package/lib/typescript/lib/module/skia/web/JsiSkAnimatedImage.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkCanvas.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkColorFilter.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkContourMeasure.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkContourMeasureIter.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkData.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkFont.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkImage.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkImageFilter.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkMaskFilter.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkMatrix.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPaint.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPath.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPathEffect.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPicture.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPictureRecorder.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPoint.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkRRect.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkRSXform.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkRect.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkRuntimeEffect.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkSVG.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkShader.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkSurface.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkTextBlob.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkTypeface.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkTypefaceFontProvider.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkVertices.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiVideo.d.ts +2 -2
- package/lib/typescript/lib/module/sksg/Container.d.ts +12 -7
- package/lib/typescript/lib/module/sksg/HostConfig.d.ts +4 -20
- package/lib/typescript/lib/module/sksg/HostConfig2.d.ts +43 -0
- package/lib/typescript/lib/module/sksg/Reconciler.d.ts +17 -18
- package/lib/typescript/lib/module/sksg/Recorder/ReanimatedRecorder.d.ts +0 -1
- package/lib/typescript/lib/module/sksg/Recorder/Recorder.d.ts +2 -5
- package/lib/typescript/lib/module/views/SkiaBaseWebView.d.ts +11 -12
- package/lib/typescript/lib/module/views/SkiaPictureView.d.ts +2 -2
- package/lib/typescript/lib/module/views/SkiaPictureView.web.d.ts +1 -1
- package/lib/typescript/src/headless/index.d.ts +1 -1
- package/lib/typescript/src/renderer/Canvas.d.ts +2 -2
- package/lib/typescript/src/renderer/Offscreen.d.ts +2 -2
- package/lib/typescript/src/renderer/__tests__/setup.d.ts +5 -5
- package/lib/typescript/src/sksg/Container.d.ts +1 -3
- package/lib/typescript/src/sksg/HostConfig.d.ts +1 -1
- package/lib/typescript/src/sksg/HostConfig2.d.ts +19 -0
- package/lib/typescript/src/sksg/Reconciler.d.ts +2 -3
- package/package.json +9 -10
- package/src/external/reanimated/textures.tsx +4 -5
- package/src/headless/index.ts +2 -2
- package/src/renderer/Canvas.tsx +81 -57
- package/src/renderer/Offscreen.tsx +4 -4
- package/src/renderer/__tests__/Data.spec.tsx +10 -9
- package/src/renderer/__tests__/Drawings.spec.tsx +11 -11
- package/src/renderer/__tests__/FitBox.spec.tsx +10 -10
- package/src/renderer/__tests__/Glyphs.spec.tsx +2 -2
- package/src/renderer/__tests__/Image.spec.tsx +2 -2
- package/src/renderer/__tests__/Paths.spec.tsx +8 -8
- package/src/renderer/__tests__/Picture.spec.tsx +12 -10
- package/src/renderer/__tests__/Simple.spec.tsx +6 -6
- package/src/renderer/__tests__/Surfaces.spec.tsx +2 -2
- package/src/renderer/__tests__/Text.spec.tsx +12 -12
- package/src/renderer/__tests__/Transform.spec.tsx +8 -8
- package/src/renderer/__tests__/documentation/Group.spec.tsx +12 -12
- package/src/renderer/__tests__/documentation/getting-started/HelloWorld.spec.tsx +2 -2
- package/src/renderer/__tests__/documentation/paint/Overview.spec.tsx +8 -8
- package/src/renderer/__tests__/documentation/shapes/Box.spec.tsx +4 -4
- package/src/renderer/__tests__/e2e/Atlas.spec.tsx +3 -3
- package/src/renderer/__tests__/e2e/Offscreen.spec.tsx +1 -1
- package/src/renderer/__tests__/examples/BlendModes.spec.tsx +4 -4
- package/src/renderer/__tests__/setup.tsx +13 -13
- package/src/sksg/Container.ts +1 -9
- package/src/sksg/HostConfig.ts +7 -37
- package/src/sksg/HostConfig2.ts +247 -0
- package/src/sksg/Reconciler.ts +6 -17
- package/src/sksg/__tests__/Simple.spec.tsx +8 -8
- package/cpp/skia/include/gpu/graphite/LogPriority.h +0 -36
- package/cpp/skia/include/gpu/graphite/PrecompileContext.h +0 -52
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypesUtils.h +0 -48
@@ -8,19 +8,27 @@
|
|
8
8
|
#ifndef skgpu_graphite_MtlGraphiteTypes_DEFINED
|
9
9
|
#define skgpu_graphite_MtlGraphiteTypes_DEFINED
|
10
10
|
|
11
|
-
#if __OBJC__ // <Metal/Metal.h> only works when compiled for Objective C
|
12
|
-
|
13
11
|
#include "include/core/SkTypes.h"
|
14
12
|
|
13
|
+
#if __OBJC__ // <Metal/Metal.h> only works when compiled for Objective C
|
14
|
+
#include "include/gpu/graphite/BackendTexture.h"
|
15
15
|
#include "include/gpu/graphite/GraphiteTypes.h"
|
16
|
-
#include "include/gpu/graphite/
|
16
|
+
#include "include/gpu/graphite/TextureInfo.h"
|
17
|
+
#include "include/ports/SkCFObject.h"
|
17
18
|
#include "include/private/base/SkAPI.h"
|
18
19
|
|
19
20
|
#import <CoreFoundation/CoreFoundation.h>
|
20
21
|
#import <Metal/Metal.h>
|
21
22
|
#import <TargetConditionals.h>
|
22
23
|
|
24
|
+
#if TARGET_OS_SIMULATOR
|
25
|
+
#define SK_API_AVAILABLE_CA_METAL_LAYER SK_API_AVAILABLE(macos(10.11), ios(13.0), tvos(13.0))
|
26
|
+
#else // TARGET_OS_SIMULATOR
|
27
|
+
#define SK_API_AVAILABLE_CA_METAL_LAYER SK_API_AVAILABLE(macos(10.11), ios(8.0), tvos(9.0))
|
28
|
+
#endif // TARGET_OS_SIMULATOR
|
29
|
+
|
23
30
|
namespace skgpu::graphite {
|
31
|
+
|
24
32
|
struct SK_API MtlTextureInfo {
|
25
33
|
uint32_t fSampleCount = 1;
|
26
34
|
skgpu::Mipmapped fMipmapped = skgpu::Mipmapped::kNo;
|
@@ -45,7 +53,31 @@ struct SK_API MtlTextureInfo {
|
|
45
53
|
, fStorageMode(storageMode)
|
46
54
|
, fFramebufferOnly(framebufferOnly) {}
|
47
55
|
};
|
48
|
-
|
56
|
+
|
57
|
+
namespace TextureInfos {
|
58
|
+
SK_API TextureInfo MakeMetal(const MtlTextureInfo&);
|
59
|
+
SK_API TextureInfo MakeMetal(CFTypeRef mtlTexture);
|
60
|
+
|
61
|
+
SK_API bool GetMtlTextureInfo(const TextureInfo&, MtlTextureInfo*);
|
62
|
+
} // namespace TextureInfos
|
63
|
+
|
64
|
+
namespace BackendTextures {
|
65
|
+
// The BackendTexture will not call retain or release on the passed in CFTypeRef. Thus the
|
66
|
+
// client must keep the CFTypeRef valid until they are no longer using the BackendTexture.
|
67
|
+
SK_API BackendTexture MakeMetal(SkISize dimensions, CFTypeRef mtlTexture);
|
68
|
+
|
69
|
+
SK_API CFTypeRef GetMtlTexture(const BackendTexture&);
|
70
|
+
} // namespace BackendTextures
|
71
|
+
|
72
|
+
namespace BackendSemaphores {
|
73
|
+
// TODO(b/286088355) Determine creator's responsibility for setting refcnt.
|
74
|
+
SK_API BackendSemaphore MakeMetal(CFTypeRef mtlEvent, uint64_t value);
|
75
|
+
|
76
|
+
SK_API CFTypeRef GetMtlEvent(const BackendSemaphore&);
|
77
|
+
SK_API uint64_t GetMtlValue(const BackendSemaphore&);
|
78
|
+
} // namespace BackendSemaphores
|
79
|
+
|
80
|
+
} // namespace skgpu::graphite
|
49
81
|
|
50
82
|
#endif // __OBJC__
|
51
83
|
|
@@ -15,7 +15,6 @@ namespace skgpu::graphite {
|
|
15
15
|
|
16
16
|
class Context;
|
17
17
|
class PaintOptions;
|
18
|
-
class PrecompileContext;
|
19
18
|
|
20
19
|
/**
|
21
20
|
* Describes the required properties of a RenderPass that will be combined with the
|
@@ -34,12 +33,12 @@ struct SK_API RenderPassProperties {
|
|
34
33
|
* drawing. Graphite will always be able to perform an inline compilation if some SkPaint
|
35
34
|
* combination was omitted from precompilation.
|
36
35
|
*
|
37
|
-
* @param
|
36
|
+
* @param context the Context to which the actual draws will be submitted
|
38
37
|
* @param paintOptions captures a set of SkPaints that will be drawn
|
39
38
|
* @param drawTypes communicates which primitives those paints will be drawn with
|
40
39
|
* @param renderPassProperties describes the RenderPasses needed for the desired Pipelines
|
41
40
|
*/
|
42
|
-
void SK_API Precompile(
|
41
|
+
void SK_API Precompile(Context* context,
|
43
42
|
const PaintOptions& paintOptions,
|
44
43
|
DrawTypeFlags drawTypes,
|
45
44
|
SkSpan<const RenderPassProperties> renderPassProperties);
|
@@ -65,15 +65,7 @@ bool SK_API Simplify(const SkPath& path, SkPath* result);
|
|
65
65
|
@param result The tight bounds of the path.
|
66
66
|
@return True if the bounds could be computed.
|
67
67
|
*/
|
68
|
-
|
69
|
-
static inline bool TightBounds(const SkPath& path, SkRect* result) {
|
70
|
-
auto rect = path.computeTightBounds();
|
71
|
-
if (rect.isFinite()) {
|
72
|
-
*result = rect;
|
73
|
-
return true;
|
74
|
-
}
|
75
|
-
return false;
|
76
|
-
}
|
68
|
+
bool SK_API TightBounds(const SkPath& path, SkRect* result);
|
77
69
|
|
78
70
|
/** Set the result with fill type winding to area equivalent to path.
|
79
71
|
Returns true if successful. Does not detect if path contains contours which
|
@@ -13,11 +13,8 @@
|
|
13
13
|
|
14
14
|
class SkFontMgr;
|
15
15
|
class SkFontConfigInterface;
|
16
|
-
class SkFontScanner;
|
17
16
|
|
18
17
|
/** Creates a SkFontMgr which wraps a SkFontConfigInterface. */
|
19
18
|
SK_API sk_sp<SkFontMgr> SkFontMgr_New_FCI(sk_sp<SkFontConfigInterface> fci);
|
20
|
-
SK_API sk_sp<SkFontMgr> SkFontMgr_New_FCI(sk_sp<SkFontConfigInterface> fci,
|
21
|
-
std::unique_ptr<SkFontScanner> scanner);
|
22
19
|
|
23
20
|
#endif // #ifndef SkFontMgr_FontConfigInterface_DEFINED
|
@@ -28,6 +28,15 @@
|
|
28
28
|
class SkMatrix;
|
29
29
|
class SkRRect;
|
30
30
|
|
31
|
+
// These are computed from a stream of verbs
|
32
|
+
struct SkPathVerbAnalysis {
|
33
|
+
bool valid;
|
34
|
+
int points, weights;
|
35
|
+
unsigned segmentMask;
|
36
|
+
};
|
37
|
+
SkPathVerbAnalysis sk_path_analyze_verbs(const uint8_t verbs[], int count);
|
38
|
+
|
39
|
+
|
31
40
|
/**
|
32
41
|
* Holds the path verbs and points. It is versioned by a generation ID. None of its public methods
|
33
42
|
* modify the contents. To modify or append to the verbs/points wrap the SkPathRef in an
|
@@ -532,12 +541,7 @@ private:
|
|
532
541
|
|
533
542
|
void callGenIDChangeListeners();
|
534
543
|
|
535
|
-
PointsArray fPoints;
|
536
|
-
VerbsArray fVerbs;
|
537
|
-
ConicWeightsArray fConicWeights;
|
538
|
-
|
539
544
|
mutable SkRect fBounds;
|
540
|
-
SkRect fArcOval;
|
541
545
|
|
542
546
|
enum {
|
543
547
|
kEmptyGenID = 1, // GenID reserved for path ref with zero points and zero verbs.
|
@@ -545,25 +549,27 @@ private:
|
|
545
549
|
mutable uint32_t fGenerationID;
|
546
550
|
SkIDChangeListener::List fGenIDChangeListeners;
|
547
551
|
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
SkScalar fArcSweepAngle;
|
552
|
+
PointsArray fPoints;
|
553
|
+
VerbsArray fVerbs;
|
554
|
+
ConicWeightsArray fConicWeights;
|
552
555
|
|
553
|
-
|
556
|
+
SkDEBUGCODE(std::atomic<int> fEditorsAttached;) // assert only one editor in use at any time.
|
554
557
|
|
555
558
|
mutable uint8_t fBoundsIsDirty;
|
559
|
+
mutable bool fIsFinite; // only meaningful if bounds are valid
|
556
560
|
|
561
|
+
PathType fType;
|
562
|
+
// Both the circle and rrect special cases have a notion of direction and starting point
|
563
|
+
// The next two variables store that information for either.
|
564
|
+
bool fRRectOrOvalIsCCW;
|
557
565
|
uint8_t fRRectOrOvalStartIdx;
|
558
566
|
uint8_t fSegmentMask;
|
559
567
|
// If the path is an arc, these four variables store that information.
|
560
568
|
// We should just store an SkArc, but alignment would cost us 8 more bytes.
|
561
569
|
SkArc::Type fArcType;
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
// The next two variables store that information for either.
|
566
|
-
bool fRRectOrOvalIsCCW;
|
570
|
+
SkRect fArcOval;
|
571
|
+
SkScalar fArcStartAngle;
|
572
|
+
SkScalar fArcSweepAngle;
|
567
573
|
|
568
574
|
friend class PathRefTest_Private;
|
569
575
|
friend class ForceIsRRect_Private; // unit test isRRect
|
@@ -56,26 +56,20 @@
|
|
56
56
|
* Used to ignore sanitizer warnings.
|
57
57
|
*/
|
58
58
|
#if !defined(SK_NO_SANITIZE)
|
59
|
-
|
60
|
-
#if __has_attribute(no_sanitize)
|
61
|
-
// This should be for clang and versions of gcc >= 8.0
|
62
|
-
#define SK_NO_SANITIZE(A) SK_ATTRIBUTE(no_sanitize(A))
|
63
|
-
#else
|
64
|
-
// For compilers that don't support sanitization, just do nothing.
|
65
|
-
#define SK_NO_SANITIZE(A)
|
66
|
-
#endif
|
67
|
-
#else // no __has_attribute, e.g. MSVC
|
68
|
-
#define SK_NO_SANITIZE(A)
|
69
|
-
#endif
|
59
|
+
# define SK_NO_SANITIZE(A) SK_ATTRIBUTE(no_sanitize(A))
|
70
60
|
#endif
|
71
61
|
|
72
62
|
/**
|
73
|
-
*
|
63
|
+
* Helper macro to define no_sanitize attributes only with clang.
|
74
64
|
*/
|
75
|
-
#if defined(__clang__)
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
65
|
+
#if defined(__clang__) && defined(__has_attribute)
|
66
|
+
#if __has_attribute(no_sanitize)
|
67
|
+
#define SK_CLANG_NO_SANITIZE(A) SK_NO_SANITIZE(A)
|
68
|
+
#endif
|
69
|
+
#endif
|
70
|
+
|
71
|
+
#if !defined(SK_CLANG_NO_SANITIZE)
|
72
|
+
#define SK_CLANG_NO_SANITIZE(A)
|
79
73
|
#endif
|
80
74
|
|
81
75
|
/**
|
@@ -14,14 +14,6 @@
|
|
14
14
|
#include "include/private/base/SkThreadAnnotations.h"
|
15
15
|
#include "include/private/base/SkThreadID.h"
|
16
16
|
|
17
|
-
/**
|
18
|
-
* class SkMutex
|
19
|
-
*
|
20
|
-
* This allows us to have a mutex without needing the one in
|
21
|
-
* the C++ std library which does not work with all clients.
|
22
|
-
* go/cstyle#Disallowed_Stdlib
|
23
|
-
*/
|
24
|
-
|
25
17
|
class SK_CAPABILITY("mutex") SkMutex {
|
26
18
|
public:
|
27
19
|
constexpr SkMutex() = default;
|
@@ -617,7 +617,7 @@ private:
|
|
617
617
|
// unpredictable location in memory. Of course, TArray won't actually use fItemArray in this
|
618
618
|
// way, and we don't want to construct a T before the user requests one. There's no real risk
|
619
619
|
// here, so disable CFI when doing these casts.
|
620
|
-
|
620
|
+
SK_CLANG_NO_SANITIZE("cfi")
|
621
621
|
static T* TCast(void* buffer) {
|
622
622
|
return (T*)buffer;
|
623
623
|
}
|
@@ -15,7 +15,6 @@
|
|
15
15
|
#include "include/private/base/SkTLogic.h"
|
16
16
|
#include "include/private/base/SkTo.h"
|
17
17
|
|
18
|
-
#include <algorithm>
|
19
18
|
#include <array>
|
20
19
|
#include <cstddef>
|
21
20
|
#include <cstdint>
|
@@ -95,8 +94,7 @@ public:
|
|
95
94
|
|
96
95
|
|
97
96
|
namespace skia_private {
|
98
|
-
/** Allocate an array of T elements
|
99
|
-
* elements will be cleaned up "auto"matically.
|
97
|
+
/** Allocate an array of T elements, and free the array in the destructor
|
100
98
|
*/
|
101
99
|
template <typename T> class AutoTArray {
|
102
100
|
public:
|
@@ -166,10 +164,7 @@ private:
|
|
166
164
|
size_t fSize = 0;
|
167
165
|
};
|
168
166
|
|
169
|
-
/**
|
170
|
-
* the Stack. If count exceeds the space of the preallocation, the elements
|
171
|
-
* will live on the heap. Once this goes out of scope, the elements will be
|
172
|
-
* cleaned up "auto"matically.
|
167
|
+
/** Wraps AutoTArray, with room for kCountRequested elements preallocated.
|
173
168
|
*/
|
174
169
|
template <int kCountRequested, typename T> class AutoSTArray {
|
175
170
|
public:
|
@@ -261,25 +256,17 @@ private:
|
|
261
256
|
#if defined(SK_BUILD_FOR_GOOGLE3)
|
262
257
|
// Stack frame size is limited for SK_BUILD_FOR_GOOGLE3. 4k is less than the actual max,
|
263
258
|
// but some functions have multiple large stack allocations.
|
264
|
-
static
|
265
|
-
static
|
259
|
+
static const int kMaxBytes = 4 * 1024;
|
260
|
+
static const int kCount = kCountRequested * sizeof(T) > kMaxBytes
|
266
261
|
? kMaxBytes / sizeof(T)
|
267
262
|
: kCountRequested;
|
268
263
|
#else
|
269
|
-
static
|
264
|
+
static const int kCount = kCountRequested;
|
270
265
|
#endif
|
271
266
|
|
272
|
-
// Because we are also storing an int, there is a tiny bit of padding that
|
273
|
-
// the C++ compiler adds after fStorage if sizeof(T) <= alignof(T*).
|
274
|
-
// Thus, we can expand how many elements are stored on the stack to make use of this
|
275
|
-
// (e.g. 1 extra element for 4 byte T if kCountRequested was even).
|
276
|
-
static_assert(alignof(int) <= alignof(T*) || alignof(int) <= alignof(T));
|
277
|
-
static constexpr int kCount =
|
278
|
-
SkAlignTo(kMinCount*sizeof(T) + sizeof(int), std::max(alignof(T*), alignof(T))) / sizeof(T);
|
279
|
-
|
280
|
-
T* fArray;
|
281
|
-
alignas(T) std::byte fStorage[kCount * sizeof(T)];
|
282
267
|
int fCount;
|
268
|
+
T* fArray;
|
269
|
+
alignas(T) char fStorage[kCount * sizeof(T)];
|
283
270
|
};
|
284
271
|
|
285
272
|
/** Manages an array of T elements, freeing the array in the destructor.
|
@@ -422,16 +409,16 @@ public:
|
|
422
409
|
|
423
410
|
private:
|
424
411
|
// Since we use uint32_t storage, we might be able to get more elements for free.
|
425
|
-
static
|
412
|
+
static const size_t kCountWithPadding = SkAlign4(kCountRequested*sizeof(T)) / sizeof(T);
|
426
413
|
#if defined(SK_BUILD_FOR_GOOGLE3)
|
427
414
|
// Stack frame size is limited for SK_BUILD_FOR_GOOGLE3. 4k is less than the actual max, but some functions
|
428
415
|
// have multiple large stack allocations.
|
429
|
-
static
|
430
|
-
static
|
416
|
+
static const size_t kMaxBytes = 4 * 1024;
|
417
|
+
static const size_t kCount = kCountRequested * sizeof(T) > kMaxBytes
|
431
418
|
? kMaxBytes / sizeof(T)
|
432
419
|
: kCountWithPadding;
|
433
420
|
#else
|
434
|
-
static
|
421
|
+
static const size_t kCount = kCountWithPadding;
|
435
422
|
#endif
|
436
423
|
|
437
424
|
T* fPtr;
|
@@ -539,7 +539,7 @@ SK_MAKE_BITFIELD_CLASS_OPS(GpuPathRenderers)
|
|
539
539
|
enum class GrColorType {
|
540
540
|
kUnknown,
|
541
541
|
kAlpha_8,
|
542
|
-
kBGR_565,
|
542
|
+
kBGR_565,
|
543
543
|
kRGB_565,
|
544
544
|
kABGR_4444, // This name differs from SkColorType. kARGB_4444_SkColorType is misnamed.
|
545
545
|
kRGBA_8888,
|
@@ -16,6 +16,9 @@ namespace SkSL {
|
|
16
16
|
|
17
17
|
class DebugTrace : public SkRefCnt {
|
18
18
|
public:
|
19
|
+
/** Serializes a debug trace to JSON which can be parsed by our debugger. */
|
20
|
+
virtual void writeTrace(SkWStream* w) const = 0;
|
21
|
+
|
19
22
|
/** Generates a human-readable dump of the debug trace. */
|
20
23
|
virtual void dump(SkWStream* o) const = 0;
|
21
24
|
};
|
@@ -904,19 +904,24 @@ STAGE(load_1010102, NoCtx) {
|
|
904
904
|
}
|
905
905
|
|
906
906
|
STAGE(load_101010x_XR, NoCtx) {
|
907
|
+
static constexpr float min = -0.752941f;
|
908
|
+
static constexpr float max = 1.25098f;
|
909
|
+
static constexpr float range = max - min;
|
907
910
|
U32 rgba = load<U32>(src + 4*i);
|
908
|
-
r = cast<F>((
|
909
|
-
g = cast<F>((
|
910
|
-
b = cast<F>((
|
911
|
+
r = cast<F>((rgba >> 0) & 0x3ff) * (1/1023.0f) * range + min;
|
912
|
+
g = cast<F>((rgba >> 10) & 0x3ff) * (1/1023.0f) * range + min;
|
913
|
+
b = cast<F>((rgba >> 20) & 0x3ff) * (1/1023.0f) * range + min;
|
911
914
|
}
|
912
915
|
|
913
916
|
STAGE(load_10101010_XR, NoCtx) {
|
917
|
+
static constexpr float min = -0.752941f;
|
918
|
+
static constexpr float max = 1.25098f;
|
919
|
+
static constexpr float range = max - min;
|
914
920
|
U64 rgba = load<U64>(src + 8 * i);
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
a = cast<F>(((rgba >> (48+6)) & 0x3ff) - 384) / 510.0f;
|
921
|
+
r = cast<F>((rgba >> (0+6)) & 0x3ff) * (1/1023.0f) * range + min;
|
922
|
+
g = cast<F>((rgba >> (16+6)) & 0x3ff) * (1/1023.0f) * range + min;
|
923
|
+
b = cast<F>((rgba >> (32+6)) & 0x3ff) * (1/1023.0f) * range + min;
|
924
|
+
a = cast<F>((rgba >> (48+6)) & 0x3ff) * (1/1023.0f) * range + min;
|
920
925
|
}
|
921
926
|
|
922
927
|
STAGE(load_161616LE, NoCtx) {
|
@@ -1305,17 +1310,12 @@ FINAL_STAGE(store_8888, NoCtx) {
|
|
1305
1310
|
}
|
1306
1311
|
|
1307
1312
|
FINAL_STAGE(store_101010x_XR, NoCtx) {
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
// Each channel is 16 bits, where the 6 low bits are padding.
|
1315
|
-
store(dst + 8*i, cast<U64>(to_fixed((r * 510) + 384)) << ( 0+6)
|
1316
|
-
| cast<U64>(to_fixed((g * 510) + 384)) << (16+6)
|
1317
|
-
| cast<U64>(to_fixed((b * 510) + 384)) << (32+6)
|
1318
|
-
| cast<U64>(to_fixed((a * 510) + 384)) << (48+6));
|
1313
|
+
static constexpr float min = -0.752941f;
|
1314
|
+
static constexpr float max = 1.25098f;
|
1315
|
+
static constexpr float range = max - min;
|
1316
|
+
store(dst + 4*i, cast<U32>(to_fixed(((r - min) / range) * 1023)) << 0
|
1317
|
+
| cast<U32>(to_fixed(((g - min) / range) * 1023)) << 10
|
1318
|
+
| cast<U32>(to_fixed(((b - min) / range) * 1023)) << 20);
|
1319
1319
|
}
|
1320
1320
|
|
1321
1321
|
FINAL_STAGE(store_1010102, NoCtx) {
|
@@ -1521,7 +1521,7 @@ FINAL_STAGE(store_ffff, NoCtx) {
|
|
1521
1521
|
// NOLINTNEXTLINE(misc-definitions-in-headers)
|
1522
1522
|
void run_program(const Op* program, const void** contexts, SKCMS_MAYBE_UNUSED ptrdiff_t programSize,
|
1523
1523
|
const char* src, char* dst, int n,
|
1524
|
-
|
1524
|
+
const size_t src_bpp, const size_t dst_bpp) {
|
1525
1525
|
#if SKCMS_HAS_MUSTTAIL
|
1526
1526
|
// Convert the program into an array of tailcall stages.
|
1527
1527
|
StageFn stages[32];
|
@@ -101,7 +101,6 @@ namespace skcms_private {
|
|
101
101
|
M(store_161616BE) \
|
102
102
|
M(store_16161616BE) \
|
103
103
|
M(store_101010x_XR) \
|
104
|
-
M(store_10101010_XR) \
|
105
104
|
M(store_hhh) \
|
106
105
|
M(store_hhhh) \
|
107
106
|
M(store_fff) \
|
@@ -145,21 +144,21 @@ namespace baseline {
|
|
145
144
|
|
146
145
|
void run_program(const Op* program, const void** contexts, ptrdiff_t programSize,
|
147
146
|
const char* src, char* dst, int n,
|
148
|
-
|
147
|
+
const size_t src_bpp, const size_t dst_bpp);
|
149
148
|
|
150
149
|
}
|
151
150
|
namespace hsw {
|
152
151
|
|
153
152
|
void run_program(const Op* program, const void** contexts, ptrdiff_t programSize,
|
154
153
|
const char* src, char* dst, int n,
|
155
|
-
|
154
|
+
const size_t src_bpp, const size_t dst_bpp);
|
156
155
|
|
157
156
|
}
|
158
157
|
namespace skx {
|
159
158
|
|
160
159
|
void run_program(const Op* program, const void** contexts, ptrdiff_t programSize,
|
161
160
|
const char* src, char* dst, int n,
|
162
|
-
|
161
|
+
const size_t src_bpp, const size_t dst_bpp);
|
163
162
|
|
164
163
|
}
|
165
164
|
} // namespace skcms_private
|
@@ -105,9 +105,6 @@ SKCMS_API bool skcms_TransferFunction_isHLGish (const skcms_TransferFunction*);
|
|
105
105
|
// Unified representation of 'curv' or 'para' tag data, or a 1D table from 'mft1' or 'mft2'
|
106
106
|
typedef union skcms_Curve {
|
107
107
|
struct {
|
108
|
-
// this needs to line up with alias_of_table_entries so we can tell if there are or
|
109
|
-
// are not table entries. If this is 0, this struct is a parametric function,
|
110
|
-
// otherwise it's a table entry.
|
111
108
|
uint32_t alias_of_table_entries;
|
112
109
|
skcms_TransferFunction parametric;
|
113
110
|
};
|
@@ -126,44 +123,44 @@ typedef struct skcms_A2B {
|
|
126
123
|
// Optional: N 1D "A" curves, followed by an N-dimensional CLUT.
|
127
124
|
// If input_channels == 0, these curves and CLUT are skipped,
|
128
125
|
// Otherwise, input_channels must be in [1, 4].
|
126
|
+
uint32_t input_channels;
|
129
127
|
skcms_Curve input_curves[4];
|
128
|
+
uint8_t grid_points[4];
|
130
129
|
const uint8_t* grid_8;
|
131
130
|
const uint8_t* grid_16;
|
132
|
-
uint32_t input_channels;
|
133
|
-
uint8_t grid_points[4];
|
134
131
|
|
135
132
|
// Optional: 3 1D "M" curves, followed by a color matrix.
|
136
133
|
// If matrix_channels == 0, these curves and matrix are skipped,
|
137
134
|
// Otherwise, matrix_channels must be 3.
|
135
|
+
uint32_t matrix_channels;
|
138
136
|
skcms_Curve matrix_curves[3];
|
139
137
|
skcms_Matrix3x4 matrix;
|
140
|
-
uint32_t matrix_channels;
|
141
138
|
|
142
139
|
// Required: 3 1D "B" curves. Always present, and output_channels must be 3.
|
143
|
-
uint32_t output_channels;
|
140
|
+
uint32_t output_channels;
|
144
141
|
skcms_Curve output_curves[3];
|
145
142
|
} skcms_A2B;
|
146
143
|
|
147
144
|
typedef struct skcms_B2A {
|
148
145
|
// Required: 3 1D "B" curves. Always present, and input_channels must be 3.
|
149
|
-
skcms_Curve input_curves[3];
|
150
146
|
uint32_t input_channels;
|
147
|
+
skcms_Curve input_curves[3];
|
151
148
|
|
152
149
|
// Optional: a color matrix, followed by 3 1D "M" curves.
|
153
150
|
// If matrix_channels == 0, this matrix and these curves are skipped,
|
154
151
|
// Otherwise, matrix_channels must be 3.
|
155
|
-
uint32_t matrix_channels;
|
156
|
-
skcms_Curve matrix_curves[3];
|
152
|
+
uint32_t matrix_channels;
|
157
153
|
skcms_Matrix3x4 matrix;
|
154
|
+
skcms_Curve matrix_curves[3];
|
158
155
|
|
159
156
|
// Optional: an N-dimensional CLUT, followed by N 1D "A" curves.
|
160
157
|
// If output_channels == 0, this CLUT and these curves are skipped,
|
161
158
|
// Otherwise, output_channels must be in [1, 4].
|
162
|
-
|
159
|
+
uint32_t output_channels;
|
160
|
+
uint8_t grid_points[4];
|
163
161
|
const uint8_t* grid_8;
|
164
162
|
const uint8_t* grid_16;
|
165
|
-
|
166
|
-
uint32_t output_channels;
|
163
|
+
skcms_Curve output_curves[4];
|
167
164
|
} skcms_B2A;
|
168
165
|
|
169
166
|
typedef struct skcms_CICP {
|
@@ -185,31 +182,30 @@ typedef struct skcms_ICCProfile {
|
|
185
182
|
|
186
183
|
// If we can parse red, green and blue transfer curves from the profile,
|
187
184
|
// trc will be set to those three curves, and has_trc will be true.
|
185
|
+
bool has_trc;
|
188
186
|
skcms_Curve trc[3];
|
189
187
|
|
190
188
|
// If this profile's gamut can be represented by a 3x3 transform to XYZD50,
|
191
189
|
// skcms_Parse() sets toXYZD50 to that transform and has_toXYZD50 to true.
|
190
|
+
bool has_toXYZD50;
|
192
191
|
skcms_Matrix3x3 toXYZD50;
|
193
192
|
|
194
193
|
// If the profile has a valid A2B0 or A2B1 tag, skcms_Parse() sets A2B to
|
195
194
|
// that data, and has_A2B to true. skcms_ParseWithA2BPriority() does the
|
196
195
|
// same following any user-provided prioritization of A2B0, A2B1, or A2B2.
|
196
|
+
bool has_A2B;
|
197
197
|
skcms_A2B A2B;
|
198
198
|
|
199
199
|
// If the profile has a valid B2A0 or B2A1 tag, skcms_Parse() sets B2A to
|
200
200
|
// that data, and has_B2A to true. skcms_ParseWithA2BPriority() does the
|
201
201
|
// same following any user-provided prioritization of B2A0, B2A1, or B2A2.
|
202
|
+
bool has_B2A;
|
202
203
|
skcms_B2A B2A;
|
203
204
|
|
204
205
|
// If the profile has a valid CICP tag, skcms_Parse() sets CICP to that data,
|
205
206
|
// and has_CICP to true.
|
206
|
-
skcms_CICP CICP;
|
207
|
-
|
208
|
-
bool has_trc;
|
209
|
-
bool has_toXYZD50;
|
210
|
-
bool has_A2B;
|
211
|
-
bool has_B2A;
|
212
207
|
bool has_CICP;
|
208
|
+
skcms_CICP CICP;
|
213
209
|
} skcms_ICCProfile;
|
214
210
|
|
215
211
|
// The sRGB color profile is so commonly used that we offer a canonical skcms_ICCProfile for it.
|
@@ -108,10 +108,8 @@ public:
|
|
108
108
|
static sk_sp<MultiFrameImageAsset> Make(std::unique_ptr<SkCodec>,
|
109
109
|
ImageDecodeStrategy = ImageDecodeStrategy::kLazyDecode);
|
110
110
|
|
111
|
-
bool isMultiFrame() override;
|
112
111
|
|
113
|
-
|
114
|
-
float duration() const;
|
112
|
+
bool isMultiFrame() override;
|
115
113
|
|
116
114
|
sk_sp<SkImage> getFrame(float t) override;
|
117
115
|
|
@@ -42,7 +42,7 @@ protected:
|
|
42
42
|
|
43
43
|
SkPath onAsPath(const SkSVGRenderContext&) const override;
|
44
44
|
|
45
|
-
SkRect
|
45
|
+
SkRect onObjectBoundingBox(const SkSVGRenderContext&) const override;
|
46
46
|
|
47
47
|
private:
|
48
48
|
SkSVGCircle();
|
@@ -29,7 +29,7 @@ protected:
|
|
29
29
|
|
30
30
|
SkPath onAsPath(const SkSVGRenderContext&) const override;
|
31
31
|
|
32
|
-
SkRect
|
32
|
+
SkRect onObjectBoundingBox(const SkSVGRenderContext&) const override;
|
33
33
|
|
34
34
|
bool hasChildren() const final;
|
35
35
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
class SK_API SkSVGFeLightSource : public SkSVGHiddenContainer {
|
21
21
|
public:
|
22
22
|
void appendChild(sk_sp<SkSVGNode>) final {
|
23
|
-
|
23
|
+
SkDebugf("cannot append child nodes to an SVG light source.\n");
|
24
24
|
}
|
25
25
|
|
26
26
|
protected:
|
@@ -31,13 +31,13 @@ public:
|
|
31
31
|
}
|
32
32
|
|
33
33
|
void appendChild(sk_sp<SkSVGNode>) override {
|
34
|
-
|
34
|
+
SkDebugf("cannot append child nodes to this element.\n");
|
35
35
|
}
|
36
36
|
|
37
37
|
bool onPrepareToRender(SkSVGRenderContext*) const override;
|
38
38
|
void onRender(const SkSVGRenderContext&) const override;
|
39
39
|
SkPath onAsPath(const SkSVGRenderContext&) const override;
|
40
|
-
SkRect
|
40
|
+
SkRect onObjectBoundingBox(const SkSVGRenderContext&) const override;
|
41
41
|
|
42
42
|
struct ImageInfo {
|
43
43
|
sk_sp<SkImage> fImage;
|
@@ -35,7 +35,7 @@ protected:
|
|
35
35
|
|
36
36
|
SkPath onAsPath(const SkSVGRenderContext&) const override;
|
37
37
|
|
38
|
-
SkRect
|
38
|
+
SkRect onObjectBoundingBox(const SkSVGRenderContext&) const override;
|
39
39
|
|
40
40
|
private:
|
41
41
|
SkSVGPath();
|
@@ -43,7 +43,7 @@ protected:
|
|
43
43
|
|
44
44
|
SkPath onAsPath(const SkSVGRenderContext&) const override;
|
45
45
|
|
46
|
-
SkRect
|
46
|
+
SkRect onObjectBoundingBox(const SkSVGRenderContext&) const override;
|
47
47
|
|
48
48
|
private:
|
49
49
|
SkSVGPoly(SkSVGTag);
|
@@ -44,7 +44,7 @@ protected:
|
|
44
44
|
|
45
45
|
SkPath onAsPath(const SkSVGRenderContext&) const override;
|
46
46
|
|
47
|
-
SkRect
|
47
|
+
SkRect onObjectBoundingBox(const SkSVGRenderContext&) const override;
|
48
48
|
|
49
49
|
private:
|
50
50
|
SkSVGRect();
|