#include <SkRegionPriv.h>
Definition at line 59 of file SkRegionPriv.h.
◆ Alloc() [1/2]
static RunHead * SkRegion::RunHead::Alloc |
( |
int |
count | ) |
|
|
inlinestatic |
Definition at line 85 of file SkRegionPriv.h.
85 {
86 if (
count < SkRegion::kRectRegionRuns) {
87 return nullptr;
88 }
89
92
96
97 head->fYSpanCount = 0;
98 head->fIntervalCount = 0;
100 }
#define SK_ABORT(message,...)
static void * sk_malloc_throw(size_t size)
static int64_t sk_64_mul(int64_t a, int64_t b)
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
◆ Alloc() [2/2]
static RunHead * SkRegion::RunHead::Alloc |
( |
int |
count, |
|
|
int |
yspancount, |
|
|
int |
intervalCount |
|
) |
| |
|
inlinestatic |
Definition at line 102 of file SkRegionPriv.h.
102 {
103 if (yspancount <= 0 || intervalCount <= 1) {
104 return nullptr;
105 }
106
109 return nullptr;
110 }
111 head->fYSpanCount = yspancount;
112 head->fIntervalCount = intervalCount;
114 }
static RunHead * Alloc(int count)
◆ computeRunBounds()
void SkRegion::RunHead::computeRunBounds |
( |
SkIRect * |
bounds | ) |
|
|
inline |
Definition at line 195 of file SkRegionPriv.h.
195 {
197 bounds->
fTop = *runs++;
198
199 int bot;
200 int ySpanCount = 0;
201 int intervalCount = 0;
204
205 do {
206 bot = *runs++;
208 ySpanCount += 1;
209
210 const int intervals = *runs++;
213
214 if (intervals > 0) {
215#ifdef SK_DEBUG
216 {
217 int n = compute_intervalcount(runs);
219 }
220#endif
225 }
226
227 runs += intervals * 2;
228 RunType
R = runs[-1];
232 }
233
234 intervalCount += intervals;
235 }
237 runs += 1;
238
239
241
242#ifdef SK_DEBUG
243
246#endif
247
248 fYSpanCount = ySpanCount;
249 fIntervalCount = intervalCount;
250
254 }
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)
Optional< SkRect > bounds
int32_t fTop
smaller y-axis bounds
SkRegion::RunType * writable_runs()
◆ ensureWritable()
RunHead * SkRegion::RunHead::ensureWritable |
( |
| ) |
|
|
inline |
Definition at line 125 of file SkRegionPriv.h.
125 {
128
129
131 memcpy(writable->writable_runs(), this->readonly_runs(),
133
134
135
136
139 }
140 }
141 return writable;
142 }
SK_API void sk_free(void *)
std::atomic< int32_t > fRefCnt
◆ findScanline()
SkRegion::RunType * SkRegion::RunHead::findScanline |
( |
int |
y | ) |
const |
|
inline |
Return the scanline that contains the Y value. This requires that the Y value is already known to be contained within the bounds of the region, and so this routine never returns nullptr.
It returns the beginning of the scanline, starting with its Bottom value.
Definition at line 174 of file SkRegionPriv.h.
174 {
176
177
179
180 runs += 1;
181 for (;;) {
182 int bottom = runs[0];
183
184
187 break;
188 }
190 }
191 return const_cast<SkRegion::RunType*>(runs);
192 }
const SkRegion::RunType * readonly_runs() const
static SkRegion::RunType * SkipEntireScanline(const SkRegion::RunType runs[])
◆ getIntervalCount()
int SkRegion::RunHead::getIntervalCount |
( |
| ) |
const |
|
inline |
Number of intervals in the entire region. This equals the number of rects that would be returned by the Iterator. In the logical case of a rect, this would return 1, and an empty region would return 0.
Definition at line 81 of file SkRegionPriv.h.
81 {
82 return fIntervalCount;
83 }
◆ getYSpanCount()
int SkRegion::RunHead::getYSpanCount |
( |
| ) |
const |
|
inline |
Number of spans with different Y values. This does not count the initial Top value, nor does it count the final Y-Sentinel value. In the logical case of a rectangle, this would return 1, and an empty region would return 0.
Definition at line 72 of file SkRegionPriv.h.
72 {
73 return fYSpanCount;
74 }
◆ readonly_runs()
const SkRegion::RunType * SkRegion::RunHead::readonly_runs |
( |
| ) |
const |
|
inline |
Definition at line 121 of file SkRegionPriv.h.
121 {
122 return (const SkRegion::RunType*)(this + 1);
123 }
◆ SkipEntireScanline()
static SkRegion::RunType * SkRegion::RunHead::SkipEntireScanline |
( |
const SkRegion::RunType |
runs[] | ) |
|
|
inlinestatic |
Given a scanline (including its Bottom value at runs[0]), return the next scanline. Asserts that there is one (i.e. runs[0] < Sentinel)
Definition at line 148 of file SkRegionPriv.h.
148 {
149
151
152 const int intervals = runs[1];
154#ifdef SK_DEBUG
155 {
156 int n = compute_intervalcount(&runs[2]);
158 }
159#endif
160
161
162 runs += 1 + 1 + intervals * 2 + 1;
163 return const_cast<SkRegion::RunType*>(runs);
164 }
◆ writable_runs()
SkRegion::RunType * SkRegion::RunHead::writable_runs |
( |
| ) |
|
|
inline |
Definition at line 116 of file SkRegionPriv.h.
116 {
118 return (SkRegion::RunType*)(this + 1);
119 }
◆ fRefCnt
std::atomic<int32_t> SkRegion::RunHead::fRefCnt |
◆ fRunCount
int32_t SkRegion::RunHead::fRunCount |
The documentation for this struct was generated from the following file: