Name Description Size
README.md Files in "base" are used by many parts of Skia, but are not part of the public Skia API. 271
SingleOwner.h 2115
SkAlign.h align up to a power of 2 1324
SkAlignedStorage.h 1133
SkAPI.h 1665
SkAssert.h Called internally if we hit an unrecoverable error. The platform implementation must not return, but should either throw an exception or otherwise exit. 3505
SkAttributes.h If your judgment is better than the compiler's (i.e. you've profiled it), you can use SK_ALWAYS_INLINE to force inlining. E.g. inline void someMethod() { ... } // may not be inlined SK_ALWAYS_INLINE void someMethod() { ... } // should always be inlined 2705
SkContainers.h 1723
SkCPUTypes.h Fast type for unsigned 8 bits. Use for parameter passing and local variables, not for storage 775
SkDebug.h 649
SkDeque.h The deque class works by blindly creating memory space of a specified element size. It manages the memory as a doubly linked list of blocks each of which can contain multiple elements. Pushes and pops add/remove blocks from the beginning/end of the list as necessary while each block tracks the used portion of its memory. One behavior to be aware of is that the pops do not immediately remove an empty block from the beginning/end of the list (Presumably so push/pop pairs on the block boundaries don't cause thrashing). This can result in the first/ last element not residing in the first/last block. 3837
SkFeatures.h SK_CPU_SSE_LEVEL If defined, SK_CPU_SSE_LEVEL should be set to the highest supported level. On non-intel CPU this should be undefined. 5162
SkFixed.h \file SkFixed.h Types and macros for 16.16 fixed point 5184
SkFloatBits.h Convert a sign-bit int (i.e. float interpreted as int) into a 2s compliement int. This also converts -0 (0x80000000) to 0. Doing this to a float allows it to be compared using normal C operators (<, <=, etc.) 2605
SkFloatingPoint.h Return the closest int for the given float. Returns SK_MaxS32FitsInFloat for NaN. 8914
SkLoadUserConfig.h 1870
SkMacros.h Usage: SK_MACRO_CONCAT(a, b) to construct the symbol ab SK_MACRO_CONCAT_IMPL_PRIV just exists to make this work. Do not use directly 3561
SkMalloc.h memory wrappers to be implemented by the porting layer (platform) 4913
SkMath.h Returns true if value is a power of 2. Does not explicitly check for value <= 0. 2247
SkMutex.h 1677
SkNoncopyable.h \class SkNoncopyable (DEPRECATED) SkNoncopyable is the base class for objects that do not want to be copied. It hides its copy-constructor and its assignment-operator. 756
SkOnce.h spin 1864
SkPathEnums.h 505
SkSafe32.h This is a 'safe' abs for 32-bit integers that asserts when undefined behavior would occur. SkTAbs (in SkTemplates.h) is a general purpose absolute-value function. 1367
SkSemaphore.h 2846
SkSpan_impl.h SkSpan holds a reference to contiguous data of type T along with a count. SkSpan does not own the data itself but is merely a reference, therefore you must take care with the lifetime of the underlying data. SkSpan is a count and a pointer into existing array or data type that stores its data in contiguous memory like std::vector. Any container that works with std::size() and std::data() can be used. SkSpan makes a convenient parameter for a routine to accept array like things. This allows you to write the routine without overloads for all different container types. Example: void routine(SkSpan<const int> a) { ... } std::vector v = {1, 2, 3, 4, 5}; routine(a); A word of caution when working with initializer_list, initializer_lists have a lifetime that is limited to the current statement. The following is correct and safe: Example: routine({1,2,3,4,5}); The following is undefined, and will result in erratic execution: Bad Example: initializer_list l = {1, 2, 3, 4, 5}; // The data behind l dies at the ;. routine(l); 4915
SkTArray.h TArray<T> implements a typical, mostly std::vector-like array. Each T will be default-initialized on allocation, and ~T will be called on destruction. MEM_MOVE controls the behavior when a T needs to be moved (e.g. when the array is resized) - true: T will be bit-copied via memcpy. - false: T will be moved via move-constructors. 21280
SkTDArray.h 6973
SkTemplates.h \file SkTemplates.h This file contains light-weight template classes for type-safe and exception-safe resource management. 13029
SkTFitsIn.h std::underlying_type is only defined for enums. For integral types, we just want the type. 4297
SkThreadAnnotations.h 2954
SkThreadID.h 503
SkTLogic.h 2411
SkTo.h @return false or true based on the condition 1556
SkTPin.h @return x pinned (clamped) between lo and hi, inclusively. Unlike std::clamp(), SkTPin() always returns a value between lo and hi. If x is NaN, SkTPin() returns lo but std::clamp() returns NaN. 571
SkTypeTraits.h 1337