47 {
52 curr += 2;
53 }
54 return SkToInt((curr - runs) >> 1);
55}
56#endif
57
59private:
60
61public:
64
65
66
67
68
69
70
72 return fYSpanCount;
73 }
74
75
76
77
78
79
81 return fIntervalCount;
82 }
83
85 if (
count < SkRegion::kRectRegionRuns) {
86 return nullptr;
87 }
88
90 if (
count < 0 || !SkTFitsIn<int32_t>(size)) {
SK_ABORT(
"Invalid Size"); }
91
95
96 head->fYSpanCount = 0;
97 head->fIntervalCount = 0;
99 }
100
101 static RunHead*
Alloc(
int count,
int yspancount,
int intervalCount) {
102 if (yspancount <= 0 || intervalCount <= 1) {
103 return nullptr;
104 }
105
107 if (!head) {
108 return nullptr;
109 }
110 head->fYSpanCount = yspancount;
111 head->fIntervalCount = intervalCount;
113 }
114
117 return (SkRegion::RunType*)(this + 1);
118 }
119
121 return (const SkRegion::RunType*)(this + 1);
122 }
123
125 RunHead* writable = this;
127
128
130 memcpy(writable->writable_runs(), this->readonly_runs(),
132
133
134
135
138 }
139 }
140 return writable;
141 }
142
143
144
145
146
148
150
151 const int intervals = runs[1];
153#ifdef SK_DEBUG
154 {
155 int n = compute_intervalcount(&runs[2]);
157 }
158#endif
159
160
161 runs += 1 + 1 + intervals * 2 + 1;
162 return const_cast<SkRegion::RunType*>(runs);
163 }
164
165
166
167
168
169
170
171
172
175
176
178
179 runs += 1;
180 for (;;) {
181 int bottom = runs[0];
182
183
186 break;
187 }
189 }
190 return const_cast<SkRegion::RunType*>(runs);
191 }
192
193
196 bounds->
fTop = *runs++;
197
198 int bot;
199 int ySpanCount = 0;
200 int intervalCount = 0;
203
204 do {
205 bot = *runs++;
207 ySpanCount += 1;
208
209 const int intervals = *runs++;
212
213 if (intervals > 0) {
214#ifdef SK_DEBUG
215 {
216 int n = compute_intervalcount(runs);
218 }
219#endif
224 }
225
226 runs += intervals * 2;
227 RunType
R = runs[-1];
231 }
232
233 intervalCount += intervals;
234 }
236 runs += 1;
237
238
240
241#ifdef SK_DEBUG
242
245#endif
246
247 fYSpanCount = ySpanCount;
248 fIntervalCount = intervalCount;
249
253 }
254
255private:
256 int32_t fYSpanCount;
257 int32_t fIntervalCount;
258};
259
260#endif
#define SK_ABORT(message,...)
SK_API void sk_free(void *)
static void * sk_malloc_throw(size_t size)
static int64_t sk_64_mul(int64_t a, int64_t b)
static constexpr int32_t SK_MinS32
static constexpr int32_t SK_MaxS32
static bool left(const SkPoint &p0, const SkPoint &p1)
static constexpr int SkRegion_kRunTypeSentinel
constexpr int SkToInt(S x)
SkRegion::RunType RunType
Optional< SkRect > bounds
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
int32_t fTop
smaller y-axis bounds
SkRegion::RunType * writable_runs()
static RunHead * Alloc(int count)
const SkRegion::RunType * readonly_runs() const
void computeRunBounds(SkIRect *bounds)
RunHead * ensureWritable()
int getYSpanCount() const
int getIntervalCount() const
static SkRegion::RunType * SkipEntireScanline(const SkRegion::RunType runs[])
SkRegion::RunType * findScanline(int y) const
std::atomic< int32_t > fRefCnt