Home | History | Annotate | Download | only in core

Lines Matching refs:Row

92         return segments * 2;    // each segment is row[0] + row[1] (n + alpha)
103 uint8_t* row = head->data();
106 row[0] = n;
107 row[1] = 0xFF;
109 row += 2;
176 static size_t compute_row_length(const uint8_t row[], int width) {
177 const uint8_t* origRow = row;
179 int n = row[0];
182 row += 2;
186 return row - origRow;
213 const uint8_t* row = head->data() + yoff->fOffset;
214 size_t rowLength = compute_row_length(row, fBounds.width());
223 static void dump_one_row(const uint8_t* SK_RESTRICT row,
229 int n = row[0];
230 int val = row[1];
240 row += 2;
267 // RLE row. If 'row' is all zeros return 'width' in both variables.
268 static void count_left_right_zeros(const uint8_t* row, int width,
272 if (row[1]) {
275 int n = row[0];
279 row += 2;
292 int n = row[0];
294 if (0 == row[1]) {
299 row += 2;
337 // modify row in place, trimming off (zeros) from the left and right sides.
339 static int trim_row_left_right(uint8_t* row, int width, int leftZ, int riteZ) {
342 SkASSERT(0 == row[1]);
343 int n = row[0];
347 row += 2;
349 row[-2] = n - leftZ;
358 // walk row to the end, and then we'll back up to trim riteZ
360 int n = row[0];
363 row += 2;
367 row -= 2;
368 SkASSERT(0 == row[1]);
369 int n = row[0];
372 row[0] = n - riteZ;
384 // assert that this row is exactly this width
385 static void assert_row_width(const uint8_t* row, int width) {
387 int n = row[0];
391 row += 2;
487 // play tricks with the yoff->fOffset for each row
490 uint8_t* row = base + yoff->fOffset;
491 SkDEBUGCODE((void)compute_row_length(row, width);)
492 yoff->fOffset += trim_row_left_right(row, width, leftZeros, riteZeros);
499 static bool row_is_all_zeros(const uint8_t* row, int width) {
502 if (row[1]) {
505 int n = row[0];
508 row += 2;
566 // We know that we have at least one non-zero row, so we can just walk
741 const uint8_t* row = head->data() + yoff->fOffset;
744 if (row[1] != 0xFF) {
747 int n = row[0];
750 row += 2;
823 // flush current row
826 // did we introduce an empty-gap from the prev row?
850 // flush last row
921 const uint8_t* row = this->findRow(top, &lastY);
927 row = this->findX(row, left, &count);
929 return count >= (right - left) && 0xFF == row[1];
932 while (0xFF == row[1]) {
937 row += 2;
938 count = row[0];
948 struct Row {
953 SkTDArray<Row> fRows;
954 Row* fCurrRow;
968 Row* row = fRows.begin();
969 Row* stop = fRows.end();
970 while (row < stop) {
971 delete row->fData;
972 row += 1;
986 Row* row = fCurrRow;
990 row = this->flushRow(true);
991 row->fY = y;
992 row->fWidth = 0;
993 SkASSERT(row->fData);
994 SkASSERT(0 == row->fData->count());
995 fCurrRow = row;
998 SkASSERT(row->fWidth <= x);
999 SkASSERT(row->fWidth < fBounds.width());
1001 SkTDArray<uint8_t>& data = *row->fData;
1003 int gap = x - row->fWidth;
1006 row->fWidth += gap;
1007 SkASSERT(row->fWidth < fBounds.width());
1011 row->fWidth += count;
1012 SkASSERT(row->fWidth <= fBounds.width());
1030 // so we ensure our row goes all the way to our right
1068 // so we ensure our row goes all the way to our right
1079 const Row* row = fRows.begin();
1080 const Row* stop = fRows.end();
1083 while (row < stop) {
1084 dataSize += row->fData->count();
1085 row += 1;
1102 row = fRows.begin();
1103 SkDEBUGCODE(int prevY = row->fY - 1;)
1104 while (row < stop) {
1105 SkASSERT(prevY < row->fY); // must be monotonic
1106 SkDEBUGCODE(prevY = row->fY);
1108 yoffset->fY = row->fY - adjustY;
1112 size_t n = row->fData->count();
1113 memcpy(data, row->fData->begin(), n);
1120 row += 1;
1133 const Row& row = fRows[y];
1134 SkDebugf("Y:%3d W:%3d", row.fY, row.fWidth);
1135 const SkTDArray<uint8_t>& data = *row.fData;
1154 const Row& row = fRows[i];
1155 SkASSERT(prevY < row.fY);
1156 SkASSERT(fWidth == row.fWidth);
1157 int count = row.fData->count();
1158 const uint8_t* ptr = row.fData->begin();
1169 prevY = row.fY;
1180 void flushRowH(Row* row) {
1181 // flush current row if needed
1182 if (row->fWidth < fWidth) {
1183 AppendRun(*row->fData, 0, fWidth - row->fWidth);
1184 row->fWidth = fWidth;
1188 Row* flushRow(bool readyForAnother) {
1189 Row* next = nullptr;
1196 Row* prev = &fRows[count - 2];
1197 Row* curr = &fRows[count - 1];
1483 RowIter(const uint8_t* row, const SkIRect& bounds) {
1484 fRow = row;
1487 if (row) {
1488 fRight = bounds.fLeft + row[0];
1490 fAlpha = row[1];
1852 const uint8_t* SK_RESTRICT row,
1855 int n = row[0];
1857 memset(mask, row[1], n);
1859 row += 2;
1944 const uint8_t* row = fAAClip->findRow(y);
1946 row = fAAClip->findX(row, x, &initialCount);
1949 SkAlpha alpha = row[1];
1960 expandToRuns(row, initialCount, width, fRuns, fAA);
1965 static void merge(const uint8_t* SK_RESTRICT row, int rowN,
1982 unsigned newAlpha = SkMulDiv255Round(srcAA[0], row[1]);
1999 row += 2;
2000 rowN = row[0]; // reload
2012 const uint8_t* row = fAAClip->findRow(y);
2014 row = fAAClip->findX(row, x, &initialCount);
2018 merge(row, initialCount, aa, runs, fAA, fRuns, fAAClipBounds.width());
2030 const uint8_t* row = fAAClip->findRow(y, &lastY);
2037 row = fAAClip->findX(row, x);
2038 SkAlpha newAlpha = SkMulDiv255Round(alpha, row[1]);
2062 typedef void (*MergeAAProc)(const void* src, int width, const uint8_t* row,
2087 void mergeT(const void* inSrc, int srcN, const uint8_t* SK_RESTRICT row, int rowN, void* inDst) {
2095 unsigned rowA = row[1];
2114 row += 2;
2115 rowN = row[0];
2229 const uint8_t* row = fAAClip->findRow(y, &localStopY);
2234 row = fAAClip->findX(row, clip.fLeft, &initialCount);
2236 mergeProc(src, width, row, initialCount, rowMask.fImage);