Home | History | Annotate | Download | only in core

Lines Matching refs:Row

91         return segments * 2;    // each segment is row[0] + row[1] (n + alpha)
102 uint8_t* row = head->data();
105 row[0] = n;
106 row[1] = 0xFF;
108 row += 2;
175 static size_t compute_row_length(const uint8_t row[], int width) {
176 const uint8_t* origRow = row;
178 int n = row[0];
181 row += 2;
185 return row - origRow;
211 const uint8_t* row = head->data() + yoff->fOffset;
212 size_t rowLength = compute_row_length(row, fBounds.width());
225 // RLE row. If 'row' is all zeros return 'width' in both variables.
226 static void count_left_right_zeros(const uint8_t* row, int width,
230 if (row[1]) {
233 int n = row[0];
237 row += 2;
250 int n = row[0];
252 if (0 == row[1]) {
257 row += 2;
295 // modify row in place, trimming off (zeros) from the left and right sides.
297 static int trim_row_left_right(uint8_t* row, int width, int leftZ, int riteZ) {
300 SkASSERT(0 == row[1]);
301 int n = row[0];
305 row += 2;
307 row[-2] = n - leftZ;
316 // walk row to the end, and then we'll back up to trim riteZ
318 int n = row[0];
321 row += 2;
325 row -= 2;
326 SkASSERT(0 == row[1]);
327 int n = row[0];
330 row[0] = n - riteZ;
342 // assert that this row is exactly this width
343 static void assert_row_width(const uint8_t* row, int width) {
345 int n = row[0];
349 row += 2;
445 // play tricks with the yoff->fOffset for each row
448 uint8_t* row = base + yoff->fOffset;
449 SkDEBUGCODE((void)compute_row_length(row, width);)
450 yoff->fOffset += trim_row_left_right(row, width, leftZeros, riteZeros);
457 static bool row_is_all_zeros(const uint8_t* row, int width) {
460 if (row[1]) {
463 int n = row[0];
466 row += 2;
524 // We know that we have at least one non-zero row, so we can just walk
753 // flush current row
756 // did we introduce an empty-gap from the prev row?
780 // flush last row
851 const uint8_t* row = this->findRow(top, &lastY);
857 row = this->findX(row, left, &count);
859 return count >= (right - left) && 0xFF == row[1];
862 while (0xFF == row[1]) {
867 row += 2;
868 count = row[0];
878 struct Row {
883 SkTDArray<Row> fRows;
884 Row* fCurrRow;
898 Row* row = fRows.begin();
899 Row* stop = fRows.end();
900 while (row < stop) {
901 delete row->fData;
902 row += 1;
916 Row* row = fCurrRow;
920 row = this->flushRow(true);
921 row->fY = y;
922 row->fWidth = 0;
923 SkASSERT(row->fData);
924 SkASSERT(0 == row->fData->count());
925 fCurrRow = row;
928 SkASSERT(row->fWidth <= x);
929 SkASSERT(row->fWidth < fBounds.width());
931 SkTDArray<uint8_t>& data = *row->fData;
933 int gap = x - row->fWidth;
936 row->fWidth += gap;
937 SkASSERT(row->fWidth < fBounds.width());
941 row->fWidth += count;
942 SkASSERT(row->fWidth <= fBounds.width());
960 // so we ensure our row goes all the way to our right
993 // so we ensure our row goes all the way to our right
1004 const Row* row = fRows.begin();
1005 const Row* stop = fRows.end();
1008 while (row < stop) {
1009 dataSize += row->fData->count();
1010 row += 1;
1027 row = fRows.begin();
1028 SkDEBUGCODE(int prevY = row->fY - 1;)
1029 while (row < stop) {
1030 SkASSERT(prevY < row->fY); // must be monotonic
1031 SkDEBUGCODE(prevY = row->fY);
1033 yoffset->fY = row->fY - adjustY;
1037 size_t n = row->fData->count();
1038 memcpy(data, row->fData->begin(), n);
1045 row += 1;
1058 const Row& row = fRows[y];
1059 SkDebugf("Y:%3d W:%3d", row.fY, row.fWidth);
1060 const SkTDArray<uint8_t>& data = *row.fData;
1079 const Row& row = fRows[i];
1080 SkASSERT(prevY < row.fY);
1081 SkASSERT(fWidth == row.fWidth);
1082 int count = row.fData->count();
1083 const uint8_t* ptr = row.fData->begin();
1094 prevY = row.fY;
1105 void flushRowH(Row* row) {
1106 // flush current row if needed
1107 if (row->fWidth < fWidth) {
1108 AppendRun(*row->fData, 0, fWidth - row->fWidth);
1109 row->fWidth = fWidth;
1113 Row* flushRow(bool readyForAnother) {
1114 Row* next = NULL;
1121 Row* prev = &fRows[count - 2];
1122 Row* curr = &fRows[count - 1];
1397 RowIter(const uint8_t* row, const SkIRect& bounds) {
1398 fRow = row;
1401 if (row) {
1402 fRight = bounds.fLeft + row[0];
1404 fAlpha = row[1];
1766 const uint8_t* SK_RESTRICT row,
1769 int n = row[0];
1771 row[1], n);
1773 row += 2;
1858 const uint8_t* row = fAAClip->findRow(y);
1860 row = fAAClip->findX(row, x, &initialCount);
1863 SkAlpha alpha = row[1];
1874 expandToRuns(row, initialCount, width, fRuns, fAA);
1879 static void merge(const uint8_t* SK_RESTRICT row, int rowN,
1896 unsigned newAlpha = SkMulDiv255Round(srcAA[0], row[1]);
1913 row += 2;
1914 rowN = row[0]; // reload
1926 const uint8_t* row = fAAClip->findRow(y);
1928 row = fAAClip->findX(row, x, &initialCount);
1932 merge(row, initialCount, aa, runs, fAA, fRuns, fAAClipBounds.width());
1944 const uint8_t* row = fAAClip->findRow(y, &lastY);
1951 row = fAAClip->findX(row, x);
1952 SkAlpha newAlpha = SkMulDiv255Round(alpha, row[1]);
1976 typedef void (*MergeAAProc)(const void* src, int width, const uint8_t* row,
2010 const uint8_t* SK_RESTRICT row, int rowN,
2017 unsigned rowA = row[1];
2036 row += 2;
2037 rowN = row[0];
2160 const uint8_t* row = fAAClip->findRow(y, &localStopY);
2165 row = fAAClip->findX(row, clip.fLeft, &initialCount);
2167 mergeProc(src, width, row, initialCount, rowMask.fImage);