aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-12-19 09:09:33 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-19 14:42:16 +0000
commit6613cc5186c200e053c5df9bd8f051ffba6e3564 (patch)
tree1c7533d9f63a7a1805a96d8eb37bebf87ffc614f /src
parent84bfc9589878a95c2a017698398f153a53e54412 (diff)
GOOGLE3 -> SK_BUILD_FOR_GOOGLE3
This is more consistent with our other SK_BUILD_FOR_... macros, and less likely to collide with other preprocessor logic. (Luckily, this was defined in public.bzl, so we can do this all in one CL in the Skia repo.) Change-Id: I5f232888288c9c53fad445545d983d0fb0b4add8 Reviewed-on: https://skia-review.googlesource.com/86940 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src')
-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
7 files changed, 11 insertions, 11 deletions
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))