aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Derek Sollenberger <djsollen@google.com>2017-09-20 15:51:08 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-21 18:14:36 +0000
commit2fbf1bc8c96f749a4c098bcfc827053445c2e12d (patch)
tree0271e86a08bec62b58b71d661c86bc0af325488e /src
parentf4b9bf7d9e688f1afedcf4a960a31582ddb56f4a (diff)
Add SK_API to APIs used by the android framework.
This CL enables us to set the default visibility of the symbols on Android to hidden. It is the intent that all of he SK_APIs that have been added to /src directies should be removed as soon as we can remove their callers within Android. Bug: b/31971097 Change-Id: Ic787f94df0fb0c2b8d941aa7095a12b317c4b5de Reviewed-on: https://skia-review.googlesource.com/49501 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/SkDither.h4
-rw-r--r--src/core/SkGeometry.h4
-rw-r--r--src/core/SkHalf.h2
-rw-r--r--src/core/SkImagePriv.h2
-rw-r--r--src/core/SkLatticeIter.h2
-rw-r--r--src/core/SkOpts.h2
-rw-r--r--src/core/SkPM4f.h2
-rw-r--r--src/effects/SkBlurMask.h4
-rw-r--r--src/images/SkJPEGWriteUtility.h4
9 files changed, 13 insertions, 13 deletions
diff --git a/src/core/SkDither.h b/src/core/SkDither.h
index b73f72e3df..685d11754e 100644
--- a/src/core/SkDither.h
+++ b/src/core/SkDither.h
@@ -183,8 +183,8 @@ static inline SkPMColor16 SkDitherARGB32To4444(SkPMColor c, unsigned dither)
#define DITHER_VALUE(x) dither_scan[(x) & 3]
#else
- extern const uint16_t gDitherMatrix_4Bit_16[4];
- extern const uint16_t gDitherMatrix_3Bit_16[4];
+ extern SK_API const uint16_t gDitherMatrix_4Bit_16[4];
+ extern SK_API const uint16_t gDitherMatrix_3Bit_16[4];
#define DITHER_4444_SCAN(y) const uint16_t dither_scan = gDitherMatrix_4Bit_16[(y) & 3]
#define DITHER_565_SCAN(y) const uint16_t dither_scan = gDitherMatrix_3Bit_16[(y) & 3]
diff --git a/src/core/SkGeometry.h b/src/core/SkGeometry.h
index 96565888d8..675ee80ae0 100644
--- a/src/core/SkGeometry.h
+++ b/src/core/SkGeometry.h
@@ -258,13 +258,13 @@ struct SkConic {
* return the power-of-2 number of quads needed to approximate this conic
* with a sequence of quads. Will be >= 0.
*/
- int computeQuadPOW2(SkScalar tol) const;
+ int SK_API computeQuadPOW2(SkScalar tol) const;
/**
* Chop this conic into N quads, stored continguously in pts[], where
* N = 1 << pow2. The amount of storage needed is (1 + 2 * N)
*/
- int SK_WARN_UNUSED_RESULT chopIntoQuadsPOW2(SkPoint pts[], int pow2) const;
+ int SK_API SK_WARN_UNUSED_RESULT chopIntoQuadsPOW2(SkPoint pts[], int pow2) const;
bool findXExtrema(SkScalar* t) const;
bool findYExtrema(SkScalar* t) const;
diff --git a/src/core/SkHalf.h b/src/core/SkHalf.h
index 926137b45c..a862990d4a 100644
--- a/src/core/SkHalf.h
+++ b/src/core/SkHalf.h
@@ -23,7 +23,7 @@ static constexpr uint16_t SK_Half1 = 0x3C00; // 1
// convert between half and single precision floating point
float SkHalfToFloat(SkHalf h);
-SkHalf SkFloatToHalf(float f);
+SkHalf SK_API SkFloatToHalf(float f);
// Convert between half and single precision floating point,
// assuming inputs and outputs are both finite, and may
diff --git a/src/core/SkImagePriv.h b/src/core/SkImagePriv.h
index 509b7fa34f..349402491d 100644
--- a/src/core/SkImagePriv.h
+++ b/src/core/SkImagePriv.h
@@ -43,7 +43,7 @@ sk_sp<SkShader> SkMakeBitmapShader(const SkBitmap& src, SkShader::TileMode, SkSh
* SkImageInfo, or the bitmap's pixels cannot be accessed, this will return
* nullptr.
*/
-extern sk_sp<SkImage> SkMakeImageFromRasterBitmap(const SkBitmap&, SkCopyPixelsMode);
+extern SK_API sk_sp<SkImage> SkMakeImageFromRasterBitmap(const SkBitmap&, SkCopyPixelsMode);
/**
* Similar to SkMakeImageFromRasterBitmap, this wraps a |src| bitmap in an image.
diff --git a/src/core/SkLatticeIter.h b/src/core/SkLatticeIter.h
index f3d37e6688..aad39824d5 100644
--- a/src/core/SkLatticeIter.h
+++ b/src/core/SkLatticeIter.h
@@ -18,7 +18,7 @@ struct SkRect;
/**
* Disect a lattice request into an sequence of src-rect / dst-rect pairs
*/
-class SkLatticeIter {
+class SK_API SkLatticeIter {
public:
static bool Valid(int imageWidth, int imageHeight, const SkCanvas::Lattice& lattice);
diff --git a/src/core/SkOpts.h b/src/core/SkOpts.h
index b54ed1f276..329a75cbef 100644
--- a/src/core/SkOpts.h
+++ b/src/core/SkOpts.h
@@ -49,7 +49,7 @@ namespace SkOpts {
inverted_CMYK_to_BGR1; // i.e. convert color space
extern void (*memset16)(uint16_t[], uint16_t, int);
- extern void (*memset32)(uint32_t[], uint32_t, int);
+ extern void SK_API (*memset32)(uint32_t[], uint32_t, int);
extern void (*memset64)(uint64_t[], uint64_t, int);
// The fastest high quality 32-bit hash we can provide on this platform.
diff --git a/src/core/SkPM4f.h b/src/core/SkPM4f.h
index dd54403a7b..e1cb1cd27d 100644
--- a/src/core/SkPM4f.h
+++ b/src/core/SkPM4f.h
@@ -26,7 +26,7 @@ static inline Sk4f swizzle_rb_if_bgra(const Sk4f& x) {
/*
* The float values are 0...1 premultiplied in RGBA order (regardless of SkPMColor order)
*/
-struct SkPM4f {
+struct SK_API SkPM4f {
enum {
R, G, B, A,
};
diff --git a/src/effects/SkBlurMask.h b/src/effects/SkBlurMask.h
index e2e4aea7ca..9da19fab5a 100644
--- a/src/effects/SkBlurMask.h
+++ b/src/effects/SkBlurMask.h
@@ -47,9 +47,9 @@ public:
SkBlurStyle, SkIPoint* margin = nullptr);
// If radius > 0, return the corresponding sigma, else return 0
- static SkScalar ConvertRadiusToSigma(SkScalar radius);
+ static SkScalar SK_API ConvertRadiusToSigma(SkScalar radius);
// If sigma > 0.5, return the corresponding radius, else return 0
- static SkScalar ConvertSigmaToRadius(SkScalar sigma);
+ static SkScalar SK_API ConvertSigmaToRadius(SkScalar sigma);
/* Helper functions for analytic rectangle blurs */
diff --git a/src/images/SkJPEGWriteUtility.h b/src/images/SkJPEGWriteUtility.h
index 3765e7e674..c153459349 100644
--- a/src/images/SkJPEGWriteUtility.h
+++ b/src/images/SkJPEGWriteUtility.h
@@ -19,13 +19,13 @@ extern "C" {
#include <setjmp.h>
-void skjpeg_error_exit(j_common_ptr cinfo);
+void SK_API skjpeg_error_exit(j_common_ptr cinfo);
/////////////////////////////////////////////////////////////////////////////
/* Our destination struct for directing decompressed pixels to our stream
* object.
*/
-struct skjpeg_destination_mgr : jpeg_destination_mgr {
+struct SK_API skjpeg_destination_mgr : jpeg_destination_mgr {
skjpeg_destination_mgr(SkWStream* stream);
SkWStream* fStream;