| 247 | OutlinePixelsCacheEntry OutlinePixelsCache; |
| 248 | |
| 249 | void PopulateOutlinePixelsForRow( |
| 250 | const OutlineRowSolidRuns &runs, |
| 251 | const bool *DVL_RESTRICT below, |
| 252 | bool *DVL_RESTRICT cur, |
| 253 | bool *DVL_RESTRICT above, |
| 254 | uint8_t y, |
| 255 | OutlinePixels &result) |
| 256 | { |
| 257 | DVL_ASSUME(!runs.empty()); |
| 258 | for (const auto &[begin, end] : runs) { |
| 259 | if (!cur[static_cast<uint8_t>(begin - 1)]) { |
| 260 | result.emplace_back(static_cast<uint8_t>(begin - 1), y); |
| 261 | cur[static_cast<uint8_t>(begin - 1)] = true; |
| 262 | } |
| 263 | if (!cur[end]) { |
| 264 | result.emplace_back(end, y); |
| 265 | cur[end] = true; |
| 266 | } |
| 267 | for (uint8_t x = begin; x < end; ++x) { |
| 268 | if (!below[x]) { |
| 269 | result.emplace_back(x, static_cast<uint8_t>(y + 1)); |
| 270 | } |
| 271 | if (!above[x]) { |
| 272 | result.emplace_back(x, static_cast<uint8_t>(y - 1)); |
| 273 | above[x] = true; |
| 274 | } |
| 275 | } |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | void AppendOutlineRowSolidRuns(uint8_t x, uint8_t w, OutlineRowSolidRuns &solidRuns) |
| 280 | { |