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>
diff --git a/src/core/SkCpu.cpp b/src/core/SkCpu.cpp
index 0107789..e9777c0 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 eb0412a..5e3d38c 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 dcdd81f..30c5912 100644
--- a/src/core/SkMathPriv.h
+++ b/src/core/SkMathPriv.h
@@ -111,7 +111,7 @@
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 6ad10c4..6dcb4f9 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 ca67f4c..7988925 100644
--- a/src/core/SkTime.cpp
+++ b/src/core/SkTime.cpp
@@ -26,7 +26,7 @@
}
}
-#ifdef SK_BUILD_FOR_WIN32
+#ifdef SK_BUILD_FOR_WIN
void SkTime::GetDateTime(DateTime* dt) {
if (dt) {
@@ -43,7 +43,7 @@
}
}
-#else // SK_BUILD_FOR_WIN32
+#else // SK_BUILD_FOR_WIN
#include <time.h>
void SkTime::GetDateTime(DateTime* dt) {
@@ -62,7 +62,7 @@
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 d48c82e..ae31495 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2552,7 +2552,7 @@
#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 @@
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 00c4b7c..2a2cedd 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 @@
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 da7170f..5668f29 100644
--- a/src/pdf/SkPDFDocument.cpp
+++ b/src/pdf/SkPDFDocument.cpp
@@ -29,7 +29,7 @@
}
#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 230c5f2..ec4e3fe 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 @@
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 da1e2b5..7a611cf 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 @@
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 64fcfa4..f0eb7b7 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 @@
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 54de313..e4b9a8e 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 @@
}
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 464a05b..b1c010d 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 @@
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 2e1dc8c..33da6da 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 @@
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 50ca264..05afcc6 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 @@
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 901ee22..08d3922 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* 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 b6d8dd3..614718d 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 @@
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 fd38c4f..864e488 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 @@
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 319f566..5f2ff66 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 @@
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 c349ad9..cf7269b 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 @@
#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 bec151e..ce9ffd4 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 @@
(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 c5fed6c..5acbe4e 100644
--- a/src/utils/SkParsePath.cpp
+++ b/src/utils/SkParsePath.cpp
@@ -210,7 +210,7 @@
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 f6da67d..4949e6c 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 @@
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 17613f6..c7438bf 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 @@
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 54ec7c7..79b8e2e 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 @@
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 9f6a97c..27c10ce 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 @@
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 d956299..b4caeb6 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 @@
}
}
-#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 161206f..04d7625 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 @@
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 0c1752a..b7c8994 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 @@
, 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 94c6b79..d0dd2ea 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 @@
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 05bb280..2665e90 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 @@
: nullptr;
}
-#endif//defined(SK_BUILD_FOR_WIN32)
+#endif//defined(SK_BUILD_FOR_WIN)