#include <SkAAClip.h>
Definition at line 25 of file SkAAClip.h.
◆ SkAAClip() [1/2]
Definition at line 1234 of file SkAAClip.cpp.
1234 {
1236 fRunHead = nullptr;
1237}
◆ SkAAClip() [2/2]
SkAAClip::SkAAClip |
( |
const SkAAClip & |
src | ) |
|
Definition at line 1239 of file SkAAClip.cpp.
1239 {
1241 fRunHead = nullptr;
1243}
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
◆ ~SkAAClip()
Definition at line 1245 of file SkAAClip.cpp.
1245 {
1246 this->freeRuns();
1247}
◆ copyToMask()
Allocates a mask the size of the aaclip, and expands its data into the mask, using kA8_Format. Used for tests and visualization purposes.
Definition at line 851 of file SkAAClip.cpp.
851 {
852 auto expandRowToMask = [](uint8_t*
dst,
const uint8_t* row,
int width) {
854 int n = row[0];
856 memset(
dst, row[1], n);
858 row += 2;
860 }
862 };
863
867 mask->
image() =
nullptr;
869 return;
870 }
871
876
880
881 int y = fBounds.
fTop;
882 while (!iter.done()) {
883 do {
884 expandRowToMask(
dst, iter.data(),
width);
886 }
while (++
y < iter.bottom());
887 iter.next();
888 }
889}
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
static Iter Iterate(const SkAAClip &clip)
int32_t fTop
smaller y-axis bounds
constexpr int32_t width() const
static uint8_t * AllocImage(size_t bytes, AllocType=kUninit_Alloc)
@ kA8_Format
8bits per pixel mask (e.g. antialiasing)
size_t computeImageSize() const
◆ debug()
void SkAAClip::debug |
( |
bool |
compress_y = false | ) |
const |
|
inline |
◆ getBounds()
const SkIRect & SkAAClip::getBounds |
( |
| ) |
const |
|
inline |
◆ isEmpty()
bool SkAAClip::isEmpty |
( |
| ) |
const |
|
inline |
Definition at line 33 of file SkAAClip.h.
33{ return nullptr == fRunHead; }
◆ isRect()
bool SkAAClip::isRect |
( |
| ) |
const |
Definition at line 1285 of file SkAAClip.cpp.
1285 {
1287 return false;
1288 }
1289
1290 const RunHead*
head = fRunHead;
1291 if (
head->fRowCount != 1) {
1292 return false;
1293 }
1294 const YOffset* yoff =
head->yoffsets();
1295 if (yoff->fY != fBounds.
fBottom - 1) {
1296 return false;
1297 }
1298
1299 const uint8_t* row =
head->data() + yoff->fOffset;
1301 do {
1302 if (row[1] != 0xFF) {
1303 return false;
1304 }
1305 int n = row[0];
1308 row += 2;
1309 }
while (
width > 0);
1310 return true;
1311}
int32_t fBottom
larger y-axis bounds
◆ op() [1/3]
Definition at line 1426 of file SkAAClip.cpp.
1426 {
1428
1430
1431 return false;
1432 }
1433
1438
1439 return true;
1440 }
1441 break;
1442
1445
1447 }
1448 break;
1449 }
1450
1451
1454
1456 return builder.applyClipOp(
this, other,
op);
1457}
#define AUTO_AACLIP_VALIDATE(clip)
bool op(const SkIRect &, SkClipOp)
Optional< SkRect > bounds
DlVertices::Builder Builder
static bool Intersects(const SkIRect &a, const SkIRect &b)
◆ op() [2/3]
Definition at line 1459 of file SkAAClip.cpp.
1459 {
1460
1461
1462
1463 SkIRect pixelBounds = fBounds;
1465
1469 }
1471 } else if (pixelBounds == fBounds) {
1472
1476 }
1479
1480 return this->
setRect(pixelBounds);
1481 } else {
1484 return this->
op(clip,
op);
1485 }
1486}
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
bool setRect(const SkIRect &)
bool quickContains(const SkIRect &r) const
sk_sp< SkBlender > blender SkRect rect
bool intersect(const SkIRect &r)
◆ op() [3/3]
Definition at line 1488 of file SkAAClip.cpp.
1488 {
1489 if (!doAA) {
1491 } else {
1492
1493 SkIRect pixelBounds = fBounds;
1495
1499 }
1502
1506 }
1509
1510
1512 } else {
1516 true);
1517 return this->
op(rectClip,
op);
1518 }
1519 }
1520}
bool setPath(const SkPath &, const SkIRect &bounds, bool doAA=true)
static SkPath Rect(const SkRect &, SkPathDirection=SkPathDirection::kCW, unsigned startIndex=0)
static SkRect Make(const SkISize &size)
bool contains(SkScalar x, SkScalar y) const
void round(SkIRect *dst) const
◆ operator=()
Definition at line 1249 of file SkAAClip.cpp.
1249 {
1252
1254 this->freeRuns();
1255 fBounds =
src.fBounds;
1256 fRunHead =
src.fRunHead;
1257 if (fRunHead) {
1259 }
1260 }
1261 return *this;
1262}
std::atomic< int32_t > fRefCnt
◆ quickContains()
bool SkAAClip::quickContains |
( |
const SkIRect & |
r | ) |
const |
|
inline |
Definition at line 57 of file SkAAClip.h.
57 {
59 }
int32_t fLeft
smaller x-axis bounds
int32_t fRight
larger x-axis bounds
◆ setEmpty()
bool SkAAClip::setEmpty |
( |
| ) |
|
Definition at line 1264 of file SkAAClip.cpp.
1264 {
1265 this->freeRuns();
1267 fRunHead = nullptr;
1268 return false;
1269}
◆ setPath()
bool SkAAClip::setPath |
( |
const SkPath & |
path, |
|
|
const SkIRect & |
bounds, |
|
|
bool |
doAA = true |
|
) |
| |
Definition at line 1401 of file SkAAClip.cpp.
1401 {
1403
1406 }
1407
1409
1410
1411 if (
path.isInverseFillType()) {
1413 } else {
1414 path.getBounds().roundOut(&ibounds);
1417 }
1418 }
1419
1422}
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
◆ setRect()
bool SkAAClip::setRect |
( |
const SkIRect & |
bounds | ) |
|
Definition at line 1271 of file SkAAClip.cpp.
1271 {
1274 }
1275
1277
1278 this->freeRuns();
1282 return true;
1283}
static RunHead * AllocRect(const SkIRect &bounds)
◆ setRegion()
bool SkAAClip::setRegion |
( |
const SkRegion & |
rgn | ) |
|
Definition at line 1313 of file SkAAClip.cpp.
1313 {
1316 }
1319 }
1320
1321
1325
1328
1331
1332 auto appendXRun = [&xArray](uint8_t
value,
int count) {
1336 if (n > 255) {
1337 n = 255;
1338 }
1343 }
1344 };
1345
1347 int prevRight = 0;
1348 int prevBot = 0;
1349 YOffset* currY = nullptr;
1350
1351 for (; !iter.done(); iter.next()) {
1352 const SkIRect& r = iter.rect();
1354
1357 if (bot > prevBot) {
1358 if (currY) {
1359
1360 appendXRun(0,
bounds.width() - prevRight);
1361 }
1362
1364 if (top > prevBot) {
1366 currY->fY = top - 1;
1367 currY->fOffset = xArray.
size();
1368 appendXRun(0,
bounds.width());
1369 }
1370
1372 currY->fY = bot - 1;
1373 currY->fOffset = xArray.
size();
1374 prevRight = 0;
1375 prevBot = bot;
1376 }
1377
1379 appendXRun(0,
x - prevRight);
1380
1382 appendXRun(0xFF,
w);
1385 }
1386
1387 appendXRun(0,
bounds.width() - prevRight);
1388
1389
1393
1398 return true;
1399}
const SkIRect & getBounds() const
size_t size_bytes() const
static float min(float r, float g, float b)
static RunHead * Alloc(int rowCount, size_t dataSize)
std::shared_ptr< const fml::Mapping > data
◆ translate()
Definition at line 1524 of file SkAAClip.cpp.
1524 {
1525 if (
nullptr ==
dst) {
1527 }
1528
1531 }
1532
1536 dst->fRunHead = fRunHead;
1537 dst->fBounds = fBounds;
1538 }
1539 dst->fBounds.offset(
dx, dy);
1540 return true;
1541}
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
◆ validate()
void SkAAClip::validate |
( |
| ) |
const |
|
inline |
◆ SkAAClipBlitter
The documentation for this class was generated from the following files: