aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dm/DM.cpp2
-rw-r--r--include/core/SkEncodedImageFormat.h2
-rw-r--r--include/core/SkPostConfig.h2
-rw-r--r--include/core/SkRefCnt.h2
-rw-r--r--include/private/SkTemplates.h8
-rw-r--r--public.bzl2
-rw-r--r--src/core/SkAutoMalloc.h4
-rw-r--r--src/core/SkCoverageDelta.h4
-rw-r--r--src/core/SkDebug.cpp2
-rw-r--r--src/core/SkScan_DAAPath.cpp2
-rw-r--r--src/jumper/SkJumper_vectors.h4
-rw-r--r--src/pdf/SkPDFFont.cpp4
-rw-r--r--src/ports/SkFontHost_FreeType.cpp2
-rw-r--r--tests/MatrixTest.cpp4
-rw-r--r--tests/SRGBReadWritePixelsTest.cpp4
-rw-r--r--tools/CrashHandler.cpp2
-rw-r--r--tools/SkJSONCPP.h2
17 files changed, 26 insertions, 26 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 058fb9da03..cddaf423ed 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -1315,7 +1315,7 @@ int main(int argc, char** argv) {
initializeEventTracingForTools();
-#if !defined(GOOGLE3) && defined(SK_BUILD_FOR_IOS)
+#if !defined(SK_BUILD_FOR_GOOGLE3) && defined(SK_BUILD_FOR_IOS)
cd_Documents();
#endif
setbuf(stdout, nullptr);
diff --git a/include/core/SkEncodedImageFormat.h b/include/core/SkEncodedImageFormat.h
index c391053739..d0a9e5e0ca 100644
--- a/include/core/SkEncodedImageFormat.h
+++ b/include/core/SkEncodedImageFormat.h
@@ -14,7 +14,7 @@
* Enum describing format of encoded data.
*/
enum class SkEncodedImageFormat {
-#ifdef GOOGLE3
+#ifdef SK_BUILD_FOR_GOOGLE3
kUnknown,
#endif
kBMP,
diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h
index ecfcdd5bbf..61296e868d 100644
--- a/include/core/SkPostConfig.h
+++ b/include/core/SkPostConfig.h
@@ -129,7 +129,7 @@
#
#endif
-#if defined(GOOGLE3)
+#if defined(SK_BUILD_FOR_GOOGLE3)
void SkDebugfForDumpStackTrace(const char* data, void* unused);
void DumpStackTrace(int skip_count, void w(const char*, void*), void* arg);
# define SK_DUMP_GOOGLE3_STACK() DumpStackTrace(0, SkDebugfForDumpStackTrace, nullptr)
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 7b12f6a6e1..01580abe1a 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -124,7 +124,7 @@ private:
#else
class SK_API SkRefCnt : public SkRefCntBase {
// "#include SK_REF_CNT_MIXIN_INCLUDE" doesn't work with this build system.
- #if defined(GOOGLE3)
+ #if defined(SK_BUILD_FOR_GOOGLE3)
public:
void deref() const { this->unref(); }
#endif
diff --git a/include/private/SkTemplates.h b/include/private/SkTemplates.h
index efe2ed306b..8a605fbd02 100644
--- a/include/private/SkTemplates.h
+++ b/include/private/SkTemplates.h
@@ -221,8 +221,8 @@ public:
}
private:
-#if defined(GOOGLE3)
- // Stack frame size is limited for GOOGLE3. 4k is less than the actual max, but some functions
+#if defined(SK_BUILD_FOR_GOOGLE3)
+ // Stack frame size is limited for SK_BUILD_FOR_GOOGLE3. 4k is less than the actual max, but some functions
// have multiple large stack allocations.
static const int kMaxBytes = 4 * 1024;
static const int kCount = kCountRequested * sizeof(T) > kMaxBytes
@@ -390,8 +390,8 @@ public:
private:
// Since we use uint32_t storage, we might be able to get more elements for free.
static const size_t kCountWithPadding = SkAlign4(kCountRequested*sizeof(T)) / sizeof(T);
-#if defined(GOOGLE3)
- // Stack frame size is limited for GOOGLE3. 4k is less than the actual max, but some functions
+#if defined(SK_BUILD_FOR_GOOGLE3)
+ // Stack frame size is limited for SK_BUILD_FOR_GOOGLE3. 4k is less than the actual max, but some functions
// have multiple large stack allocations.
static const size_t kMaxBytes = 4 * 1024;
static const size_t kCount = kCountRequested * sizeof(T) > kMaxBytes
diff --git a/public.bzl b/public.bzl
index c346d7436c..1e2894058a 100644
--- a/public.bzl
+++ b/public.bzl
@@ -576,7 +576,7 @@ def base_defines(os_conditions):
# Chrome DEFINES.
"SK_USE_FREETYPE_EMBOLDEN",
# Turn on a few Google3-specific build fixes.
- "GOOGLE3",
+ "SK_BUILD_FOR_GOOGLE3",
# Required for building dm.
"GR_TEST_UTILS",
# Staging flags for API changes
diff --git a/src/core/SkAutoMalloc.h b/src/core/SkAutoMalloc.h
index 8672cd86f9..03cbf79ea6 100644
--- a/src/core/SkAutoMalloc.h
+++ b/src/core/SkAutoMalloc.h
@@ -157,8 +157,8 @@ public:
private:
// Align up to 32 bits.
static const size_t kSizeAlign4 = SkAlign4(kSizeRequested);
-#if defined(GOOGLE3)
- // Stack frame size is limited for GOOGLE3. 4k is less than the actual max, but some functions
+#if defined(SK_BUILD_FOR_GOOGLE3)
+ // Stack frame size is limited for SK_BUILD_FOR_GOOGLE3. 4k is less than the actual max, but some functions
// have multiple large stack allocations.
static const size_t kMaxBytes = 4 * 1024;
static const size_t kSize = kSizeRequested > kMaxBytes ? kMaxBytes : kSizeAlign4;
diff --git a/src/core/SkCoverageDelta.h b/src/core/SkCoverageDelta.h
index 282bf7afd8..d7af66ee8b 100644
--- a/src/core/SkCoverageDelta.h
+++ b/src/core/SkCoverageDelta.h
@@ -42,7 +42,7 @@ struct SkAntiRect {
class SkCoverageDeltaList {
public:
// We can store INIT_ROW_SIZE deltas per row (i.e., per y-scanline) initially.
-#ifdef GOOGLE3
+#ifdef SK_BUILD_FOR_GOOGLE3
static constexpr int INIT_ROW_SIZE = 8; // google3 has 16k stack limit; so we make it small
#else
static constexpr int INIT_ROW_SIZE = 32;
@@ -112,7 +112,7 @@ public:
static constexpr int SIMD_WIDTH = 8;
static constexpr int SUITABLE_WIDTH = 32;
-#ifdef GOOGLE3
+#ifdef SK_BUILD_FOR_GOOGLE3
static constexpr int MAX_MASK_SIZE = 1024; // G3 has 16k stack limit based on -fstack-usage
#else
static constexpr int MAX_MASK_SIZE = 2048;
diff --git a/src/core/SkDebug.cpp b/src/core/SkDebug.cpp
index b0cb6c1242..5d43281541 100644
--- a/src/core/SkDebug.cpp
+++ b/src/core/SkDebug.cpp
@@ -7,7 +7,7 @@
#include "SkTypes.h"
-#if defined(GOOGLE3)
+#if defined(SK_BUILD_FOR_GOOGLE3)
void SkDebugfForDumpStackTrace(const char* data, void* unused) {
SkDebugf("%s", data);
}
diff --git a/src/core/SkScan_DAAPath.cpp b/src/core/SkScan_DAAPath.cpp
index d4860daf22..3d3d4c152e 100644
--- a/src/core/SkScan_DAAPath.cpp
+++ b/src/core/SkScan_DAAPath.cpp
@@ -337,7 +337,7 @@ void SkScan::DAAFillPath(const SkPath& path, SkBlitter* blitter, const SkIRect&
return;
}
-#ifdef GOOGLE3
+#ifdef SK_BUILD_FOR_GOOGLE3
constexpr int STACK_SIZE = 12 << 10; // 12K stack size alloc; Google3 has 16K limit.
#else
constexpr int STACK_SIZE = 64 << 10; // 64k stack size to avoid heap allocation
diff --git a/src/jumper/SkJumper_vectors.h b/src/jumper/SkJumper_vectors.h
index 44e4247f06..e7919f75fc 100644
--- a/src/jumper/SkJumper_vectors.h
+++ b/src/jumper/SkJumper_vectors.h
@@ -656,7 +656,7 @@ SI F approx_powf(F x, F y) {
}
SI F from_half(U16 h) {
-#if defined(__aarch64__) && !defined(GOOGLE3) // Temporary workaround for some Google3 builds.
+#if defined(__aarch64__) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds.
return vcvt_f32_f16(h);
#elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512)
@@ -676,7 +676,7 @@ SI F from_half(U16 h) {
}
SI U16 to_half(F f) {
-#if defined(__aarch64__) && !defined(GOOGLE3) // Temporary workaround for some Google3 builds.
+#if defined(__aarch64__) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds.
return vcvt_f16_f32(f);
#elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512)
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp
index 8fd833e716..05bd3eb4d9 100644
--- a/src/pdf/SkPDFFont.cpp
+++ b/src/pdf/SkPDFFont.cpp
@@ -342,8 +342,8 @@ static sk_sp<SkPDFStream> get_subset_font_stream(
unsigned char* subsetFont{nullptr};
sk_sp<SkData> fontData(stream_to_data(std::move(fontAsset)));
-#if defined(GOOGLE3)
- // TODO(halcanary): update GOOGLE3 to newest version of Sfntly.
+#if defined(SK_BUILD_FOR_GOOGLE3)
+ // TODO(halcanary): update SK_BUILD_FOR_GOOGLE3 to newest version of Sfntly.
(void)ttcIndex;
int subsetFontSize = SfntlyWrapper::SubsetFont(fontName,
fontData->bytes(),
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 77b27c0fcd..4f641aef59 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -46,7 +46,7 @@
// Flag SK_FREETYPE_DLOPEN: also try dlopen to get newer features.
#define SK_FREETYPE_DLOPEN (0x1)
#ifndef SK_FREETYPE_MINIMUM_RUNTIME_VERSION
-# if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) || defined (GOOGLE3)
+# if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) || defined (SK_BUILD_FOR_GOOGLE3)
# define SK_FREETYPE_MINIMUM_RUNTIME_VERSION (((FREETYPE_MAJOR) << 24) | ((FREETYPE_MINOR) << 16) | ((FREETYPE_PATCH) << 8))
# else
# define SK_FREETYPE_MINIMUM_RUNTIME_VERSION ((2 << 24) | (3 << 16) | (11 << 8) | (SK_FREETYPE_DLOPEN))
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp
index 18d4908416..ce1254e720 100644
--- a/tests/MatrixTest.cpp
+++ b/tests/MatrixTest.cpp
@@ -684,8 +684,8 @@ static void test_matrix_homogeneous(skiatest::Reporter* reporter) {
const float kRotation1 = -50.f;
const float kScale0 = 5000.f;
-#if defined(GOOGLE3)
- // Stack frame size is limited in GOOGLE3.
+#if defined(SK_BUILD_FOR_GOOGLE3)
+ // Stack frame size is limited in SK_BUILD_FOR_GOOGLE3.
const int kTripleCount = 100;
const int kMatrixCount = 100;
#else
diff --git a/tests/SRGBReadWritePixelsTest.cpp b/tests/SRGBReadWritePixelsTest.cpp
index b5d61c1850..7013971b62 100644
--- a/tests/SRGBReadWritePixelsTest.cpp
+++ b/tests/SRGBReadWritePixelsTest.cpp
@@ -146,8 +146,8 @@ void read_and_check_pixels(skiatest::Reporter* reporter, GrSurfaceContext* conte
// conversion during read/write along with srgb/linear conversions.
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SRGBReadWritePixels, reporter, ctxInfo) {
GrContext* context = ctxInfo.grContext();
-#if defined(GOOGLE3)
- // Stack frame size is limited in GOOGLE3.
+#if defined(SK_BUILD_FOR_GOOGLE3)
+ // Stack frame size is limited in SK_BUILD_FOR_GOOGLE3.
static const int kW = 63;
static const int kH = 63;
#else
diff --git a/tools/CrashHandler.cpp b/tools/CrashHandler.cpp
index f141e55407..5fa6a10dc4 100644
--- a/tools/CrashHandler.cpp
+++ b/tools/CrashHandler.cpp
@@ -15,7 +15,7 @@
#ifndef SK_CRASH_HANDLER
void SetupCrashHandler() { }
-#elif defined(GOOGLE3)
+#elif defined(SK_BUILD_FOR_GOOGLE3)
#include "base/process_state.h"
void SetupCrashHandler() { InstallSignalHandlers(); }
diff --git a/tools/SkJSONCPP.h b/tools/SkJSONCPP.h
index 6baf223610..32ae4950f3 100644
--- a/tools/SkJSONCPP.h
+++ b/tools/SkJSONCPP.h
@@ -10,7 +10,7 @@
#ifndef SkJSONCPP_DEFINED
#define SkJSONCPP_DEFINED
-#ifdef GOOGLE3
+#ifdef SK_BUILD_FOR_GOOGLE3
#include "third_party/jsoncpp/reader.h"
#include "third_party/jsoncpp/value.h"
#include "third_party/jsoncpp/writer.h"