From bf45c706396041f038656da7560edd24cd1a6cda Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Mon, 11 Jun 2018 11:56:57 -0400 Subject: Clean up a few IWYU issues Spun off from the SkTFitsIn CL. Change-Id: I686d680df6a36ebc02db3847ad5e2cedcbcd67ef Reviewed-on: https://skia-review.googlesource.com/134083 Reviewed-by: Mike Klein Commit-Queue: Mike Klein --- fuzz/Fuzz.h | 1 + include/core/SkTypes.h | 2 ++ include/private/SkPathRef.h | 1 + src/core/SkNx.h | 4 ++-- src/core/SkSafeMath.h | 1 + src/opts/SkNx_neon.h | 4 ++-- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/fuzz/Fuzz.h b/fuzz/Fuzz.h index 4fb7396ecc..3ffe47db2d 100644 --- a/fuzz/Fuzz.h +++ b/fuzz/Fuzz.h @@ -15,6 +15,7 @@ #include #include +#include class Fuzz : SkNoncopyable { public: diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index 06e101efbf..7945e12426 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -248,6 +248,8 @@ typedef uint32_t SkMSec; */ #ifdef __cplusplus +#include + /** Generic swap function. Classes with efficient swaps should specialize this function to take their fast path. This function is used by SkTSort. */ template static inline void SkTSwap(T& a, T& b) { diff --git a/include/private/SkPathRef.h b/include/private/SkPathRef.h index 9ce1aeef2c..d9c8849334 100644 --- a/include/private/SkPathRef.h +++ b/include/private/SkPathRef.h @@ -17,6 +17,7 @@ #include "SkRect.h" #include "SkRefCnt.h" #include "SkTemplates.h" +#include class SkRBuffer; class SkWBuffer; diff --git a/src/core/SkNx.h b/src/core/SkNx.h index 11c8f7c665..953654063a 100644 --- a/src/core/SkNx.h +++ b/src/core/SkNx.h @@ -103,8 +103,8 @@ struct SkNx { Half::Store2(ptr + 2*N/2*sizeof(T), a.fHi, b.fHi); } - AI T min() const { return std::min(fLo.min(), fHi.min()); } - AI T max() const { return std::max(fLo.max(), fHi.max()); } + AI T min() const { return SkTMin(fLo.min(), fHi.min()); } + AI T max() const { return SkTMax(fLo.max(), fHi.max()); } AI bool anyTrue() const { return fLo.anyTrue() || fHi.anyTrue(); } AI bool allTrue() const { return fLo.allTrue() && fHi.allTrue(); } diff --git a/src/core/SkSafeMath.h b/src/core/SkSafeMath.h index 0bc0fbfac4..f54be32fce 100644 --- a/src/core/SkSafeMath.h +++ b/src/core/SkSafeMath.h @@ -9,6 +9,7 @@ #define SkSafeMath_DEFINED #include "SkTypes.h" +#include // SkSafeMath always check that a series of operations do not overflow. // This must be correct for all platforms, because this is a check for safety at runtime. diff --git a/src/opts/SkNx_neon.h b/src/opts/SkNx_neon.h index 1552e0c181..020c402049 100644 --- a/src/opts/SkNx_neon.h +++ b/src/opts/SkNx_neon.h @@ -267,7 +267,7 @@ public: return vminvq_f32(fVec); #else SkNx min = Min(*this, vrev64q_f32(fVec)); - return std::min(min[0], min[2]); + return SkTMin(min[0], min[2]); #endif } @@ -276,7 +276,7 @@ public: return vmaxvq_f32(fVec); #else SkNx max = Max(*this, vrev64q_f32(fVec)); - return std::max(max[0], max[2]); + return SkTMax(max[0], max[2]); #endif } -- cgit v1.2.3