Home | History | Annotate | Download | only in core

Lines Matching refs: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());
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
1063 // so we ensure our row goes all the way to our right
1074 const Row* row = fRows.begin();
1075 const Row* stop = fRows.end();
1078 while (row < stop) {
1079 dataSize += row->fData->count();
1080 row += 1;
1097 row = fRows.begin();
1098 SkDEBUGCODE(int prevY = row->fY - 1;)
1099 while (row < stop) {
1100 SkASSERT(prevY < row->fY); // must be monotonic
1101 SkDEBUGCODE(prevY = row->fY);
1103 yoffset->fY = row->fY - adjustY;
1107 size_t n = row->fData->count();
1108 memcpy(data, row->fData->begin(), n);
1115 row += 1;
1128 const Row& row = fRows[y];
1129 SkDebugf("Y:%3d W:%3d", row.fY, row.fWidth);
1130 const SkTDArray<uint8_t>& data = *row.fData;
1149 const Row& row = fRows[i];
1150 SkASSERT(prevY < row.fY);
1151 SkASSERT(fWidth == row.fWidth);
1152 int count = row.fData->count();
1153 const uint8_t* ptr = row.fData->begin();
1164 prevY = row.fY;
1175 void flushRowH(Row* row) {
1176 // flush current row if needed
1177 if (row->fWidth < fWidth) {
1178 AppendRun(*row->fData, 0, fWidth - row->fWidth);
1179 row->fWidth = fWidth;
1183 Row* flushRow(bool readyForAnother) {
1184 Row* next = nullptr;
1191 Row* prev = &fRows[count - 2];
1192 Row* curr = &fRows[count - 1];
1456 RowIter(const uint8_t* row, const SkIRect& bounds) {
1457 fRow = row;
1460 if (row) {
1461 fRight = bounds.fLeft + row[0];
1463 fAlpha = row[1];
1825 const uint8_t* SK_RESTRICT row,
1828 int n = row[0];
1830 memset(mask, row[1], n);
1832 row += 2;
1917 const uint8_t* row = fAAClip->findRow(y);
1919 row = fAAClip->findX(row, x, &initialCount);
1922 SkAlpha alpha = row[1];
1933 expandToRuns(row, initialCount, width, fRuns, fAA);
1938 static void merge(const uint8_t* SK_RESTRICT row, int rowN,
1955 unsigned newAlpha = SkMulDiv255Round(srcAA[0], row[1]);
1972 row += 2;
1973 rowN = row[0]; // reload
1985 const uint8_t* row = fAAClip->findRow(y);
1987 row = fAAClip->findX(row, x, &initialCount);
1991 merge(row, initialCount, aa, runs, fAA, fRuns, fAAClipBounds.width());
2003 const uint8_t* row = fAAClip->findRow(y, &lastY);
2010 row = fAAClip->findX(row, x);
2011 SkAlpha newAlpha = SkMulDiv255Round(alpha, row[1]);
2035 typedef void (*MergeAAProc)(const void* src, int width, const uint8_t* row,
2060 void mergeT(const void* inSrc, int srcN, const uint8_t* SK_RESTRICT row, int rowN, void* inDst) {
2068 unsigned rowA = row[1];
2087 row += 2;
2088 rowN = row[0];
2202 const uint8_t* row = fAAClip->findRow(y, &localStopY);
2207 row = fAAClip->findX(row, clip.fLeft, &initialCount);
2209 mergeProc(src, width, row, initialCount, rowMask.fImage);