1 /* 2 * Copyright 2017 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef SkUserConfigManual_DEFINED 9 #define SkUserConfigManual_DEFINED 10 #include <android/log.h> 11 #include "include/gpu/graphite/LogPriority.h" 12 13 #define SK_BUILD_FOR_ANDROID_FRAMEWORK 14 #define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024) 15 #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024) 16 #define SK_PRINT_CODEC_MESSAGES 17 #define SK_USE_FREETYPE_EMBOLDEN 18 19 // Disable these Ganesh features 20 #define SK_DISABLE_REDUCE_OPLIST_SPLITTING 21 // Check error is expensive. HWUI historically also doesn't check its allocations 22 #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 23 24 // Staging flags 25 #define SK_SUPPORT_STROKEANDFILL 26 #define SK_DISABLE_LEGACY_SKSURFACE_FLUSH 27 #define SK_DISABLE_LEGACY_CANVAS_FLUSH 28 #define SK_LEGACY_GPU_GETTERS_CONST 29 #define SK_USE_LEGACY_BLUR_GANESH 30 31 // Needed until we fix https://bug.skia.org/2440 32 #define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG 33 #define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER 34 #define SK_FORCE_AAA 35 36 // Logging settings 37 #define SKGPU_GRAPHITE_LOWEST_ACTIVE_LOG_PRIORITY skgpu::graphite::LogPriority::kWarning 38 #define SK_ABORT(fmt, ...) __android_log_assert(nullptr, "skia", "[skia] \"" fmt "\" in {%s}", \ 39 ##__VA_ARGS__, __PRETTY_FUNCTION__) 40 41 // TODO (b/239048372): Remove this flag when we can safely migrate apps to the 42 // new behavior. 43 #define SK_SUPPORT_LEGACY_ALPHA_BITMAP_AS_COVERAGE 44 45 #if defined(__APPLE__) && !defined(SK_R32_SHIFT) 46 // Set macOS to use BGRA format to match Linux and Windows 47 #define SK_R32_SHIFT 16 48 #endif 49 #endif // SkUserConfigManual_DEFINED 50