Lines Matching full:row
93 return segments * 2; // each segment is row[0] + row[1] (n + alpha)
104 uint8_t* row = head->data();
107 row[0] = n;
108 row[1] = 0xFF;
110 row += 2;
177 static size_t compute_row_length(const uint8_t row[], int width) {
178 const uint8_t* origRow = row;
180 int n = row[0];
183 row += 2;
187 return row - origRow;
213 const uint8_t* row = head->data() + yoff->fOffset;
214 size_t rowLength = compute_row_length(row, fBounds.width());
227 // RLE row. If 'row' is all zeros return 'width' in both variables.
228 static void count_left_right_zeros(const uint8_t* row, int width,
232 if (row[1]) {
235 int n = row[0];
239 row += 2;
252 int n = row[0];
254 if (0 == row[1]) {
259 row += 2;
297 // modify row in place, trimming off (zeros) from the left and right sides.
299 static int trim_row_left_right(uint8_t* row, int width, int leftZ, int riteZ) {
302 SkASSERT(0 == row[1]);
303 int n = row[0];
307 row += 2;
309 row[-2] = n - leftZ;
318 // walk row to the end, and then we'll back up to trim riteZ
320 int n = row[0];
323 row += 2;
327 row -= 2;
328 SkASSERT(0 == row[1]);
329 int n = row[0];
332 row[0] = n - riteZ;
344 // assert that this row is exactly this width
345 static void assert_row_width(const uint8_t* row, int width) {
347 int n = row[0];
351 row += 2;
447 // play tricks with the yoff->fOffset for each row
450 uint8_t* row = base + yoff->fOffset;
451 SkDEBUGCODE((void)compute_row_length(row, width);)
452 yoff->fOffset += trim_row_left_right(row, width, leftZeros, riteZeros);
459 static bool row_is_all_zeros(const uint8_t* row, int width) {
462 if (row[1]) {
465 int n = row[0];
468 row += 2;
526 // We know that we have at least one non-zero row, so we can just walk
755 // flush current row
758 // did we introduce an empty-gap from the prev row?
782 // flush last row
853 const uint8_t* row = this->findRow(top, &lastY);
859 row = this->findX(row, left, &count);
861 return count >= (right - left) && 0xFF == row[1];
864 while (0xFF == row[1]) {
869 row += 2;
870 count = row[0];
880 struct Row {
885 SkTDArray<Row> fRows;
886 Row* fCurrRow;
900 Row* row = fRows.begin();
901 Row* stop = fRows.end();
902 while (row < stop) {
903 delete row->fData;
904 row += 1;
918 Row* row = fCurrRow;
922 row = this->flushRow(true);
923 row->fY = y;
924 row->fWidth = 0;
925 SkASSERT(row->fData);
926 SkASSERT(0 == row->fData->count());
927 fCurrRow = row;
930 SkASSERT(row->fWidth <= x);
931 SkASSERT(row->fWidth < fBounds.width());
933 SkTDArray<uint8_t>& data = *row->fData;
935 int gap = x - row->fWidth;
938 row->fWidth += gap;
939 SkASSERT(row->fWidth < fBounds.width());
943 row->fWidth += count;
944 SkASSERT(row->fWidth <= fBounds.width());
962 // so we ensure our row goes all the way to our right
995 // so we ensure our row goes all the way to our right
1006 const Row* row = fRows.begin();
1007 const Row* stop = fRows.end();
1010 while (row < stop) {
1011 dataSize += row->fData->count();
1012 row += 1;
1029 row = fRows.begin();
1030 SkDEBUGCODE(int prevY = row->fY - 1;)
1031 while (row < stop) {
1032 SkASSERT(prevY < row->fY); // must be monotonic
1033 SkDEBUGCODE(prevY = row->fY);
1035 yoffset->fY = row->fY - adjustY;
1039 size_t n = row->fData->count();
1040 memcpy(data, row->fData->begin(), n);
1047 row += 1;
1060 const Row& row = fRows[y];
1061 SkDebugf("Y:%3d W:%3d", row.fY, row.fWidth);
1062 const SkTDArray<uint8_t>& data = *row.fData;
1081 const Row& row = fRows[i];
1082 SkASSERT(prevY < row.fY);
1083 SkASSERT(fWidth == row.fWidth);
1084 int count = row.fData->count();
1085 const uint8_t* ptr = row.fData->begin();
1096 prevY = row.fY;
1107 void flushRowH(Row* row) {
1108 // flush current row if needed
1109 if (row->fWidth < fWidth) {
1110 AppendRun(*row->fData, 0, fWidth - row->fWidth);
1111 row->fWidth = fWidth;
1115 Row* flushRow(bool readyForAnother) {
1116 Row* next = NULL;
1123 Row* prev = &fRows[count - 2];
1124 Row* curr = &fRows[count - 1];
1388 RowIter(const uint8_t* row, const SkIRect& bounds) {
1389 fRow = row;
1392 if (row) {
1393 fRight = bounds.fLeft + row[0];
1395 fAlpha = row[1];
1757 const uint8_t* SK_RESTRICT row,
1760 int n = row[0];
1762 memset(mask, row[1], n);
1764 row += 2;
1849 const uint8_t* row = fAAClip->findRow(y);
1851 row = fAAClip->findX(row, x, &initialCount);
1854 SkAlpha alpha = row[1];
1865 expandToRuns(row, initialCount, width, fRuns, fAA);
1870 static void merge(const uint8_t* SK_RESTRICT row, int rowN,
1887 unsigned newAlpha = SkMulDiv255Round(srcAA[0], row[1]);
1904 row += 2;
1905 rowN = row[0]; // reload
1917 const uint8_t* row = fAAClip->findRow(y);
1919 row = fAAClip->findX(row, x, &initialCount);
1923 merge(row, initialCount, aa, runs, fAA, fRuns, fAAClipBounds.width());
1935 const uint8_t* row = fAAClip->findRow(y, &lastY);
1942 row = fAAClip->findX(row, x);
1943 SkAlpha newAlpha = SkMulDiv255Round(alpha, row[1]);
1967 typedef void (*MergeAAProc)(const void* src, int width, const uint8_t* row,
2001 const uint8_t* SK_RESTRICT row, int rowN,
2008 unsigned rowA = row[1];
2027 row += 2;
2028 rowN = row[0];
2151 const uint8_t* row = fAAClip->findRow(y, &localStopY);
2156 row = fAAClip->findX(row, clip.fLeft, &initialCount);
2158 mergeProc(src, width, row, initialCount, rowMask.fImage);