Lines Matching defs:row

46 static size_t compute_row_length(const uint8_t row[], int width) {
47 const uint8_t* origRow = row;
49 int n = row[0];
52 row += 2;
56 return row - origRow;
70 RowIter(const uint8_t* row, const SkIRect& bounds) {
71 fRow = row;
74 if (row) {
75 fRight = bounds.fLeft + row[0];
77 fAlpha = row[1];
200 return segments * 2; // each segment is row[0] + row[1] (n + alpha)
211 uint8_t* row = head->data();
214 row[0] = n;
215 row[1] = 0xFF;
217 row += 2;
260 Row* row = fRows.begin();
262 while (row < stop) {
263 delete row->fData;
264 row += 1;
284 Row* row = fCurrRow;
288 row = this->flushRow(true);
289 row->fY = y;
290 row->fWidth = 0;
291 SkASSERT(row->fData);
292 SkASSERT(0 == row->fData->count());
293 fCurrRow = row;
296 SkASSERT(row->fWidth <= x);
297 SkASSERT(row->fWidth < fBounds.width());
299 SkTDArray<uint8_t>& data = *row->fData;
301 int gap = x - row->fWidth;
304 row->fWidth += gap;
305 SkASSERT(row->fWidth < fBounds.width());
309 row->fWidth += count;
310 SkASSERT(row->fWidth <= fBounds.width());
328 // so we ensure our row goes all the way to our right
368 // so we ensure our row goes all the way to our right
380 const Row* row = fRows.begin();
384 while (row < stop) {
385 dataSize += row->fData->count();
386 row += 1;
403 row = fRows.begin();
404 SkDEBUGCODE(int prevY = row->fY - 1;)
405 while (row < stop) {
406 SkASSERT(prevY < row->fY); // must be monotonic
407 SkDEBUGCODE(prevY = row->fY);
409 yoffset->fY = row->fY - adjustY;
413 size_t n = row->fData->count();
414 memcpy(data, row->fData->begin(), n);
418 row += 1;
431 const Row& row = fRows[y];
432 SkDebugf("Y:%3d W:%3d", row.fY, row.fWidth);
433 const SkTDArray<uint8_t>& data = *row.fData;
449 const Row& row = fRows[i];
450 SkASSERT(prevY < row.fY);
451 SkASSERT(fWidth == row.fWidth);
452 int count = row.fData->count();
453 const uint8_t* ptr = row.fData->begin();
464 prevY = row.fY;
469 void flushRowH(Row* row) {
470 // flush current row if needed
471 if (row->fWidth < fWidth) {
472 AppendRun(*row->fData, 0, fWidth - row->fWidth);
473 row->fWidth = fWidth;
846 auto expandRowToMask = [](uint8_t* dst, const uint8_t* row, int width) {
848 int n = row[0];
850 memset(dst, row[1], n);
852 row += 2;
911 const uint8_t* row = head->data() + yoff->fOffset;
912 size_t rowLength = compute_row_length(row, fBounds.width());
921 static void dump_one_row(const uint8_t* SK_RESTRICT row,
927 int n = row[0];
928 int val = row[1];
938 row += 2;
965 // RLE row. If 'row' is all zeros return 'width' in both variables.
966 static void count_left_right_zeros(const uint8_t* row, int width,
970 if (row[1]) {
973 int n = row[0];
977 row += 2;
990 int n = row[0];
992 if (0 == row[1]) {
997 row += 2;
1003 // modify row in place, trimming off (zeros) from the left and right sides.
1005 static int trim_row_left_right(uint8_t* row, int width, int leftZ, int riteZ) {
1008 SkASSERT(0 == row[1]);
1009 int n = row[0];
1013 row += 2;
1015 row[-2] = n - leftZ;
1024 // walk row to the end, and then we'll back up to trim riteZ
1026 int n = row[0];
1029 row += 2;
1033 row -= 2;
1034 SkASSERT(0 == row[1]);
1035 int n = row[0];
1038 row[0] = n - riteZ;
1098 // play tricks with the yoff->fOffset for each row
1101 uint8_t* row = base + yoff->fOffset;
1102 SkDEBUGCODE((void)compute_row_length(row, width);)
1103 yoff->fOffset += trim_row_left_right(row, width, leftZeros, riteZeros);
1110 static bool row_is_all_zeros(const uint8_t* row, int width) {
1113 if (row[1]) {
1116 int n = row[0];
1119 row += 2;
1177 // We know that we have at least one non-zero row, so we can just walk
1293 const uint8_t* row = head->data() + yoff->fOffset;
1296 if (row[1] != 0xFF) {
1299 int n = row[0];
1302 row += 2;
1353 // flush current row
1356 // did we introduce an empty-gap from the prev row?
1380 // flush last row
1594 const uint8_t* row = this->findRow(top, &lastY);
1600 row = this->findX(row, left, &count);
1603 while (0xFF == row[1]) {
1608 row += 2;
1609 count = row[0];
1664 const uint8_t* row = fAAClip->findRow(y);
1666 row = fAAClip->findX(row, x, &initialCount);
1669 SkAlpha alpha = row[1];
1680 expandToRuns(row, initialCount, width, fRuns, fAA);
1685 static void merge(const uint8_t* SK_RESTRICT row, int rowN,
1702 unsigned newAlpha = SkMulDiv255Round(srcAA[0], row[1]);
1719 row += 2;
1720 rowN = row[0]; // reload
1732 const uint8_t* row = fAAClip->findRow(y);
1734 row = fAAClip->findX(row, x, &initialCount);
1738 merge(row, initialCount, aa, runs, fAA, fRuns, fAAClipBounds.width());
1750 const uint8_t* row = fAAClip->findRow(y, &lastY);
1757 row = fAAClip->findX(row, x);
1758 SkAlpha newAlpha = SkMulDiv255Round(alpha, row[1]);
1782 typedef void (*MergeAAProc)(const void* src, int width, const uint8_t* row,
1807 void mergeT(const void* inSrc, int srcN, const uint8_t* SK_RESTRICT row, int rowN, void* inDst) {
1815 unsigned rowA = row[1];
1834 row += 2;
1835 rowN = row[0];
1949 const uint8_t* row = fAAClip->findRow(y, &localStopY);
1954 row = fAAClip->findX(row, clip.fLeft, &initialCount);
1956 mergeProc(src, width, row, initialCount, rowMask.fImage);