Flutter Engine
The Flutter Engine
Classes | Enumerations | Functions
SkPictureFlat.h File Reference
#include "include/core/SkFlattenable.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkRegion.h"
#include "include/core/SkTypeface.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkTo.h"
#include "src/core/SkPicturePriv.h"
#include "src/core/SkReadBuffer.h"
#include <cstddef>
#include <cstdint>
#include <memory>

Go to the source code of this file.

Classes

class  SkTypefacePlayback
 
class  SkFactoryPlayback
 

Enumerations

enum  DrawType {
  UNUSED , CLIP_PATH , CLIP_REGION , CLIP_RECT ,
  CLIP_RRECT , CONCAT , DRAW_BITMAP_RETIRED_2016_REMOVED_2018 , DRAW_BITMAP_MATRIX_RETIRED_2016_REMOVED_2018 ,
  DRAW_BITMAP_NINE_RETIRED_2016_REMOVED_2018 , DRAW_BITMAP_RECT_RETIRED_2016_REMOVED_2018 , DRAW_CLEAR , DRAW_DATA ,
  DRAW_OVAL , DRAW_PAINT , DRAW_PATH , DRAW_PICTURE ,
  DRAW_POINTS , DRAW_POS_TEXT_REMOVED_1_2019 , DRAW_POS_TEXT_TOP_BOTTOM_REMOVED_1_2019 , DRAW_POS_TEXT_H_REMOVED_1_2019 ,
  DRAW_POS_TEXT_H_TOP_BOTTOM_REMOVED_1_2019 , DRAW_RECT , DRAW_RRECT , DRAW_SPRITE_RETIRED_2015_REMOVED_2018 ,
  DRAW_TEXT_REMOVED_1_2019 , DRAW_TEXT_ON_PATH_RETIRED_08_2018_REMOVED_10_2018 , DRAW_TEXT_TOP_BOTTOM_REMOVED_1_2019 , DRAW_VERTICES_RETIRED_03_2017_REMOVED_01_2018 ,
  RESTORE , ROTATE , SAVE , SAVE_LAYER_SAVEFLAGS_DEPRECATED_2015_REMOVED_12_2020 ,
  SCALE , SET_MATRIX , SKEW , TRANSLATE ,
  NOOP , BEGIN_COMMENT_GROUP_obsolete , COMMENT_obsolete , END_COMMENT_GROUP_obsolete ,
  DRAW_DRRECT , PUSH_CULL , POP_CULL , DRAW_PATCH ,
  DRAW_PICTURE_MATRIX_PAINT , DRAW_TEXT_BLOB , DRAW_IMAGE , DRAW_IMAGE_RECT_STRICT_obsolete ,
  DRAW_ATLAS , DRAW_IMAGE_NINE , DRAW_IMAGE_RECT , SAVE_LAYER_SAVELAYERFLAGS_DEPRECATED_JAN_2016_REMOVED_01_2018 ,
  SAVE_LAYER_SAVELAYERREC , DRAW_ANNOTATION , DRAW_DRAWABLE , DRAW_DRAWABLE_MATRIX ,
  DRAW_TEXT_RSXFORM_DEPRECATED_DEC_2018 , TRANSLATE_Z , DRAW_SHADOW_REC , DRAW_IMAGE_LATTICE ,
  DRAW_ARC , DRAW_REGION , DRAW_VERTICES_OBJECT , FLUSH ,
  DRAW_EDGEAA_IMAGE_SET , SAVE_BEHIND , DRAW_EDGEAA_QUAD , DRAW_BEHIND_PAINT ,
  CONCAT44 , CLIP_SHADER_IN_PAINT , MARK_CTM , SET_M44 ,
  DRAW_IMAGE2 , DRAW_IMAGE_RECT2 , DRAW_IMAGE_LATTICE2 , DRAW_EDGEAA_IMAGE_SET2 ,
  RESET_CLIP , DRAW_SLUG , LAST_DRAWTYPE_ENUM = DRAW_SLUG
}
 
enum  DrawVertexFlags { DRAW_VERTICES_HAS_TEXS = 0x01 , DRAW_VERTICES_HAS_COLORS = 0x02 , DRAW_VERTICES_HAS_INDICES = 0x04 , DRAW_VERTICES_HAS_XFER = 0x08 }
 
enum  DrawAtlasFlags { DRAW_ATLAS_HAS_COLORS = 1 << 0 , DRAW_ATLAS_HAS_CULL = 1 << 1 , DRAW_ATLAS_HAS_SAMPLING = 1 << 2 }
 
enum  DrawTextRSXformFlags { DRAW_TEXT_RSXFORM_HAS_CULL = 1 << 0 }
 
enum  SaveLayerRecFlatFlags {
  SAVELAYERREC_HAS_BOUNDS = 1 << 0 , SAVELAYERREC_HAS_PAINT = 1 << 1 , SAVELAYERREC_HAS_BACKDROP = 1 << 2 , SAVELAYERREC_HAS_FLAGS = 1 << 3 ,
  SAVELAYERREC_HAS_CLIPMASK_OBSOLETE = 1 << 4 , SAVELAYERREC_HAS_CLIPMATRIX_OBSOLETE = 1 << 5 , SAVELAYERREC_HAS_BACKDROP_SCALE = 1 << 6 , SAVELAYERREC_HAS_MULTIPLE_FILTERS = 1 << 7
}
 
enum  SaveBehindFlatFlags { SAVEBEHIND_HAS_SUBSET = 1 << 0 }
 

Functions

static uint32_t ClipParams_pack (SkClipOp op, bool doAA)
 
static SkRegion::Op ClipParams_unpackRegionOp (SkReadBuffer *buffer, uint32_t packed)
 
static bool ClipParams_unpackDoAA (uint32_t packed)
 

Enumeration Type Documentation

◆ DrawAtlasFlags

Enumerator
DRAW_ATLAS_HAS_COLORS 
DRAW_ATLAS_HAS_CULL 
DRAW_ATLAS_HAS_SAMPLING 

Definition at line 137 of file SkPictureFlat.h.

137 {
138 DRAW_ATLAS_HAS_COLORS = 1 << 0,
139 DRAW_ATLAS_HAS_CULL = 1 << 1,
141};
@ DRAW_ATLAS_HAS_SAMPLING
@ DRAW_ATLAS_HAS_COLORS
@ DRAW_ATLAS_HAS_CULL

◆ DrawTextRSXformFlags

Enumerator
DRAW_TEXT_RSXFORM_HAS_CULL 

Definition at line 143 of file SkPictureFlat.h.

143 {
145};
@ DRAW_TEXT_RSXFORM_HAS_CULL

◆ DrawType

enum DrawType
Enumerator
UNUSED 
CLIP_PATH 
CLIP_REGION 
CLIP_RECT 
CLIP_RRECT 
CONCAT 
DRAW_BITMAP_RETIRED_2016_REMOVED_2018 
DRAW_BITMAP_MATRIX_RETIRED_2016_REMOVED_2018 
DRAW_BITMAP_NINE_RETIRED_2016_REMOVED_2018 
DRAW_BITMAP_RECT_RETIRED_2016_REMOVED_2018 
DRAW_CLEAR 
DRAW_DATA 
DRAW_OVAL 
DRAW_PAINT 
DRAW_PATH 
DRAW_PICTURE 
DRAW_POINTS 
DRAW_POS_TEXT_REMOVED_1_2019 
DRAW_POS_TEXT_TOP_BOTTOM_REMOVED_1_2019 
DRAW_POS_TEXT_H_REMOVED_1_2019 
DRAW_POS_TEXT_H_TOP_BOTTOM_REMOVED_1_2019 
DRAW_RECT 
DRAW_RRECT 
DRAW_SPRITE_RETIRED_2015_REMOVED_2018 
DRAW_TEXT_REMOVED_1_2019 
DRAW_TEXT_ON_PATH_RETIRED_08_2018_REMOVED_10_2018 
DRAW_TEXT_TOP_BOTTOM_REMOVED_1_2019 
DRAW_VERTICES_RETIRED_03_2017_REMOVED_01_2018 
RESTORE 
ROTATE 
SAVE 
SAVE_LAYER_SAVEFLAGS_DEPRECATED_2015_REMOVED_12_2020 
SCALE 
SET_MATRIX 
SKEW 
TRANSLATE 
NOOP 
BEGIN_COMMENT_GROUP_obsolete 
COMMENT_obsolete 
END_COMMENT_GROUP_obsolete 
DRAW_DRRECT 
PUSH_CULL 
POP_CULL 
DRAW_PATCH 
DRAW_PICTURE_MATRIX_PAINT 
DRAW_TEXT_BLOB 
DRAW_IMAGE 
DRAW_IMAGE_RECT_STRICT_obsolete 
DRAW_ATLAS 
DRAW_IMAGE_NINE 
DRAW_IMAGE_RECT 
SAVE_LAYER_SAVELAYERFLAGS_DEPRECATED_JAN_2016_REMOVED_01_2018 
SAVE_LAYER_SAVELAYERREC 
DRAW_ANNOTATION 
DRAW_DRAWABLE 
DRAW_DRAWABLE_MATRIX 
DRAW_TEXT_RSXFORM_DEPRECATED_DEC_2018 
TRANSLATE_Z 
DRAW_SHADOW_REC 
DRAW_IMAGE_LATTICE 
DRAW_ARC 
DRAW_REGION 
DRAW_VERTICES_OBJECT 
FLUSH 
DRAW_EDGEAA_IMAGE_SET 
SAVE_BEHIND 
DRAW_EDGEAA_QUAD 
DRAW_BEHIND_PAINT 
CONCAT44 
CLIP_SHADER_IN_PAINT 
MARK_CTM 
SET_M44 
DRAW_IMAGE2 
DRAW_IMAGE_RECT2 
DRAW_IMAGE_LATTICE2 
DRAW_EDGEAA_IMAGE_SET2 
RESET_CLIP 
DRAW_SLUG 
LAST_DRAWTYPE_ENUM 

Definition at line 32 of file SkPictureFlat.h.

32 {
33 UNUSED,
38 CONCAT,
61 RESTORE,
62 ROTATE,
63 SAVE,
65 SCALE,
67 SKEW,
69 NOOP,
73
74 // new ops -- feel free to re-alphabetize on next version bump
76 PUSH_CULL, // deprecated, M41 was last Chromium version to write this to an .skp
77 POP_CULL, // deprecated, M41 was last Chromium version to write this to an .skp
78
79 DRAW_PATCH, // could not add in aphabetical order
87
90
95
96 TRANSLATE_Z, // deprecated (M60)
97
100 DRAW_ARC,
103
104 FLUSH, // no-op
105
107
109
111
113 CONCAT44,
115 MARK_CTM, // deprecated
116 SET_M44,
117
122
124
125 DRAW_SLUG,
126
128};
@ DRAW_EDGEAA_QUAD
@ BEGIN_COMMENT_GROUP_obsolete
Definition: SkPictureFlat.h:70
@ DRAW_PATH
Definition: SkPictureFlat.h:47
@ TRANSLATE_Z
Definition: SkPictureFlat.h:96
@ DRAW_BITMAP_MATRIX_RETIRED_2016_REMOVED_2018
Definition: SkPictureFlat.h:40
@ RESTORE
Definition: SkPictureFlat.h:61
@ SET_M44
@ CLIP_PATH
Definition: SkPictureFlat.h:34
@ SAVE_LAYER_SAVELAYERFLAGS_DEPRECATED_JAN_2016_REMOVED_01_2018
Definition: SkPictureFlat.h:88
@ DRAW_POS_TEXT_REMOVED_1_2019
Definition: SkPictureFlat.h:50
@ DRAW_PAINT
Definition: SkPictureFlat.h:46
@ DRAW_SLUG
@ DRAW_PICTURE_MATRIX_PAINT
Definition: SkPictureFlat.h:80
@ DRAW_EDGEAA_IMAGE_SET
@ DRAW_REGION
@ SET_MATRIX
Definition: SkPictureFlat.h:66
@ FLUSH
@ DRAW_DATA
Definition: SkPictureFlat.h:44
@ ROTATE
Definition: SkPictureFlat.h:62
@ DRAW_DRAWABLE
Definition: SkPictureFlat.h:92
@ DRAW_IMAGE_RECT2
@ DRAW_IMAGE2
@ DRAW_RRECT
Definition: SkPictureFlat.h:55
@ DRAW_DRRECT
Definition: SkPictureFlat.h:75
@ SCALE
Definition: SkPictureFlat.h:65
@ LAST_DRAWTYPE_ENUM
@ DRAW_TEXT_REMOVED_1_2019
Definition: SkPictureFlat.h:57
@ DRAW_IMAGE_RECT
Definition: SkPictureFlat.h:86
@ DRAW_BITMAP_RETIRED_2016_REMOVED_2018
Definition: SkPictureFlat.h:39
@ DRAW_PATCH
Definition: SkPictureFlat.h:79
@ DRAW_BEHIND_PAINT
@ DRAW_EDGEAA_IMAGE_SET2
@ DRAW_TEXT_BLOB
Definition: SkPictureFlat.h:81
@ DRAW_PICTURE
Definition: SkPictureFlat.h:48
@ PUSH_CULL
Definition: SkPictureFlat.h:76
@ SKEW
Definition: SkPictureFlat.h:67
@ CONCAT44
@ NOOP
Definition: SkPictureFlat.h:69
@ SAVE
Definition: SkPictureFlat.h:63
@ DRAW_BITMAP_RECT_RETIRED_2016_REMOVED_2018
Definition: SkPictureFlat.h:42
@ DRAW_IMAGE
Definition: SkPictureFlat.h:82
@ RESET_CLIP
@ DRAW_DRAWABLE_MATRIX
Definition: SkPictureFlat.h:93
@ DRAW_ARC
@ DRAW_RECT
Definition: SkPictureFlat.h:54
@ DRAW_POS_TEXT_H_REMOVED_1_2019
Definition: SkPictureFlat.h:52
@ DRAW_VERTICES_OBJECT
@ DRAW_VERTICES_RETIRED_03_2017_REMOVED_01_2018
Definition: SkPictureFlat.h:60
@ MARK_CTM
@ DRAW_ANNOTATION
Definition: SkPictureFlat.h:91
@ CONCAT
Definition: SkPictureFlat.h:38
@ DRAW_TEXT_TOP_BOTTOM_REMOVED_1_2019
Definition: SkPictureFlat.h:59
@ DRAW_TEXT_ON_PATH_RETIRED_08_2018_REMOVED_10_2018
Definition: SkPictureFlat.h:58
@ SAVE_LAYER_SAVEFLAGS_DEPRECATED_2015_REMOVED_12_2020
Definition: SkPictureFlat.h:64
@ DRAW_IMAGE_NINE
Definition: SkPictureFlat.h:85
@ UNUSED
Definition: SkPictureFlat.h:33
@ SAVE_BEHIND
@ DRAW_IMAGE_LATTICE
Definition: SkPictureFlat.h:99
@ DRAW_POINTS
Definition: SkPictureFlat.h:49
@ DRAW_SHADOW_REC
Definition: SkPictureFlat.h:98
@ SAVE_LAYER_SAVELAYERREC
Definition: SkPictureFlat.h:89
@ END_COMMENT_GROUP_obsolete
Definition: SkPictureFlat.h:72
@ DRAW_ATLAS
Definition: SkPictureFlat.h:84
@ DRAW_TEXT_RSXFORM_DEPRECATED_DEC_2018
Definition: SkPictureFlat.h:94
@ CLIP_RRECT
Definition: SkPictureFlat.h:37
@ TRANSLATE
Definition: SkPictureFlat.h:68
@ COMMENT_obsolete
Definition: SkPictureFlat.h:71
@ DRAW_OVAL
Definition: SkPictureFlat.h:45
@ CLIP_REGION
Definition: SkPictureFlat.h:35
@ DRAW_CLEAR
Definition: SkPictureFlat.h:43
@ CLIP_SHADER_IN_PAINT
@ DRAW_IMAGE_RECT_STRICT_obsolete
Definition: SkPictureFlat.h:83
@ DRAW_POS_TEXT_H_TOP_BOTTOM_REMOVED_1_2019
Definition: SkPictureFlat.h:53
@ DRAW_BITMAP_NINE_RETIRED_2016_REMOVED_2018
Definition: SkPictureFlat.h:41
@ CLIP_RECT
Definition: SkPictureFlat.h:36
@ DRAW_SPRITE_RETIRED_2015_REMOVED_2018
Definition: SkPictureFlat.h:56
@ DRAW_POS_TEXT_TOP_BOTTOM_REMOVED_1_2019
Definition: SkPictureFlat.h:51
@ POP_CULL
Definition: SkPictureFlat.h:77
@ DRAW_IMAGE_LATTICE2

◆ DrawVertexFlags

Enumerator
DRAW_VERTICES_HAS_TEXS 
DRAW_VERTICES_HAS_COLORS 
DRAW_VERTICES_HAS_INDICES 
DRAW_VERTICES_HAS_XFER 

Definition at line 130 of file SkPictureFlat.h.

130 {
135};
@ DRAW_VERTICES_HAS_TEXS
@ DRAW_VERTICES_HAS_XFER
@ DRAW_VERTICES_HAS_INDICES
@ DRAW_VERTICES_HAS_COLORS

◆ SaveBehindFlatFlags

Enumerator
SAVEBEHIND_HAS_SUBSET 

Definition at line 158 of file SkPictureFlat.h.

158 {
159 SAVEBEHIND_HAS_SUBSET = 1 << 0,
160};
@ SAVEBEHIND_HAS_SUBSET

◆ SaveLayerRecFlatFlags

Enumerator
SAVELAYERREC_HAS_BOUNDS 
SAVELAYERREC_HAS_PAINT 
SAVELAYERREC_HAS_BACKDROP 
SAVELAYERREC_HAS_FLAGS 
SAVELAYERREC_HAS_CLIPMASK_OBSOLETE 
SAVELAYERREC_HAS_CLIPMATRIX_OBSOLETE 
SAVELAYERREC_HAS_BACKDROP_SCALE 
SAVELAYERREC_HAS_MULTIPLE_FILTERS 

Definition at line 147 of file SkPictureFlat.h.

147 {
149 SAVELAYERREC_HAS_PAINT = 1 << 1,
151 SAVELAYERREC_HAS_FLAGS = 1 << 3,
152 SAVELAYERREC_HAS_CLIPMASK_OBSOLETE = 1 << 4, // 6/13/2020
153 SAVELAYERREC_HAS_CLIPMATRIX_OBSOLETE = 1 << 5, // 6/13/2020
156};
@ SAVELAYERREC_HAS_FLAGS
@ SAVELAYERREC_HAS_BACKDROP_SCALE
@ SAVELAYERREC_HAS_MULTIPLE_FILTERS
@ SAVELAYERREC_HAS_PAINT
@ SAVELAYERREC_HAS_CLIPMASK_OBSOLETE
@ SAVELAYERREC_HAS_CLIPMATRIX_OBSOLETE
@ SAVELAYERREC_HAS_BACKDROP
@ SAVELAYERREC_HAS_BOUNDS

Function Documentation

◆ ClipParams_pack()

static uint32_t ClipParams_pack ( SkClipOp  op,
bool  doAA 
)
inlinestatic

Definition at line 167 of file SkPictureFlat.h.

167 {
168 unsigned doAABit = doAA ? 1 : 0;
169 return (doAABit << 4) | static_cast<int>(op);
170}

◆ ClipParams_unpackDoAA()

static bool ClipParams_unpackDoAA ( uint32_t  packed)
inlinestatic

Definition at line 184 of file SkPictureFlat.h.

184 {
185 return SkToBool((packed >> 4) & 1);
186}
static constexpr bool SkToBool(const T &x)
Definition: SkTo.h:35

◆ ClipParams_unpackRegionOp()

static SkRegion::Op ClipParams_unpackRegionOp ( SkReadBuffer buffer,
uint32_t  packed 
)
inlinestatic

Definition at line 174 of file SkPictureFlat.h.

174 {
175 uint32_t unpacked = packed & 0xF;
176 if (buffer->validate(unpacked <= SkRegion::kIntersect_Op ||
177 (unpacked <= SkRegion::kReplace_Op &&
179 return static_cast<SkRegion::Op>(unpacked);
180 }
182}
@ kReplace_Op
replace target with operand
Definition: SkRegion.h:372
@ kIntersect_Op
target intersected with operand
Definition: SkRegion.h:368
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126