15 uint16_t row_low = this->
height_, row_high = 0, col_low = this->
row_width_, col_high = 0;
16 for (uint16_t row = 0; row != this->
height_; row++) {
20 while (index !=
end) {
21 size_t new_length, old_length;
23 const uint8_t *old_bytes = this->
sent_.
get_span(index, old_length);
24 const size_t length = std::min({new_length, old_length,
end - index});
25 if (std::memcmp(new_bytes, old_bytes,
length) != 0) {
26 for (
size_t i = 0; i !=
length; i++) {
27 if (new_bytes[i] == old_bytes[i])
29 const auto col =
static_cast<uint16_t
>(index + i - base);
31 row_low = std::min(row_low, row);
32 row_high = std::max<uint16_t>(row_high, row + 1);
33 col_low = std::min(col_low, col);
34 col_high = std::max<uint16_t>(col_high, col + 1);
42 this->
x_low_ = col_low * 8;
43 this->
x_high_ = std::min<uint16_t>(col_high * 8, this->
width_);