Flutter Engine
The Flutter Engine
Enumerations | Functions
SkPath_serial.cpp File Reference
#include "include/core/SkData.h"
#include "include/core/SkPath.h"
#include "include/core/SkPathTypes.h"
#include "include/core/SkRRect.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/private/SkPathRef.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkDebug.h"
#include "include/private/base/SkPoint_impl.h"
#include "include/private/base/SkTPin.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkAutoMalloc.h"
#include "src/base/SkBuffer.h"
#include "src/base/SkSafeMath.h"
#include "src/core/SkPathEnums.h"
#include "src/core/SkPathPriv.h"
#include "src/core/SkRRectPriv.h"
#include <cstddef>
#include <cstdint>

Go to the source code of this file.

Enumerations

enum  SerializationOffsets { kType_SerializationShift = 28 , kDirection_SerializationShift = 26 , kFillType_SerializationShift = 8 , kVersion_SerializationMask = 0xFF }
 
enum  SerializationVersions { kJustPublicData_Version = 4 , kVerbsAreStoredForward_Version = 5 , kMin_Version = kJustPublicData_Version , kCurrent_Version = kVerbsAreStoredForward_Version }
 
enum  SerializationType { kGeneral = 0 , kRRect = 1 }
 

Functions

static unsigned extract_version (uint32_t packed)
 
static SkPathFillType extract_filltype (uint32_t packed)
 
static SerializationType extract_serializationtype (uint32_t packed)
 

Enumeration Type Documentation

◆ SerializationOffsets

Enumerator
kType_SerializationShift 
kDirection_SerializationShift 
kFillType_SerializationShift 
kVersion_SerializationMask 

Definition at line 31 of file SkPath_serial.cpp.

31 {
32 kType_SerializationShift = 28, // requires 4 bits
33 kDirection_SerializationShift = 26, // requires 2 bits
34 kFillType_SerializationShift = 8, // requires 8 bits
35 // low-8-bits are version
37};
@ kType_SerializationShift
@ kFillType_SerializationShift
@ kDirection_SerializationShift
@ kVersion_SerializationMask

◆ SerializationType

Enumerator
kGeneral 
kRRect 

Definition at line 50 of file SkPath_serial.cpp.

50 {
51 kGeneral = 0,
52 kRRect = 1
53};
@ kGeneral
@ kRRect

◆ SerializationVersions

Enumerator
kJustPublicData_Version 
kVerbsAreStoredForward_Version 
kMin_Version 
kCurrent_Version 

Definition at line 39 of file SkPath_serial.cpp.

39 {
40 // kPathPrivFirstDirection_Version = 1,
41 // kPathPrivLastMoveToIndex_Version = 2,
42 // kPathPrivTypeEnumVersion = 3,
43 kJustPublicData_Version = 4, // introduced Feb/2018
44 kVerbsAreStoredForward_Version = 5, // introduced Sept/2019
45
48};
@ kJustPublicData_Version
@ kMin_Version
@ kCurrent_Version
@ kVerbsAreStoredForward_Version

Function Documentation

◆ extract_filltype()

static SkPathFillType extract_filltype ( uint32_t  packed)
static

Definition at line 59 of file SkPath_serial.cpp.

59 {
60 return static_cast<SkPathFillType>((packed >> kFillType_SerializationShift) & 0x3);
61}
SkPathFillType
Definition: SkPathTypes.h:11

◆ extract_serializationtype()

static SerializationType extract_serializationtype ( uint32_t  packed)
static

Definition at line 63 of file SkPath_serial.cpp.

63 {
64 return static_cast<SerializationType>((packed >> kType_SerializationShift) & 0xF);
65}
SerializationType

◆ extract_version()

static unsigned extract_version ( uint32_t  packed)
static

Definition at line 55 of file SkPath_serial.cpp.

55 {
56 return packed & kVersion_SerializationMask;
57}