diff options
author | Mike Klein <mtklein@chromium.org> | 2018-01-24 12:42:55 -0500 |
---|---|---|
committer | Mike Klein <mtklein@chromium.org> | 2018-01-26 19:52:04 +0000 |
commit | 8f11d4dcafef4447fa68ea0ab28a72589241e9fd (patch) | |
tree | 0061f498e823a56f25c394d711bdcb0043b1ef9f | |
parent | 53d57ace9974f04ddde1fa2e3fb6e625ed5ee451 (diff) |
eliminate SK_BUILD_FOR_WIN32
SK_BUILD_FOR_WIN and SK_BUILD_FOR_WIN32 have long meant the same thing.
Chrome fix is https://chromium-review.googlesource.com/c/chromium/src/+/884007
Change-Id: I0e907b1bcd2a358eabf776f414fd3aeb3c689561
Reviewed-on: https://skia-review.googlesource.com/99340
Reviewed-by: Mike Reed <reed@google.com>
49 files changed, 82 insertions, 86 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index a50138a624..b9ecfa7b51 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -53,7 +53,7 @@ extern bool gSkForceRasterPipelineBlitter; -#ifndef SK_BUILD_FOR_WIN32 +#ifndef SK_BUILD_FOR_WIN #include <unistd.h> #endif diff --git a/debugger/debuggermain.cpp b/debugger/debuggermain.cpp index 30c23356b0..35c95602b4 100644 --- a/debugger/debuggermain.cpp +++ b/debugger/debuggermain.cpp @@ -18,7 +18,7 @@ static void usage(const char * argv0) { } int main(int argc, char *argv[]) { -#ifndef SK_BUILD_FOR_WIN32 +#ifndef SK_BUILD_FOR_WIN // Set numeric formatting to default. Otherwise shaders will have numbers with wrong comma. // QApplication documentation recommends setlocale("LC_NUMERIC", "C") after QApplication // constuction. However, the components Qt calls (X11 libs, ..) will override that. @@ -56,7 +56,7 @@ extern void SkPDFImageDumpStats(); #include <stdlib.h> -#ifndef SK_BUILD_FOR_WIN32 +#ifndef SK_BUILD_FOR_WIN #include <unistd.h> #endif @@ -212,7 +212,7 @@ static void find_culprit() { } } -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) static LONG WINAPI crash_handler(EXCEPTION_POINTERS* e) { static const struct { const char* name; @@ -339,7 +339,7 @@ static void gather_gold() { /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) static const char* kNewline = "\r\n"; #else static const char* kNewline = "\n"; diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h index 61296e868d..ccf6e8a2ed 100644 --- a/include/core/SkPostConfig.h +++ b/include/core/SkPostConfig.h @@ -10,10 +10,6 @@ #ifndef SkPostConfig_DEFINED #define SkPostConfig_DEFINED -#if defined(SK_BUILD_FOR_WIN32) -# define SK_BUILD_FOR_WIN -#endif - #if !defined(SK_DEBUG) && !defined(SK_RELEASE) #ifdef NDEBUG #define SK_RELEASE @@ -207,7 +203,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////// -#if defined SK_DEBUG && defined SK_BUILD_FOR_WIN32 +#if defined SK_DEBUG && defined SK_BUILD_FOR_WIN # ifdef free # undef free # endif diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h index 0e6f787aee..da91a17400 100644 --- a/include/core/SkPreConfig.h +++ b/include/core/SkPreConfig.h @@ -18,14 +18,14 @@ ////////////////////////////////////////////////////////////////////// -#if !defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_WIN32) && !defined(SK_BUILD_FOR_UNIX) && !defined(SK_BUILD_FOR_MAC) +#if !defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUILD_FOR_UNIX) && !defined(SK_BUILD_FOR_MAC) #ifdef __APPLE__ #include "TargetConditionals.h" #endif #if defined(_WIN32) || defined(__SYMBIAN32__) - #define SK_BUILD_FOR_WIN32 + #define SK_BUILD_FOR_WIN #elif defined(ANDROID) || defined(__ANDROID__) #define SK_BUILD_FOR_ANDROID #elif defined(linux) || defined(__linux) || defined(__FreeBSD__) || \ @@ -52,7 +52,7 @@ ////////////////////////////////////////////////////////////////////// -#ifdef SK_BUILD_FOR_WIN32 +#ifdef SK_BUILD_FOR_WIN #if !defined(SK_RESTRICT) #define SK_RESTRICT __restrict #endif diff --git a/include/gpu/GrConfig.h b/include/gpu/GrConfig.h index 6febd8ac00..e0349685ac 100644 --- a/include/gpu/GrConfig.h +++ b/include/gpu/GrConfig.h @@ -51,7 +51,7 @@ /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) // VC8 doesn't support stdint.h, so we define those types here. typedef signed char int8_t; typedef unsigned char uint8_t; @@ -116,7 +116,7 @@ typedef unsigned __int64 uint64_t; * GR_ALWAYSBREAK is an unconditional break in all builds. */ #if !defined(GR_ALWAYSBREAK) - #if defined(SK_BUILD_FOR_WIN32) + #if defined(SK_BUILD_FOR_WIN) #define GR_ALWAYSBREAK SkNO_RETURN_HINT(); __debugbreak() #else // TODO: do other platforms really not have continuable breakpoints? diff --git a/include/gpu/gl/GrGLConfig.h b/include/gpu/gl/GrGLConfig.h index 20ee37fe30..1526f06e6b 100644 --- a/include/gpu/gl/GrGLConfig.h +++ b/include/gpu/gl/GrGLConfig.h @@ -21,7 +21,7 @@ #endif #if !defined(GR_GL_FUNCTION_TYPE) - #if defined(SK_BUILD_FOR_WIN32) + #if defined(SK_BUILD_FOR_WIN) #define GR_GL_FUNCTION_TYPE __stdcall #else #define GR_GL_FUNCTION_TYPE diff --git a/include/gpu/vk/GrVkDefines.h b/include/gpu/vk/GrVkDefines.h index be269e6b46..8f697c02b4 100644 --- a/include/gpu/vk/GrVkDefines.h +++ b/include/gpu/vk/GrVkDefines.h @@ -17,7 +17,7 @@ // This is deprecated and all clients should define their own custum header shim that sets up // defines and includes the vulkan.h header. Then they should define SK_VULKAN_HEADER or set the // skia_vulkan_header in gn to point to their custom header. -# if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_WIN32) +# if defined(SK_BUILD_FOR_WIN) # if !defined(VK_USE_PLATFORM_WIN32_KHR) # define VK_USE_PLATFORM_WIN32_KHR # endif diff --git a/samplecode/SampleChineseFling.cpp b/samplecode/SampleChineseFling.cpp index cf14013caa..ef86747daf 100644 --- a/samplecode/SampleChineseFling.cpp +++ b/samplecode/SampleChineseFling.cpp @@ -32,7 +32,7 @@ static void make_paint(SkPaint* paint, sk_sp<SkTypeface> typeface) { static sk_sp<SkTypeface> chinese_typeface() { #ifdef SK_BUILD_FOR_ANDROID return MakeResourceAsTypeface("fonts/NotoSansCJK-Regular.ttc"); -#elif defined(SK_BUILD_FOR_WIN32) +#elif defined(SK_BUILD_FOR_WIN) return SkTypeface::MakeFromName("SimSun", SkFontStyle()); #elif defined(SK_BUILD_FOR_MAC) return SkTypeface::MakeFromName("Hiragino Sans GB W3", SkFontStyle()); diff --git a/src/core/SkCpu.cpp b/src/core/SkCpu.cpp index 0107789bfb..e9777c0b3b 100644 --- a/src/core/SkCpu.cpp +++ b/src/core/SkCpu.cpp @@ -13,7 +13,7 @@ #endif #if defined(SK_CPU_X86) - #if defined(SK_BUILD_FOR_WIN32) + #if defined(SK_BUILD_FOR_WIN) #include <intrin.h> static void cpuid (uint32_t abcd[4]) { __cpuid ((int*)abcd, 1); } static void cpuid7(uint32_t abcd[4]) { __cpuidex((int*)abcd, 7, 0); } diff --git a/src/core/SkExecutor.cpp b/src/core/SkExecutor.cpp index eb0412a55e..5e3d38c0d4 100644 --- a/src/core/SkExecutor.cpp +++ b/src/core/SkExecutor.cpp @@ -14,7 +14,7 @@ #include <deque> #include <thread> -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include <windows.h> static int num_cores() { SYSTEM_INFO sysinfo; diff --git a/src/core/SkMathPriv.h b/src/core/SkMathPriv.h index dcdd81fd41..30c5912a96 100644 --- a/src/core/SkMathPriv.h +++ b/src/core/SkMathPriv.h @@ -111,7 +111,7 @@ static inline float SkPinToUnitFloat(float x) { int SkCLZ_portable(uint32_t); #ifndef SkCLZ - #if defined(SK_BUILD_FOR_WIN32) + #if defined(SK_BUILD_FOR_WIN) #include <intrin.h> static inline int SkCLZ(uint32_t mask) { diff --git a/src/core/SkSemaphore.cpp b/src/core/SkSemaphore.cpp index 6ad10c4317..6dcb4f9c22 100644 --- a/src/core/SkSemaphore.cpp +++ b/src/core/SkSemaphore.cpp @@ -40,7 +40,7 @@ AnnotateHappensAfter(__FILE__, __LINE__, &fSemaphore); } }; -#elif defined(SK_BUILD_FOR_WIN32) +#elif defined(SK_BUILD_FOR_WIN) struct SkBaseSemaphore::OSSemaphore { HANDLE fSemaphore; diff --git a/src/core/SkTime.cpp b/src/core/SkTime.cpp index ca67f4c8a7..7988925bb3 100644 --- a/src/core/SkTime.cpp +++ b/src/core/SkTime.cpp @@ -26,7 +26,7 @@ void SkTime::DateTime::toISO8601(SkString* dst) const { } } -#ifdef SK_BUILD_FOR_WIN32 +#ifdef SK_BUILD_FOR_WIN void SkTime::GetDateTime(DateTime* dt) { if (dt) { @@ -43,7 +43,7 @@ void SkTime::GetDateTime(DateTime* dt) { } } -#else // SK_BUILD_FOR_WIN32 +#else // SK_BUILD_FOR_WIN #include <time.h> void SkTime::GetDateTime(DateTime* dt) { @@ -62,7 +62,7 @@ void SkTime::GetDateTime(DateTime* dt) { dt->fSecond = SkToU8(tstruct.tm_sec); } } -#endif // SK_BUILD_FOR_WIN32 +#endif // SK_BUILD_FOR_WIN #if !defined(__has_feature) #define __has_feature(x) 0 diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index d48c82eae0..ae31495b06 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -2552,7 +2552,7 @@ void GrGLGpu::flushViewport(const GrGLIRect& viewport) { #if SWAP_PER_DRAW #if defined(SK_BUILD_FOR_MAC) #include <AGL/agl.h> - #elif defined(SK_BUILD_FOR_WIN32) + #elif defined(SK_BUILD_FOR_WIN) #include <gl/GL.h> void SwapBuf() { DWORD procID = GetCurrentProcessId(); @@ -2615,7 +2615,7 @@ void GrGLGpu::draw(const GrPipeline& pipeline, aglSwapBuffers(aglGetCurrentContext()); int set_a_break_pt_here = 9; aglSwapBuffers(aglGetCurrentContext()); - #elif defined(SK_BUILD_FOR_WIN32) + #elif defined(SK_BUILD_FOR_WIN) SwapBuf(); int set_a_break_pt_here = 9; SwapBuf(); diff --git a/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp b/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp index 00c4b7c3a0..2a2ceddc96 100644 --- a/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp +++ b/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkLeanWindows.h" @@ -89,4 +89,4 @@ sk_sp<const GrGLInterface> GrGLMakeNativeInterface() { const GrGLInterface* GrGLCreateNativeInterface() { return GrGLMakeNativeInterface().release(); } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp index da7170ffbc..5668f29d2c 100644 --- a/src/pdf/SkPDFDocument.cpp +++ b/src/pdf/SkPDFDocument.cpp @@ -29,7 +29,7 @@ void SkPDFObjectSerializer::addObjectRecursively(const sk_sp<SkPDFObject>& objec } #define SKPDF_MAGIC "\xD3\xEB\xE9\xE1" -#ifndef SK_BUILD_FOR_WIN32 +#ifndef SK_BUILD_FOR_WIN static_assert((SKPDF_MAGIC[0] & 0x7F) == "Skia"[0], ""); static_assert((SKPDF_MAGIC[1] & 0x7F) == "Skia"[1], ""); static_assert((SKPDF_MAGIC[2] & 0x7F) == "Skia"[2], ""); diff --git a/src/ports/SkDebug_stdio.cpp b/src/ports/SkDebug_stdio.cpp index 230c5f2c5d..ec4e3fec77 100644 --- a/src/ports/SkDebug_stdio.cpp +++ b/src/ports/SkDebug_stdio.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if !defined(SK_BUILD_FOR_WIN32) && !defined(SK_BUILD_FOR_ANDROID) +#if !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUILD_FOR_ANDROID) #include <stdarg.h> #include <stdio.h> @@ -17,4 +17,4 @@ void SkDebugf(const char format[], ...) { vfprintf(stderr, format, args); va_end(args); } -#endif//!defined(SK_BUILD_FOR_WIN32) && !defined(SK_BUILD_FOR_ANDROID) +#endif//!defined(SK_BUILD_FOR_WIN) && !defined(SK_BUILD_FOR_ANDROID) diff --git a/src/ports/SkDebug_win.cpp b/src/ports/SkDebug_win.cpp index da1e2b573f..7a611cfa3a 100644 --- a/src/ports/SkDebug_win.cpp +++ b/src/ports/SkDebug_win.cpp @@ -7,7 +7,7 @@ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkLeanWindows.h" @@ -31,4 +31,4 @@ void SkDebugf(const char format[], ...) { OutputDebugStringA(buffer); } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index 64fcfa4f6c..f0eb7b7d9b 100644 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkAdvancedTypefaceMetrics.h" #include "SkBase64.h" @@ -2477,4 +2477,4 @@ private: sk_sp<SkFontMgr> SkFontMgr_New_GDI() { return sk_make_sp<SkFontMgrGDI>(); } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/ports/SkFontMgr_win_dw.cpp b/src/ports/SkFontMgr_win_dw.cpp index 54de313c3b..e4b9a8ed47 100644 --- a/src/ports/SkFontMgr_win_dw.cpp +++ b/src/ports/SkFontMgr_win_dw.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkDWrite.h" #include "SkDWriteFontFileStream.h" @@ -1086,4 +1086,4 @@ SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWriteRenderer(sk_sp<SkRemotableFontM } return sk_make_sp<SkFontMgr_Indirect>(std::move(impl), std::move(proxy)); } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/ports/SkFontMgr_win_dw_factory.cpp b/src/ports/SkFontMgr_win_dw_factory.cpp index 464a05b43f..b1c010d06f 100644 --- a/src/ports/SkFontMgr_win_dw_factory.cpp +++ b/src/ports/SkFontMgr_win_dw_factory.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) // And !SKIA_GDI? +#if defined(SK_BUILD_FOR_WIN) // And !SKIA_GDI? #include "SkFontMgr.h" #include "SkTypeface_win.h" @@ -15,4 +15,4 @@ sk_sp<SkFontMgr> SkFontMgr::Factory() { return SkFontMgr_New_DirectWrite(); } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/ports/SkImageEncoder_WIC.cpp b/src/ports/SkImageEncoder_WIC.cpp index 2e1dc8c833..33da6da82b 100644 --- a/src/ports/SkImageEncoder_WIC.cpp +++ b/src/ports/SkImageEncoder_WIC.cpp @@ -7,7 +7,7 @@ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) // Workaround for: // http://connect.microsoft.com/VisualStudio/feedback/details/621653/ @@ -214,4 +214,4 @@ bool SkEncodeImageWithWIC(SkWStream* stream, const SkPixmap& pixmap, return SUCCEEDED(hr); } -#endif // defined(SK_BUILD_FOR_WIN32) +#endif // defined(SK_BUILD_FOR_WIN) diff --git a/src/ports/SkOSFile_win.cpp b/src/ports/SkOSFile_win.cpp index 50ca264d19..05afcc6350 100644 --- a/src/ports/SkOSFile_win.cpp +++ b/src/ports/SkOSFile_win.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkLeanWindows.h" #include "SkMalloc.h" @@ -273,4 +273,4 @@ bool SkOSFile::Iter::next(SkString* name, bool getDir) { return self.fHandle != (HANDLE)~0 && get_the_file(self.fHandle, name, dataPtr, getDir); } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/ports/SkOSLibrary_posix.cpp b/src/ports/SkOSLibrary_posix.cpp index 901ee22f3c..08d3922c28 100644 --- a/src/ports/SkOSLibrary_posix.cpp +++ b/src/ports/SkOSLibrary_posix.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ #include "SkTypes.h" -#if !defined(SK_BUILD_FOR_WIN32) +#if !defined(SK_BUILD_FOR_WIN) #include "SkOSLibrary.h" @@ -18,4 +18,4 @@ void* DynamicLoadLibrary(const char* libraryName) { void* GetProcedureAddress(void* library, const char* functionName) { return dlsym(library, functionName); } -#endif//!defined(SK_BUILD_FOR_WIN32) +#endif//!defined(SK_BUILD_FOR_WIN) diff --git a/src/ports/SkOSLibrary_win.cpp b/src/ports/SkOSLibrary_win.cpp index b6d8dd3183..614718d22e 100644 --- a/src/ports/SkOSLibrary_win.cpp +++ b/src/ports/SkOSLibrary_win.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkOSLibrary.h" #include "SkLeanWindows.h" @@ -18,4 +18,4 @@ void* GetProcedureAddress(void* library, const char* functionName) { return reinterpret_cast<void*>(::GetProcAddress((HMODULE)library, functionName)); } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/ports/SkRemotableFontMgr_win_dw.cpp b/src/ports/SkRemotableFontMgr_win_dw.cpp index fd38c4f73f..864e488622 100644 --- a/src/ports/SkRemotableFontMgr_win_dw.cpp +++ b/src/ports/SkRemotableFontMgr_win_dw.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkDWrite.h" #include "SkDWriteFontFileStream.h" @@ -466,4 +466,4 @@ SkRemotableFontMgr* SkRemotableFontMgr_New_DirectWrite() { return new SkRemotableFontMgr_DirectWrite(sysFontCollection.get(), localeName, localeNameLen); } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/ports/SkScalerContext_win_dw.cpp b/src/ports/SkScalerContext_win_dw.cpp index 319f56601f..5f2ff66d48 100644 --- a/src/ports/SkScalerContext_win_dw.cpp +++ b/src/ports/SkScalerContext_win_dw.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #undef GetGlyphIndices @@ -995,4 +995,4 @@ void SkScalerContext_DW::generatePath(SkGlyphID glyph, SkPath* path) { path->transform(fSkXform); } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/ports/SkTLS_win.cpp b/src/ports/SkTLS_win.cpp index c349ad99c2..cf7269b308 100644 --- a/src/ports/SkTLS_win.cpp +++ b/src/ports/SkTLS_win.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkLeanWindows.h" #include "SkMutex.h" @@ -77,4 +77,4 @@ PIMAGE_TLS_CALLBACK skia_tls_callback = onTLSCallback; #endif } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp index bec151ee3f..ce9ffd4177 100644 --- a/src/ports/SkTypeface_win_dw.cpp +++ b/src/ports/SkTypeface_win_dw.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) // SkTypes will include Windows.h, which will pull in all of the GDI defines. // GDI #defines GetGlyphIndices to GetGlyphIndicesA or GetGlyphIndicesW, but @@ -422,4 +422,4 @@ std::unique_ptr<SkAdvancedTypefaceMetrics> DWriteFontTypeface::onGetAdvancedMetr (int32_t)SkEndian_SwapBE16((uint16_t)headTable->yMin)); return info; } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/utils/SkParsePath.cpp b/src/utils/SkParsePath.cpp index c5fed6cfca..5acbe4e030 100644 --- a/src/utils/SkParsePath.cpp +++ b/src/utils/SkParsePath.cpp @@ -210,7 +210,7 @@ bool SkParsePath::FromSVGString(const char data[], SkPath* result) { static void write_scalar(SkWStream* stream, SkScalar value) { char buffer[64]; -#ifdef SK_BUILD_FOR_WIN32 +#ifdef SK_BUILD_FOR_WIN int len = _snprintf(buffer, sizeof(buffer), "%g", value); #else int len = snprintf(buffer, sizeof(buffer), "%g", value); diff --git a/src/utils/win/SkAutoCoInitialize.cpp b/src/utils/win/SkAutoCoInitialize.cpp index f6da67dcae..4949e6c6ff 100644 --- a/src/utils/win/SkAutoCoInitialize.cpp +++ b/src/utils/win/SkAutoCoInitialize.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkAutoCoInitialize.h" @@ -29,4 +29,4 @@ bool SkAutoCoInitialize::succeeded() { return SUCCEEDED(this->fHR) || RPC_E_CHANGED_MODE == this->fHR; } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/utils/win/SkDWrite.cpp b/src/utils/win/SkDWrite.cpp index 17613f6fad..c7438bf332 100644 --- a/src/utils/win/SkDWrite.cpp +++ b/src/utils/win/SkDWrite.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkDWrite.h" #include "SkHRESULT.h" @@ -125,4 +125,4 @@ HRESULT SkGetGetUserDefaultLocaleNameProc(SkGetUserDefaultLocaleNameProc* proc) return S_OK; } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/utils/win/SkDWriteFontFileStream.cpp b/src/utils/win/SkDWriteFontFileStream.cpp index 54ec7c7159..79b8e2ecff 100644 --- a/src/utils/win/SkDWriteFontFileStream.cpp +++ b/src/utils/win/SkDWriteFontFileStream.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkTypes.h" #include "SkDWriteFontFileStream.h" @@ -232,4 +232,4 @@ HRESULT STDMETHODCALLTYPE SkDWriteFontFileStreamWrapper::GetLastWriteTime(UINT64 return E_NOTIMPL; } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/utils/win/SkDWriteGeometrySink.cpp b/src/utils/win/SkDWriteGeometrySink.cpp index 9f6a97caf1..27c10ce20f 100644 --- a/src/utils/win/SkDWriteGeometrySink.cpp +++ b/src/utils/win/SkDWriteGeometrySink.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkDWriteGeometrySink.h" #include "SkFloatUtils.h" @@ -146,4 +146,4 @@ HRESULT SkDWriteGeometrySink::Create(SkPath* path, IDWriteGeometrySink** geometr return S_OK; } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/utils/win/SkHRESULT.cpp b/src/utils/win/SkHRESULT.cpp index d95629961b..b4caeb686d 100644 --- a/src/utils/win/SkHRESULT.cpp +++ b/src/utils/win/SkHRESULT.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkHRESULT.h" @@ -37,4 +37,4 @@ void SkTraceHR(const char* file, unsigned long line, HRESULT hr, const char* msg } } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/utils/win/SkIStream.cpp b/src/utils/win/SkIStream.cpp index 161206fc08..04d7625fdf 100644 --- a/src/utils/win/SkIStream.cpp +++ b/src/utils/win/SkIStream.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkIStream.h" #include "SkStream.h" @@ -271,4 +271,4 @@ HRESULT STDMETHODCALLTYPE SkWIStream::Stat(STATSTG* pStatstg pStatstg->grfMode = STGM_WRITE; return S_OK; } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/utils/win/SkWGL_win.cpp b/src/utils/win/SkWGL_win.cpp index 0c1752a06a..b7c89944e0 100644 --- a/src/utils/win/SkWGL_win.cpp +++ b/src/utils/win/SkWGL_win.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkWGL.h" @@ -503,4 +503,4 @@ SkWGLPbufferContext::SkWGLPbufferContext(HPBUFFER pbuffer, HDC dc, HGLRC glrc) , fGLRC(glrc) { } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp index 94c6b79c32..d0dd2ea49f 100644 --- a/src/xps/SkXPSDevice.cpp +++ b/src/xps/SkXPSDevice.cpp @@ -6,7 +6,7 @@ */ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkLeanWindows.h" @@ -2233,4 +2233,4 @@ void SkXPSDevice::drawBitmapRect(const SkBitmap& bitmap, paintWithShader.setShader(std::move(bitmapShader)); this->drawRect(actualDst, paintWithShader); } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/src/xps/SkXPSDocument.cpp b/src/xps/SkXPSDocument.cpp index 05bb280a1f..2665e90b63 100644 --- a/src/xps/SkXPSDocument.cpp +++ b/src/xps/SkXPSDocument.cpp @@ -7,7 +7,7 @@ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #include "SkXPSDocument.h" #include "SkStream.h" @@ -64,4 +64,4 @@ sk_sp<SkDocument> SkDocument::MakeXPS(SkWStream* stream, : nullptr; } -#endif//defined(SK_BUILD_FOR_WIN32) +#endif//defined(SK_BUILD_FOR_WIN) diff --git a/tests/Test.cpp b/tests/Test.cpp index 96bbbad9b9..da260a0ee6 100644 --- a/tests/Test.cpp +++ b/tests/Test.cpp @@ -43,7 +43,7 @@ SkString skiatest::GetTmpDir() { #elif defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_UNIX) const char* environmentVariable = "TMPDIR"; const char* defaultValue = "/tmp"; -#elif defined(SK_BUILD_FOR_WIN32) +#elif defined(SK_BUILD_FOR_WIN) const char* environmentVariable = "TEMP"; const char* defaultValue = nullptr; #else diff --git a/tools/OverwriteLine.h b/tools/OverwriteLine.h index e8f0504b1a..8985a6a01c 100644 --- a/tools/OverwriteLine.h +++ b/tools/OverwriteLine.h @@ -3,7 +3,7 @@ // Print this string to reset and clear your current terminal line. static const char* kSkOverwriteLine = -#ifdef SK_BUILD_FOR_WIN32 +#ifdef SK_BUILD_FOR_WIN "\r \r" #elif defined(SK_BUILD_FOR_IOS) "\r" diff --git a/tools/ProcStats.cpp b/tools/ProcStats.cpp index 51ddf55aa5..9515368f9e 100644 --- a/tools/ProcStats.cpp +++ b/tools/ProcStats.cpp @@ -19,7 +19,7 @@ return static_cast<int>(ru.ru_maxrss / 1024); // Linux reports kilobytes. #endif } -#elif defined(SK_BUILD_FOR_WIN32) +#elif defined(SK_BUILD_FOR_WIN) #include <windows.h> #include <psapi.h> int sk_tools::getMaxResidentSetSizeMB() { @@ -59,7 +59,7 @@ return rssPages * pageSize / 1024 / 1024; } -#elif defined(SK_BUILD_FOR_WIN32) +#elif defined(SK_BUILD_FOR_WIN) int sk_tools::getCurrResidentSetSizeMB() { PROCESS_MEMORY_COUNTERS info; GetProcessMemoryInfo(GetCurrentProcess(), &info, sizeof(info)); diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp index c6cceb4843..3692606247 100644 --- a/tools/gpu/GrContextFactory.cpp +++ b/tools/gpu/GrContextFactory.cpp @@ -25,7 +25,7 @@ #include "mock/MockTestContext.h" #include "GrCaps.h" -#if defined(SK_BUILD_FOR_WIN32) && defined(SK_ENABLE_DISCRETE_GPU) +#if defined(SK_BUILD_FOR_WIN) && defined(SK_ENABLE_DISCRETE_GPU) extern "C" { // NVIDIA documents that the presence and value of this symbol programmatically enable the high // performance GPU in laptops with switchable graphics. diff --git a/tools/gpu/vk/GrVulkanDefines.h b/tools/gpu/vk/GrVulkanDefines.h index 192f1c5abc..2eb49208fa 100644 --- a/tools/gpu/vk/GrVulkanDefines.h +++ b/tools/gpu/vk/GrVulkanDefines.h @@ -8,7 +8,7 @@ #ifndef GrVulkanDefines_DEFINED #define GrVulkanDefines_DEFINED -#if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) # if !defined(VK_USE_PLATFORM_WIN32_KHR) # define VK_USE_PLATFORM_WIN32_KHR # endif diff --git a/tools/sk_app/CommandSet.cpp b/tools/sk_app/CommandSet.cpp index d0154d6e61..9684ef2624 100644 --- a/tools/sk_app/CommandSet.cpp +++ b/tools/sk_app/CommandSet.cpp @@ -78,7 +78,7 @@ void CommandSet::addCommand(Window::Key k, const char* keyName, const char* grou fCommands.push_back(Command(k, keyName, group, description, function)); } -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #define SK_strcasecmp _stricmp #else #define SK_strcasecmp strcasecmp diff --git a/tools/skdiff/skdiff.h b/tools/skdiff/skdiff.h index 6bdaadc28d..1d4e8ace2a 100644 --- a/tools/skdiff/skdiff.h +++ b/tools/skdiff/skdiff.h @@ -14,7 +14,7 @@ #include "SkString.h" #include "../private/SkTDArray.h" -#if defined(SK_BUILD_FOR_WIN32) +#if defined(SK_BUILD_FOR_WIN) #define PATH_DIV_STR "\\" #define PATH_DIV_CHAR '\\' #else diff --git a/tools/skdiff/skdiff_html.cpp b/tools/skdiff/skdiff_html.cpp index 6f3c3b09e1..e0476bc005 100644 --- a/tools/skdiff/skdiff_html.cpp +++ b/tools/skdiff/skdiff_html.cpp @@ -245,7 +245,7 @@ void print_diff_page(const int matchCount, if (outputDir.size() > 0 && PATH_DIV_CHAR == outputDir[0]) { isPathAbsolute = true; } -#ifdef SK_BUILD_FOR_WIN32 +#ifdef SK_BUILD_FOR_WIN // On Windows, absolute paths can also start with "x:", where x is any // drive letter. if (outputDir.size() > 1 && ':' == outputDir[1]) { diff --git a/tools/win_dbghelp.h b/tools/win_dbghelp.h index d334318ad4..226249f4e6 100644 --- a/tools/win_dbghelp.h +++ b/tools/win_dbghelp.h @@ -8,7 +8,7 @@ #ifndef win_dbghelp_DEFINED #define win_dbghelp_DEFINED -#ifdef SK_BUILD_FOR_WIN32 +#ifdef SK_BUILD_FOR_WIN #include <dbghelp.h> #include <shellapi.h> @@ -30,6 +30,6 @@ void setUpDebuggingFromArgs(const char* vargs0); int GenerateDumpAndPrintCallstack(EXCEPTION_POINTERS* pExceptionPointers); -#endif // SK_BUILD_FOR_WIN32 +#endif // SK_BUILD_FOR_WIN #endif // win_dbghelp_DEFINED |