Fix windows DLL builds with shaper included
Change-Id: I7adc1e01f4f9cec56e53e620ba4d04eae61f0b9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254899
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/utils/SkMultiPictureDocument.h b/src/utils/SkMultiPictureDocument.h
index b6d7be8..3c4924b 100644
--- a/src/utils/SkMultiPictureDocument.h
+++ b/src/utils/SkMultiPictureDocument.h
@@ -19,7 +19,7 @@
/**
* Writes into a file format that is similar to SkPicture::serialize()
*/
-SK_API sk_sp<SkDocument> SkMakeMultiPictureDocument(SkWStream* dst, const SkSerialProcs* = nullptr);
+SK_SPI sk_sp<SkDocument> SkMakeMultiPictureDocument(SkWStream* dst, const SkSerialProcs* = nullptr);
struct SkDocumentPage {
sk_sp<SkPicture> fPicture;
@@ -29,14 +29,14 @@
/**
* Returns the number of pages in the SkMultiPictureDocument.
*/
-SK_API int SkMultiPictureDocumentReadPageCount(SkStreamSeekable* src);
+SK_SPI int SkMultiPictureDocumentReadPageCount(SkStreamSeekable* src);
/**
* Read the SkMultiPictureDocument into the provided array of pages.
* dstArrayCount must equal SkMultiPictureDocumentReadPageCount().
* Return false on error.
*/
-SK_API bool SkMultiPictureDocumentRead(SkStreamSeekable* src,
+SK_SPI bool SkMultiPictureDocumentRead(SkStreamSeekable* src,
SkDocumentPage* dstArray,
int dstArrayCount,
const SkDeserialProcs* = nullptr);
diff --git a/src/utils/SkUTF.h b/src/utils/SkUTF.h
index 385102a..676ce4a 100644
--- a/src/utils/SkUTF.h
+++ b/src/utils/SkUTF.h
@@ -3,6 +3,7 @@
#ifndef SkUTF_DEFINED
#define SkUTF_DEFINED
+#include "include/core/SkTypes.h"
#include <cstddef>
#include <cstdint>
@@ -13,39 +14,39 @@
/** Given a sequence of UTF-8 bytes, return the number of unicode codepoints.
If the sequence is invalid UTF-8, return -1.
*/
-int CountUTF8(const char* utf8, size_t byteLength);
+SK_SPI int CountUTF8(const char* utf8, size_t byteLength);
/** Given a sequence of aligned UTF-16 characters in machine-endian form,
return the number of unicode codepoints. If the sequence is invalid
UTF-16, return -1.
*/
-int CountUTF16(const uint16_t* utf16, size_t byteLength);
+SK_SPI int CountUTF16(const uint16_t* utf16, size_t byteLength);
/** Given a sequence of aligned UTF-32 characters in machine-endian form,
return the number of unicode codepoints. If the sequence is invalid
UTF-32, return -1.
*/
-int CountUTF32(const int32_t* utf32, size_t byteLength);
+SK_SPI int CountUTF32(const int32_t* utf32, size_t byteLength);
/** Given a sequence of UTF-8 bytes, return the first unicode codepoint.
The pointer will be incremented to point at the next codepoint's start. If
invalid UTF-8 is encountered, set *ptr to end and return -1.
*/
-SkUnichar NextUTF8(const char** ptr, const char* end);
+SK_SPI SkUnichar NextUTF8(const char** ptr, const char* end);
/** Given a sequence of aligned UTF-16 characters in machine-endian form,
return the first unicode codepoint. The pointer will be incremented to
point at the next codepoint's start. If invalid UTF-16 is encountered,
set *ptr to end and return -1.
*/
-SkUnichar NextUTF16(const uint16_t** ptr, const uint16_t* end);
+SK_SPI SkUnichar NextUTF16(const uint16_t** ptr, const uint16_t* end);
/** Given a sequence of aligned UTF-32 characters in machine-endian form,
return the first unicode codepoint. The pointer will be incremented to
point at the next codepoint's start. If invalid UTF-32 is encountered,
set *ptr to end and return -1.
*/
-SkUnichar NextUTF32(const int32_t** ptr, const int32_t* end);
+SK_SPI SkUnichar NextUTF32(const int32_t** ptr, const int32_t* end);
constexpr unsigned kMaxBytesInUTF8Sequence = 4;
@@ -54,14 +55,14 @@
is null, simply return the number of bytes that would be used. For invalid
unicode codepoints, return 0.
*/
-size_t ToUTF8(SkUnichar uni, char utf8[kMaxBytesInUTF8Sequence] = nullptr);
+SK_SPI size_t ToUTF8(SkUnichar uni, char utf8[kMaxBytesInUTF8Sequence] = nullptr);
/** Convert the unicode codepoint into UTF-16. If `utf16` is non-null, place
the result in that array. Return the number of UTF-16 code units in the
result (1 or 2). If `utf16` is null, simply return the number of code
units that would be used. For invalid unicode codepoints, return 0.
*/
-size_t ToUTF16(SkUnichar uni, uint16_t utf16[2] = nullptr);
+SK_SPI size_t ToUTF16(SkUnichar uni, uint16_t utf16[2] = nullptr);
} // namespace SkUTF