@shopify/react-native-skia 0.1.213 → 0.1.214
Sign up to get free protection for your applications and to get access to all the features.
- package/android/cpp/rnskia-android/SkiaOpenGLHelper.h +3 -2
- package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.cpp +9 -2
- package/cpp/api/JsiSkSurface.h +4 -1
- package/cpp/skia/include/android/GrAHardwareBufferUtils.h +99 -0
- package/cpp/skia/include/android/SkHeifDecoder.h +10 -3
- package/cpp/skia/include/codec/SkAvifDecoder.h +1 -0
- package/cpp/skia/include/codec/SkBmpDecoder.h +1 -0
- package/cpp/skia/include/codec/SkCodec.h +4 -3
- package/cpp/skia/include/codec/SkEncodedImageFormat.h +0 -3
- package/cpp/skia/include/codec/SkGifDecoder.h +1 -0
- package/cpp/skia/include/codec/SkIcoDecoder.h +1 -0
- package/cpp/skia/include/codec/SkJpegDecoder.h +1 -0
- package/cpp/skia/include/codec/SkJpegxlDecoder.h +1 -0
- package/cpp/skia/include/codec/SkPngDecoder.h +1 -0
- package/cpp/skia/include/codec/SkRawDecoder.h +1 -0
- package/cpp/skia/include/codec/SkWbmpDecoder.h +1 -0
- package/cpp/skia/include/codec/SkWebpDecoder.h +1 -0
- package/cpp/skia/include/config/SkUserConfig.h +0 -2
- package/cpp/skia/include/core/SkBitmap.h +8 -8
- package/cpp/skia/include/core/SkCanvas.h +37 -50
- package/cpp/skia/include/core/SkCapabilities.h +2 -7
- package/cpp/skia/include/core/SkColor.h +1 -1
- package/cpp/skia/include/core/SkColorFilter.h +6 -0
- package/cpp/skia/include/core/SkColorTable.h +3 -0
- package/cpp/skia/include/core/SkColorType.h +2 -0
- package/cpp/skia/include/core/SkContourMeasure.h +12 -8
- package/cpp/skia/include/core/SkDocument.h +1 -0
- package/cpp/skia/include/core/SkFont.h +11 -2
- package/cpp/skia/include/core/SkFontMgr.h +2 -3
- package/cpp/skia/include/core/SkGraphics.h +3 -13
- package/cpp/skia/include/core/SkImage.h +57 -111
- package/cpp/skia/include/core/SkImageFilter.h +6 -1
- package/cpp/skia/include/core/SkImageGenerator.h +8 -0
- package/cpp/skia/include/core/SkImageInfo.h +0 -2
- package/cpp/skia/include/core/SkM44.h +7 -3
- package/cpp/skia/include/core/SkMallocPixelRef.h +4 -1
- package/cpp/skia/include/core/SkMatrix.h +17 -17
- package/cpp/skia/include/core/SkMesh.h +71 -61
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkOverdrawCanvas.h +25 -0
- package/cpp/skia/include/core/SkPaint.h +1 -1
- package/cpp/skia/include/core/SkPath.h +12 -4
- package/cpp/skia/include/core/SkPathMeasure.h +3 -4
- package/cpp/skia/include/core/SkPicture.h +19 -6
- package/cpp/skia/include/core/SkPictureRecorder.h +6 -6
- package/cpp/skia/include/core/SkPixmap.h +2 -3
- package/cpp/skia/include/core/SkRRect.h +1 -1
- package/cpp/skia/include/core/SkRect.h +107 -110
- package/cpp/skia/include/core/SkRefCnt.h +1 -1
- package/cpp/skia/include/core/SkRegion.h +7 -1
- package/cpp/skia/include/core/SkSerialProcs.h +14 -0
- package/cpp/skia/include/core/SkShader.h +9 -0
- package/cpp/skia/include/core/SkStream.h +9 -9
- package/cpp/skia/include/core/SkString.h +1 -1
- package/cpp/skia/include/core/SkSurface.h +14 -25
- package/cpp/skia/include/core/SkTextBlob.h +17 -4
- package/cpp/skia/include/core/SkTiledImageUtils.h +28 -0
- package/cpp/skia/include/core/SkTypeface.h +7 -2
- package/cpp/skia/include/core/SkTypes.h +4 -12
- package/cpp/skia/include/docs/SkPDFDocument.h +17 -3
- package/cpp/skia/include/effects/SkImageFilters.h +73 -24
- package/cpp/skia/include/effects/SkRuntimeEffect.h +20 -51
- package/cpp/skia/include/gpu/GpuTypes.h +13 -0
- package/cpp/skia/include/gpu/GrBackendSurface.h +95 -262
- package/cpp/skia/include/gpu/GrContextOptions.h +7 -1
- package/cpp/skia/include/gpu/GrDirectContext.h +138 -128
- package/cpp/skia/include/gpu/GrRecordingContext.h +9 -4
- package/cpp/skia/include/gpu/GrSurfaceInfo.h +0 -24
- package/cpp/skia/include/gpu/GrTypes.h +16 -1
- package/cpp/skia/include/gpu/GrYUVABackendTextures.h +4 -4
- package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +2 -2
- package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +44 -12
- package/cpp/skia/include/gpu/ganesh/SkMeshGanesh.h +57 -0
- package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +2 -1
- package/cpp/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h +58 -0
- package/cpp/skia/include/gpu/ganesh/gl/GrGLDirectContext.h +29 -0
- package/cpp/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h +1 -1
- package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h +67 -0
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -2
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +14 -3
- package/cpp/skia/include/gpu/graphite/Context.h +93 -13
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +19 -8
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +23 -0
- package/cpp/skia/include/gpu/graphite/Image.h +56 -0
- package/cpp/skia/include/gpu/graphite/ImageProvider.h +5 -0
- package/cpp/skia/include/gpu/graphite/Recorder.h +26 -9
- package/cpp/skia/include/gpu/graphite/Recording.h +7 -5
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +8 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +2 -2
- package/cpp/skia/include/gpu/mtl/GrMtlTypes.h +2 -2
- package/cpp/skia/include/gpu/vk/GrVkTypes.h +4 -3
- package/cpp/skia/include/ports/SkCFObject.h +1 -1
- package/cpp/skia/include/private/SkGainmapInfo.h +4 -13
- package/cpp/skia/include/private/SkJpegGainmapEncoder.h +1 -24
- package/cpp/skia/include/private/SkWeakRefCnt.h +1 -1
- package/cpp/skia/include/private/base/SkAnySubclass.h +73 -0
- package/cpp/skia/include/private/base/SkAssert.h +106 -12
- package/cpp/skia/include/private/base/SkAttributes.h +0 -12
- package/cpp/skia/include/private/base/SkFeatures.h +0 -3
- package/cpp/skia/include/private/base/SkFloatingPoint.h +58 -105
- package/cpp/skia/include/private/base/SkSpan_impl.h +18 -12
- package/cpp/skia/include/private/base/SkTArray.h +22 -17
- package/cpp/skia/include/private/base/SkTDArray.h +5 -6
- package/cpp/skia/include/private/base/SkTemplates.h +50 -30
- package/cpp/skia/include/private/chromium/GrDeferredDisplayListRecorder.h +5 -2
- package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +2 -2
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +13 -8
- package/cpp/skia/include/private/chromium/SkDiscardableMemory.h +1 -1
- package/cpp/skia/include/private/chromium/SkImageChromium.h +16 -3
- package/cpp/skia/include/private/chromium/Slug.h +11 -4
- package/cpp/skia/include/private/gpu/ganesh/GrD3DTypesMinimal.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +6 -9
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +29 -13
- package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +2 -28
- package/cpp/skia/include/private/gpu/graphite/ContextOptionsPriv.h +34 -0
- package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +6 -0
- package/cpp/skia/include/private/gpu/graphite/MtlGraphiteTypesPriv.h +8 -0
- package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +10 -0
- package/cpp/skia/include/utils/SkBase64.h +2 -2
- package/cpp/skia/include/utils/SkNWayCanvas.h +1 -11
- package/cpp/skia/include/utils/SkNoDrawCanvas.h +0 -2
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +1 -2
- package/cpp/skia/include/utils/SkShadowUtils.h +15 -1
- package/cpp/skia/include/utils/SkTextUtils.h +1 -1
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +107 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +3 -2
- package/cpp/skia/modules/skparagraph/include/ParagraphStyle.h +4 -0
- package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +5 -3
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +4 -0
- package/cpp/skia/src/core/SkChecksum.h +2 -1
- package/cpp/skia/src/core/SkPathPriv.h +1 -1
- package/cpp/skia/src/core/SkTHash.h +19 -9
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +3 -1
- package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js +5 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/commonjs/external/reanimated/index.d.ts +1 -0
- package/lib/commonjs/external/reanimated/index.js +13 -0
- package/lib/commonjs/external/reanimated/index.js.map +1 -1
- package/lib/commonjs/external/reanimated/moduleWrapper.js +3 -8
- package/lib/commonjs/external/reanimated/moduleWrapper.js.map +1 -1
- package/lib/commonjs/external/reanimated/renderHelpers.js +46 -1
- package/lib/commonjs/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.d.ts +2 -0
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js +26 -0
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js.map +1 -0
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js +2 -5
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js.map +1 -1
- package/lib/commonjs/skia/types/MaskFilter.js +4 -0
- package/lib/commonjs/skia/types/MaskFilter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js +2 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.js +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
- package/lib/commonjs/views/types.js +3 -0
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Rect.js +5 -1
- package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/module/external/reanimated/index.d.ts +1 -0
- package/lib/module/external/reanimated/index.js +1 -0
- package/lib/module/external/reanimated/index.js.map +1 -1
- package/lib/module/external/reanimated/moduleWrapper.js +1 -9
- package/lib/module/external/reanimated/moduleWrapper.js.map +1 -1
- package/lib/module/external/reanimated/renderHelpers.js +48 -2
- package/lib/module/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/module/external/reanimated/useDerivedValueOnJS.d.ts +2 -0
- package/lib/module/external/reanimated/useDerivedValueOnJS.js +15 -0
- package/lib/module/external/reanimated/useDerivedValueOnJS.js.map +1 -0
- package/lib/module/external/reanimated/useSharedValueEffect.js +3 -6
- package/lib/module/external/reanimated/useSharedValueEffect.js.map +1 -1
- package/lib/module/skia/types/MaskFilter.js +3 -0
- package/lib/module/skia/types/MaskFilter.js.map +1 -1
- package/lib/module/views/types.js +3 -0
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/src/external/reanimated/index.d.ts +1 -0
- package/lib/typescript/src/external/reanimated/useDerivedValueOnJS.d.ts +2 -0
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libskottie.a +0 -0
- package/libs/android/arm64-v8a/libskparagraph.a +0 -0
- package/libs/android/arm64-v8a/libsksg.a +0 -0
- package/libs/android/arm64-v8a/libskshaper.a +0 -0
- package/libs/android/arm64-v8a/libskunicode.a +0 -0
- package/libs/android/arm64-v8a/libsvg.a +0 -0
- package/libs/android/armeabi-v7a/libskia.a +0 -0
- package/libs/android/armeabi-v7a/libskottie.a +0 -0
- package/libs/android/armeabi-v7a/libskparagraph.a +0 -0
- package/libs/android/armeabi-v7a/libsksg.a +0 -0
- package/libs/android/armeabi-v7a/libskshaper.a +0 -0
- package/libs/android/armeabi-v7a/libskunicode.a +0 -0
- package/libs/android/armeabi-v7a/libsvg.a +0 -0
- package/libs/android/x86/libskia.a +0 -0
- package/libs/android/x86/libskottie.a +0 -0
- package/libs/android/x86/libskparagraph.a +0 -0
- package/libs/android/x86/libsksg.a +0 -0
- package/libs/android/x86/libskshaper.a +0 -0
- package/libs/android/x86/libskunicode.a +0 -0
- package/libs/android/x86/libsvg.a +0 -0
- package/libs/android/x86_64/libskia.a +0 -0
- package/libs/android/x86_64/libskottie.a +0 -0
- package/libs/android/x86_64/libskparagraph.a +0 -0
- package/libs/android/x86_64/libsksg.a +0 -0
- package/libs/android/x86_64/libskshaper.a +0 -0
- package/libs/android/x86_64/libskunicode.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/Info.plist +5 -5
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/ios/libskparagraph.xcframework/Info.plist +5 -5
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/ios/libsksg.xcframework/Info.plist +5 -5
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/libskunicode.xcframework/Info.plist +5 -5
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
- package/libs/ios/libsvg.xcframework/Info.plist +5 -5
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +1 -1
- package/react-native-skia.podspec +1 -1
- package/src/dom/nodes/datatypes/Rect.ts +6 -2
- package/src/external/reanimated/index.ts +1 -0
- package/src/external/reanimated/moduleWrapper.ts +6 -10
- package/src/external/reanimated/renderHelpers.ts +41 -1
- package/src/external/reanimated/useDerivedValueOnJS.ts +24 -0
- package/src/external/reanimated/useSharedValueEffect.ts +4 -7
- package/cpp/skia/include/core/SkDeferredDisplayList.h +0 -15
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +0 -15
- package/cpp/skia/include/core/SkPromiseImageTexture.h +0 -20
- package/cpp/skia/include/core/SkSurfaceCharacterization.h +0 -15
- package/cpp/skia/include/core/SkTime.h +0 -63
- package/cpp/skia/include/effects/SkOpPathEffect.h +0 -43
- package/cpp/skia/include/effects/SkStrokeAndFillPathEffect.h +0 -28
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +0 -32
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +0 -95
- package/cpp/skia/include/private/SkBitmaskEnum.h +0 -59
- package/cpp/skia/include/private/SkSLDefines.h +0 -64
- package/cpp/skia/include/private/SkShadowFlags.h +0 -27
- package/cpp/skia/include/private/gpu/ganesh/GrDawnTypesPriv.h +0 -26
- /package/cpp/skia/{include/private/base → src/core}/SkPathEnums.h +0 -0
@@ -12,52 +12,42 @@
|
|
12
12
|
#include "include/private/base/SkFloatBits.h"
|
13
13
|
#include "include/private/base/SkMath.h"
|
14
14
|
|
15
|
-
#include <cfloat>
|
16
15
|
#include <cmath>
|
17
16
|
#include <cstdint>
|
18
17
|
#include <cstring>
|
19
|
-
|
20
|
-
|
21
|
-
constexpr float
|
22
|
-
constexpr
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
static inline float
|
28
|
-
|
29
|
-
}
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
#endif
|
45
|
-
#define sk_float_atan2(y,x) atan2f(y,x)
|
46
|
-
#define sk_float_abs(x) fabsf(x)
|
47
|
-
#define sk_float_copysign(x, y) copysignf(x, y)
|
48
|
-
#define sk_float_mod(x,y) fmodf(x,y)
|
49
|
-
#define sk_float_exp(x) expf(x)
|
50
|
-
#define sk_float_log(x) logf(x)
|
51
|
-
|
52
|
-
constexpr int sk_float_sgn(float x) {
|
18
|
+
#include <limits>
|
19
|
+
|
20
|
+
inline constexpr float SK_FloatSqrt2 = 1.41421356f;
|
21
|
+
inline constexpr float SK_FloatPI = 3.14159265f;
|
22
|
+
inline constexpr double SK_DoublePI = 3.14159265358979323846264338327950288;
|
23
|
+
|
24
|
+
static inline float sk_float_sqrt(float x) { return std::sqrt(x); }
|
25
|
+
static inline float sk_float_sin(float x) { return std::sin(x); }
|
26
|
+
static inline float sk_float_cos(float x) { return std::cos(x); }
|
27
|
+
static inline float sk_float_tan(float x) { return std::tan(x); }
|
28
|
+
static inline float sk_float_floor(float x) { return std::floor(x); }
|
29
|
+
static inline float sk_float_ceil(float x) { return std::ceil(x); }
|
30
|
+
static inline float sk_float_trunc(float x) { return std::trunc(x); }
|
31
|
+
static inline float sk_float_acos(float x) { return std::acos(x); }
|
32
|
+
static inline float sk_float_asin(float x) { return std::asin(x); }
|
33
|
+
static inline float sk_float_atan2(float y, float x) { return std::atan2(y,x); }
|
34
|
+
static inline float sk_float_abs(float x) { return std::fabs(x); }
|
35
|
+
static inline float sk_float_copysign(float x, float y) { return std::copysign(x, y); }
|
36
|
+
static inline float sk_float_mod(float x, float y) { return std::fmod(x,y); }
|
37
|
+
static inline float sk_float_pow(float x, float y) { return std::pow(x, y); }
|
38
|
+
static inline float sk_float_exp(float x) { return std::exp(x); }
|
39
|
+
static inline float sk_float_log(float x) { return std::log(x); }
|
40
|
+
static inline float sk_float_log2(float x) { return std::log2(x); }
|
41
|
+
|
42
|
+
static constexpr int sk_float_sgn(float x) {
|
53
43
|
return (0.0f < x) - (x < 0.0f);
|
54
44
|
}
|
55
45
|
|
56
|
-
constexpr float sk_float_degrees_to_radians(float degrees) {
|
46
|
+
static constexpr float sk_float_degrees_to_radians(float degrees) {
|
57
47
|
return degrees * (SK_FloatPI / 180);
|
58
48
|
}
|
59
49
|
|
60
|
-
constexpr float sk_float_radians_to_degrees(float radians) {
|
50
|
+
static constexpr float sk_float_radians_to_degrees(float radians) {
|
61
51
|
return radians * (180 / SK_FloatPI);
|
62
52
|
}
|
63
53
|
|
@@ -66,16 +56,6 @@ constexpr float sk_float_radians_to_degrees(float radians) {
|
|
66
56
|
// as floatf(x + .5f), they would be 1 higher than expected.
|
67
57
|
#define sk_float_round(x) (float)sk_double_round((double)(x))
|
68
58
|
|
69
|
-
// can't find log2f on android, but maybe that just a tool bug?
|
70
|
-
#ifdef SK_BUILD_FOR_ANDROID
|
71
|
-
static inline float sk_float_log2(float x) {
|
72
|
-
const double inv_ln_2 = 1.44269504088896;
|
73
|
-
return (float)(log(x) * inv_ln_2);
|
74
|
-
}
|
75
|
-
#else
|
76
|
-
#define sk_float_log2(x) log2f(x)
|
77
|
-
#endif
|
78
|
-
|
79
59
|
static inline bool sk_float_isfinite(float x) {
|
80
60
|
return SkFloatBits_IsFinite(SkFloat2Bits(x));
|
81
61
|
}
|
@@ -97,22 +77,20 @@ static inline bool sk_float_isinf(float x) {
|
|
97
77
|
return SkFloatBits_IsInf(SkFloat2Bits(x));
|
98
78
|
}
|
99
79
|
|
100
|
-
static
|
101
|
-
|
102
|
-
}
|
103
|
-
|
104
|
-
#define sk_double_isnan(a) sk_float_isnan(a)
|
80
|
+
static constexpr bool sk_float_isnan(float x) { return x != x; }
|
81
|
+
static constexpr bool sk_double_isnan(double x) { return x != x; }
|
105
82
|
|
106
|
-
|
107
|
-
|
83
|
+
inline constexpr int SK_MaxS32FitsInFloat = 2147483520;
|
84
|
+
inline constexpr int SK_MinS32FitsInFloat = -SK_MaxS32FitsInFloat;
|
108
85
|
|
109
|
-
|
110
|
-
|
86
|
+
// 0x7fffff8000000000
|
87
|
+
inline constexpr int64_t SK_MaxS64FitsInFloat = SK_MaxS64 >> (63-24) << (63-24);
|
88
|
+
inline constexpr int64_t SK_MinS64FitsInFloat = -SK_MaxS64FitsInFloat;
|
111
89
|
|
112
90
|
/**
|
113
91
|
* Return the closest int for the given float. Returns SK_MaxS32FitsInFloat for NaN.
|
114
92
|
*/
|
115
|
-
static
|
93
|
+
static constexpr int sk_float_saturate2int(float x) {
|
116
94
|
x = x < SK_MaxS32FitsInFloat ? x : SK_MaxS32FitsInFloat;
|
117
95
|
x = x > SK_MinS32FitsInFloat ? x : SK_MinS32FitsInFloat;
|
118
96
|
return (int)x;
|
@@ -121,7 +99,7 @@ static inline int sk_float_saturate2int(float x) {
|
|
121
99
|
/**
|
122
100
|
* Return the closest int for the given double. Returns SK_MaxS32 for NaN.
|
123
101
|
*/
|
124
|
-
static
|
102
|
+
static constexpr int sk_double_saturate2int(double x) {
|
125
103
|
x = x < SK_MaxS32 ? x : SK_MaxS32;
|
126
104
|
x = x > SK_MinS32 ? x : SK_MinS32;
|
127
105
|
return (int)x;
|
@@ -130,7 +108,7 @@ static inline int sk_double_saturate2int(double x) {
|
|
130
108
|
/**
|
131
109
|
* Return the closest int64_t for the given float. Returns SK_MaxS64FitsInFloat for NaN.
|
132
110
|
*/
|
133
|
-
static
|
111
|
+
static constexpr int64_t sk_float_saturate2int64(float x) {
|
134
112
|
x = x < SK_MaxS64FitsInFloat ? x : SK_MaxS64FitsInFloat;
|
135
113
|
x = x > SK_MinS64FitsInFloat ? x : SK_MinS64FitsInFloat;
|
136
114
|
return (int64_t)x;
|
@@ -155,72 +133,47 @@ static inline int64_t sk_float_saturate2int64(float x) {
|
|
155
133
|
// Clang thinks this is undefined, but it's actually implementation defined to return either
|
156
134
|
// the largest float or infinity (one of the two bracketing representable floats). Good enough!
|
157
135
|
SK_NO_SANITIZE("float-cast-overflow")
|
158
|
-
static
|
136
|
+
static constexpr float sk_double_to_float(double x) {
|
159
137
|
return static_cast<float>(x);
|
160
138
|
}
|
161
139
|
|
162
|
-
|
163
|
-
|
164
|
-
|
140
|
+
inline constexpr float SK_FloatNaN = std::numeric_limits<float>::quiet_NaN();
|
141
|
+
inline constexpr float SK_FloatInfinity = std::numeric_limits<float>::infinity();
|
142
|
+
inline constexpr float SK_FloatNegativeInfinity = -SK_FloatInfinity;
|
165
143
|
|
166
|
-
|
144
|
+
inline constexpr double SK_DoubleNaN = std::numeric_limits<double>::quiet_NaN();
|
167
145
|
|
168
|
-
//
|
169
|
-
|
146
|
+
// Calculate the midpoint between a and b. Similar to std::midpoint in c++20.
|
147
|
+
static constexpr float sk_float_midpoint(float a, float b) {
|
148
|
+
// Use double math to avoid underflow and overflow.
|
149
|
+
return static_cast<float>(0.5 * (static_cast<double>(a) + b));
|
150
|
+
}
|
151
|
+
|
152
|
+
// Returns false if any of the floats are outside the range [0...1].
|
153
|
+
// Returns true if count is 0.
|
170
154
|
bool sk_floats_are_unit(const float array[], size_t count);
|
171
155
|
|
172
156
|
static inline float sk_float_rsqrt_portable(float x) { return 1.0f / sk_float_sqrt(x); }
|
173
157
|
static inline float sk_float_rsqrt (float x) { return 1.0f / sk_float_sqrt(x); }
|
174
158
|
|
175
|
-
//
|
176
|
-
|
177
|
-
// Never returns a negative number, even if value is NaN.
|
178
|
-
//
|
179
|
-
// sk_float_nextlog2((-inf..1]) -> 0
|
180
|
-
// sk_float_nextlog2((1..2]) -> 1
|
181
|
-
// sk_float_nextlog2((2..4]) -> 2
|
182
|
-
// sk_float_nextlog2((4..8]) -> 3
|
183
|
-
// ...
|
184
|
-
static inline int sk_float_nextlog2(float x) {
|
185
|
-
uint32_t bits = (uint32_t)SkFloat2Bits(x);
|
186
|
-
bits += (1u << 23) - 1u; // Increment the exponent for non-powers-of-2.
|
187
|
-
int exp = ((int32_t)bits >> 23) - 127;
|
188
|
-
return exp & ~(exp >> 31); // Return 0 for negative or denormalized floats, and exponents < 0.
|
189
|
-
}
|
190
|
-
|
191
|
-
// This is the number of significant digits we can print in a string such that when we read that
|
192
|
-
// string back we get the floating point number we expect. The minimum value C requires is 6, but
|
193
|
-
// most compilers support 9
|
194
|
-
#ifdef FLT_DECIMAL_DIG
|
195
|
-
#define SK_FLT_DECIMAL_DIG FLT_DECIMAL_DIG
|
196
|
-
#else
|
197
|
-
#define SK_FLT_DECIMAL_DIG 9
|
198
|
-
#endif
|
159
|
+
// The number of significant digits to print.
|
160
|
+
inline constexpr int SK_FLT_DECIMAL_DIG = std::numeric_limits<float>::max_digits10;
|
199
161
|
|
200
|
-
// IEEE defines how float divide behaves for non-finite values and zero-denoms, but C does not
|
162
|
+
// IEEE defines how float divide behaves for non-finite values and zero-denoms, but C does not,
|
201
163
|
// so we have a helper that suppresses the possible undefined-behavior warnings.
|
202
|
-
|
203
164
|
SK_NO_SANITIZE("float-divide-by-zero")
|
204
|
-
static
|
165
|
+
static constexpr float sk_ieee_float_divide(float numer, float denom) {
|
205
166
|
return numer / denom;
|
206
167
|
}
|
207
168
|
|
208
169
|
SK_NO_SANITIZE("float-divide-by-zero")
|
209
|
-
static
|
170
|
+
static constexpr double sk_ieee_double_divide(double numer, double denom) {
|
210
171
|
return numer / denom;
|
211
172
|
}
|
212
173
|
|
213
|
-
//
|
214
|
-
static inline float
|
215
|
-
return
|
216
|
-
}
|
217
|
-
|
218
|
-
static inline float sk_fmaf(float f, float m, float a) {
|
219
|
-
#if defined(FP_FAST_FMA)
|
220
|
-
return std::fmaf(f,m,a);
|
221
|
-
#else
|
222
|
-
return f*m+a;
|
223
|
-
#endif
|
174
|
+
// Return a*b + c.
|
175
|
+
static inline float sk_fmaf(float a, float b, float c) {
|
176
|
+
return std::fma(a, b, c);
|
224
177
|
}
|
225
178
|
|
226
179
|
// Returns true iff the provided number is within a small epsilon of 0.
|
@@ -9,6 +9,7 @@
|
|
9
9
|
#define SkSpan_DEFINED
|
10
10
|
|
11
11
|
#include "include/private/base/SkAssert.h"
|
12
|
+
#include "include/private/base/SkDebug.h"
|
12
13
|
#include "include/private/base/SkTo.h"
|
13
14
|
|
14
15
|
#include <cstddef>
|
@@ -82,11 +83,10 @@ public:
|
|
82
83
|
constexpr SkSpan& operator=(const SkSpan& that) = default;
|
83
84
|
|
84
85
|
constexpr T& operator [] (size_t i) const {
|
85
|
-
|
86
|
-
return fPtr[i];
|
86
|
+
return fPtr[sk_collection_check_bounds(i, this->size())];
|
87
87
|
}
|
88
|
-
constexpr T& front() const { return fPtr[0]; }
|
89
|
-
constexpr T& back() const { return fPtr[fSize - 1]; }
|
88
|
+
constexpr T& front() const { sk_collection_not_empty(this->empty()); return fPtr[0]; }
|
89
|
+
constexpr T& back() const { sk_collection_not_empty(this->empty()); return fPtr[fSize - 1]; }
|
90
90
|
constexpr T* begin() const { return fPtr; }
|
91
91
|
constexpr T* end() const { return fPtr + fSize; }
|
92
92
|
constexpr auto rbegin() const { return std::make_reverse_iterator(this->end()); }
|
@@ -96,24 +96,30 @@ public:
|
|
96
96
|
constexpr bool empty() const { return fSize == 0; }
|
97
97
|
constexpr size_t size_bytes() const { return fSize * sizeof(T); }
|
98
98
|
constexpr SkSpan<T> first(size_t prefixLen) const {
|
99
|
-
|
100
|
-
return SkSpan{fPtr, prefixLen};
|
99
|
+
return SkSpan{fPtr, sk_collection_check_length(prefixLen, fSize)};
|
101
100
|
}
|
102
101
|
constexpr SkSpan<T> last(size_t postfixLen) const {
|
103
|
-
|
104
|
-
|
102
|
+
return SkSpan{fPtr + (this->size() - postfixLen),
|
103
|
+
sk_collection_check_length(postfixLen, fSize)};
|
105
104
|
}
|
106
105
|
constexpr SkSpan<T> subspan(size_t offset) const {
|
107
106
|
return this->subspan(offset, this->size() - offset);
|
108
107
|
}
|
109
108
|
constexpr SkSpan<T> subspan(size_t offset, size_t count) const {
|
110
|
-
|
111
|
-
|
112
|
-
|
109
|
+
const size_t safeOffset = sk_collection_check_length(offset, fSize);
|
110
|
+
|
111
|
+
// Should read offset + count > size(), but that could overflow. We know that safeOffset
|
112
|
+
// is <= size, therefore the subtraction will not overflow.
|
113
|
+
if (count > this->size() - safeOffset) SK_UNLIKELY {
|
114
|
+
// The count is too large.
|
115
|
+
SkUNREACHABLE;
|
116
|
+
}
|
117
|
+
return SkSpan{fPtr + safeOffset, count};
|
113
118
|
}
|
114
119
|
|
115
120
|
private:
|
116
|
-
static
|
121
|
+
static constexpr size_t kMaxSize = std::numeric_limits<size_t>::max() / sizeof(T);
|
122
|
+
|
117
123
|
T* fPtr;
|
118
124
|
size_t fSize;
|
119
125
|
};
|
@@ -12,6 +12,7 @@
|
|
12
12
|
#include "include/private/base/SkAssert.h"
|
13
13
|
#include "include/private/base/SkAttributes.h"
|
14
14
|
#include "include/private/base/SkContainers.h"
|
15
|
+
#include "include/private/base/SkDebug.h"
|
15
16
|
#include "include/private/base/SkMalloc.h"
|
16
17
|
#include "include/private/base/SkMath.h"
|
17
18
|
#include "include/private/base/SkSpan_impl.h"
|
@@ -277,7 +278,7 @@ public:
|
|
277
278
|
* Removes the last element. Not safe to call when size() == 0.
|
278
279
|
*/
|
279
280
|
void pop_back() {
|
280
|
-
|
281
|
+
sk_collection_not_empty(this->empty());
|
281
282
|
--fSize;
|
282
283
|
fData[fSize].~T();
|
283
284
|
}
|
@@ -386,15 +387,11 @@ public:
|
|
386
387
|
* Get the i^th element.
|
387
388
|
*/
|
388
389
|
T& operator[] (int i) {
|
389
|
-
|
390
|
-
SkASSERT(i >= 0);
|
391
|
-
return fData[i];
|
390
|
+
return fData[sk_collection_check_bounds(i, this->size())];
|
392
391
|
}
|
393
392
|
|
394
393
|
const T& operator[] (int i) const {
|
395
|
-
|
396
|
-
SkASSERT(i >= 0);
|
397
|
-
return fData[i];
|
394
|
+
return fData[sk_collection_check_bounds(i, this->size())];
|
398
395
|
}
|
399
396
|
|
400
397
|
T& at(int i) { return (*this)[i]; }
|
@@ -403,30 +400,38 @@ public:
|
|
403
400
|
/**
|
404
401
|
* equivalent to operator[](0)
|
405
402
|
*/
|
406
|
-
T& front() {
|
403
|
+
T& front() {
|
404
|
+
sk_collection_not_empty(this->empty());
|
405
|
+
return fData[0];
|
406
|
+
}
|
407
407
|
|
408
|
-
const T& front() const {
|
408
|
+
const T& front() const {
|
409
|
+
sk_collection_not_empty(this->empty());
|
410
|
+
return fData[0];
|
411
|
+
}
|
409
412
|
|
410
413
|
/**
|
411
414
|
* equivalent to operator[](size() - 1)
|
412
415
|
*/
|
413
|
-
T& back() {
|
416
|
+
T& back() {
|
417
|
+
sk_collection_not_empty(this->empty());
|
418
|
+
return fData[fSize - 1];
|
419
|
+
}
|
414
420
|
|
415
|
-
const T& back() const {
|
421
|
+
const T& back() const {
|
422
|
+
sk_collection_not_empty(this->empty());
|
423
|
+
return fData[fSize - 1];
|
424
|
+
}
|
416
425
|
|
417
426
|
/**
|
418
427
|
* equivalent to operator[](size()-1-i)
|
419
428
|
*/
|
420
429
|
T& fromBack(int i) {
|
421
|
-
|
422
|
-
SkASSERT(i < this->size());
|
423
|
-
return fData[fSize - i - 1];
|
430
|
+
return (*this)[fSize - i - 1];
|
424
431
|
}
|
425
432
|
|
426
433
|
const T& fromBack(int i) const {
|
427
|
-
|
428
|
-
SkASSERT(i < this->size());
|
429
|
-
return fData[fSize - i - 1];
|
434
|
+
return (*this)[fSize - i - 1];
|
430
435
|
}
|
431
436
|
|
432
437
|
bool operator==(const TArray<T, MEM_MOVE>& right) const {
|
@@ -10,6 +10,7 @@
|
|
10
10
|
|
11
11
|
#include "include/private/base/SkAPI.h"
|
12
12
|
#include "include/private/base/SkAssert.h"
|
13
|
+
#include "include/private/base/SkDebug.h"
|
13
14
|
#include "include/private/base/SkTo.h"
|
14
15
|
|
15
16
|
#include <algorithm>
|
@@ -152,20 +153,18 @@ public:
|
|
152
153
|
const T* end() const { return this->data() + this->size(); }
|
153
154
|
|
154
155
|
T& operator[](int index) {
|
155
|
-
|
156
|
-
return this->data()[index];
|
156
|
+
return this->data()[sk_collection_check_bounds(index, this->size())];
|
157
157
|
}
|
158
158
|
const T& operator[](int index) const {
|
159
|
-
|
160
|
-
return this->data()[index];
|
159
|
+
return this->data()[sk_collection_check_bounds(index, this->size())];
|
161
160
|
}
|
162
161
|
|
163
162
|
const T& back() const {
|
164
|
-
|
163
|
+
sk_collection_not_empty(this->empty());
|
165
164
|
return this->data()[this->size() - 1];
|
166
165
|
}
|
167
166
|
T& back() {
|
168
|
-
|
167
|
+
sk_collection_not_empty(this->empty());
|
169
168
|
return this->data()[this->size() - 1];
|
170
169
|
}
|
171
170
|
|
@@ -13,6 +13,7 @@
|
|
13
13
|
#include "include/private/base/SkDebug.h"
|
14
14
|
#include "include/private/base/SkMalloc.h"
|
15
15
|
#include "include/private/base/SkTLogic.h"
|
16
|
+
#include "include/private/base/SkTo.h"
|
16
17
|
|
17
18
|
#include <array>
|
18
19
|
#include <cstddef>
|
@@ -98,49 +99,69 @@ namespace skia_private {
|
|
98
99
|
template <typename T> class AutoTArray {
|
99
100
|
public:
|
100
101
|
AutoTArray() {}
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
if (count) {
|
106
|
-
fArray.reset(new T[count]);
|
107
|
-
}
|
108
|
-
SkDEBUGCODE(fCount = count;)
|
102
|
+
// Allocate size number of T elements
|
103
|
+
explicit AutoTArray(size_t size) {
|
104
|
+
fSize = check_size_bytes_too_big<T>(size);
|
105
|
+
fData.reset(size > 0 ? new T[size] : nullptr);
|
109
106
|
}
|
110
107
|
|
111
|
-
|
112
|
-
|
108
|
+
// TODO: remove when all uses are gone.
|
109
|
+
explicit AutoTArray(int size) : AutoTArray(SkToSizeT(size)) {}
|
110
|
+
|
111
|
+
AutoTArray(AutoTArray&& other) : fData(std::move(other.fData)) {
|
112
|
+
fSize = std::exchange(other.fSize, 0);
|
113
113
|
}
|
114
114
|
AutoTArray& operator=(AutoTArray&& other) {
|
115
115
|
if (this != &other) {
|
116
|
-
|
117
|
-
|
116
|
+
fData = std::move(other.fData);
|
117
|
+
fSize = std::exchange(other.fSize, 0);
|
118
118
|
}
|
119
119
|
return *this;
|
120
120
|
}
|
121
121
|
|
122
|
-
|
123
|
-
|
124
|
-
|
122
|
+
// Reallocates given a new count. Reallocation occurs even if new count equals old count.
|
123
|
+
void reset(size_t count = 0) {
|
124
|
+
*this = AutoTArray(count);
|
125
|
+
}
|
125
126
|
|
126
|
-
|
127
|
-
*/
|
128
|
-
T* get() const { return fArray.get(); }
|
127
|
+
T* get() const { return fData.get(); }
|
129
128
|
|
130
|
-
|
131
|
-
|
132
|
-
T& operator[](int index) const {
|
133
|
-
SkASSERT((unsigned)index < (unsigned)fCount);
|
134
|
-
return fArray[index];
|
129
|
+
T& operator[](size_t index) const {
|
130
|
+
return fData[sk_collection_check_bounds(index, fSize)];
|
135
131
|
}
|
136
132
|
|
137
|
-
|
138
|
-
|
139
|
-
|
133
|
+
const T* data() const { return fData.get(); }
|
134
|
+
T* data() { return fData.get(); }
|
135
|
+
|
136
|
+
size_t size() const { return fSize; }
|
137
|
+
bool empty() const { return fSize == 0; }
|
138
|
+
size_t size_bytes() const { return sizeof(T) * fSize; }
|
139
|
+
|
140
|
+
T* begin() {
|
141
|
+
return fData;
|
142
|
+
}
|
143
|
+
const T* begin() const {
|
144
|
+
return fData;
|
145
|
+
}
|
146
|
+
|
147
|
+
// It's safe to use fItemArray + fSize because if fItemArray is nullptr then adding 0 is
|
148
|
+
// valid and returns nullptr. See [expr.add] in the C++ standard.
|
149
|
+
T* end() {
|
150
|
+
if (fData == nullptr) {
|
151
|
+
SkASSERT(fSize == 0);
|
152
|
+
}
|
153
|
+
return fData + fSize;
|
154
|
+
}
|
155
|
+
const T* end() const {
|
156
|
+
if (fData == nullptr) {
|
157
|
+
SkASSERT(fSize == 0);
|
158
|
+
}
|
159
|
+
return fData + fSize;
|
160
|
+
}
|
140
161
|
|
141
162
|
private:
|
142
|
-
std::unique_ptr<T[]>
|
143
|
-
|
163
|
+
std::unique_ptr<T[]> fData;
|
164
|
+
size_t fSize = 0;
|
144
165
|
};
|
145
166
|
|
146
167
|
/** Wraps AutoTArray, with room for kCountRequested elements preallocated.
|
@@ -223,8 +244,7 @@ public:
|
|
223
244
|
/** Return the nth element in the array
|
224
245
|
*/
|
225
246
|
T& operator[](int index) const {
|
226
|
-
|
227
|
-
return fArray[index];
|
247
|
+
return fArray[sk_collection_check_bounds(index, fCount)];
|
228
248
|
}
|
229
249
|
|
230
250
|
/** Aliases matching other types, like std::vector. */
|
@@ -10,7 +10,6 @@
|
|
10
10
|
|
11
11
|
#include "include/core/SkRefCnt.h"
|
12
12
|
#include "include/core/SkTypes.h"
|
13
|
-
#include "include/gpu/GrTypes.h"
|
14
13
|
#include "include/private/chromium/GrDeferredDisplayList.h"
|
15
14
|
#include "include/private/chromium/GrSurfaceCharacterization.h"
|
16
15
|
|
@@ -25,6 +24,10 @@ class GrPromiseImageTexture;
|
|
25
24
|
class SkSurface;
|
26
25
|
enum SkAlphaType : int;
|
27
26
|
enum SkColorType : int;
|
27
|
+
enum GrSurfaceOrigin : int;
|
28
|
+
namespace skgpu {
|
29
|
+
enum class Mipmapped : bool;
|
30
|
+
}
|
28
31
|
|
29
32
|
/*
|
30
33
|
* This class is intended to be used as:
|
@@ -64,7 +67,7 @@ public:
|
|
64
67
|
sk_sp<SkImage> makePromiseTexture(const GrBackendFormat& backendFormat,
|
65
68
|
int width,
|
66
69
|
int height,
|
67
|
-
|
70
|
+
skgpu::Mipmapped mipmapped,
|
68
71
|
GrSurfaceOrigin origin,
|
69
72
|
SkColorType colorType,
|
70
73
|
SkAlphaType alphaType,
|
@@ -144,7 +144,7 @@ private:
|
|
144
144
|
: fContextInfo(std::move(contextInfo))
|
145
145
|
, fCacheMaxResourceBytes(cacheMaxResourceBytes)
|
146
146
|
, fImageInfo(ii)
|
147
|
-
, fBackendFormat(backendFormat)
|
147
|
+
, fBackendFormat(std::move(backendFormat))
|
148
148
|
, fOrigin(origin)
|
149
149
|
, fSampleCnt(sampleCnt)
|
150
150
|
, fIsTextureable(isTextureable)
|
@@ -182,7 +182,7 @@ private:
|
|
182
182
|
fCacheMaxResourceBytes = cacheMaxResourceBytes;
|
183
183
|
|
184
184
|
fImageInfo = ii;
|
185
|
-
fBackendFormat = backendFormat;
|
185
|
+
fBackendFormat = std::move(backendFormat);
|
186
186
|
fOrigin = origin;
|
187
187
|
fSampleCnt = sampleCnt;
|
188
188
|
fIsTextureable = isTextureable;
|
@@ -8,20 +8,23 @@
|
|
8
8
|
#ifndef SkChromeRemoteGlyphCache_DEFINED
|
9
9
|
#define SkChromeRemoteGlyphCache_DEFINED
|
10
10
|
|
11
|
-
#include <memory>
|
12
|
-
#include <vector>
|
13
|
-
|
14
|
-
#include "include/core/SkData.h"
|
15
11
|
#include "include/core/SkRefCnt.h"
|
16
12
|
#include "include/core/SkTypeface.h"
|
17
|
-
#include "include/
|
13
|
+
#include "include/private/base/SkAPI.h"
|
14
|
+
|
15
|
+
#include <cstddef>
|
16
|
+
#include <cstdint>
|
17
|
+
#include <memory>
|
18
|
+
#include <vector>
|
18
19
|
|
19
|
-
struct SkPackedGlyphID;
|
20
20
|
class SkAutoDescriptor;
|
21
|
+
class SkCanvas;
|
22
|
+
class SkColorSpace;
|
21
23
|
class SkStrikeCache;
|
22
24
|
class SkStrikeClientImpl;
|
23
|
-
class SkStrikeServer;
|
24
25
|
class SkStrikeServerImpl;
|
26
|
+
class SkSurfaceProps;
|
27
|
+
struct SkDeserialProcs;
|
25
28
|
namespace sktext::gpu { class Slug; }
|
26
29
|
|
27
30
|
using SkDiscardableHandleId = uint32_t;
|
@@ -140,7 +143,9 @@ public:
|
|
140
143
|
|
141
144
|
// Given a buffer, unflatten into a slug making sure to do the typefaceID translation from
|
142
145
|
// renderer to GPU. Returns nullptr if there was a problem.
|
143
|
-
sk_sp<sktext::gpu::Slug> deserializeSlugForTest(const void* data,
|
146
|
+
sk_sp<sktext::gpu::Slug> deserializeSlugForTest(const void* data,
|
147
|
+
size_t size,
|
148
|
+
const SkDeserialProcs&) const;
|
144
149
|
|
145
150
|
private:
|
146
151
|
std::unique_ptr<SkStrikeClientImpl> fImpl;
|