44
55#include " flutter/display_list/geometry/dl_region.h"
66
7- #include < cassert >
7+ #include " flutter/fml/logging.h "
88
99namespace flutter {
1010
@@ -43,9 +43,9 @@ std::vector<SkIRect> DlRegion::getRects(bool deband) const {
4343 if (iter->bottom () < rect.top ()) {
4444 // Went all the way to previous span line.
4545 break ;
46- } else if (iter->bottom () == rect.top () &&
47- iter->left () == rect.left () &&
46+ } else if (iter->left () == rect.left () &&
4847 iter->right () == rect.right ()) {
48+ FML_DCHECK (iter->bottom () == rect.top ());
4949 rect.fTop = iter->fTop ;
5050 rects.erase (iter);
5151 break ;
@@ -89,7 +89,7 @@ void DlRegion::SpanLine::insertSpan(int32_t left, int32_t right) {
8989bool DlRegion::SpanLine::spansEqual (const SpanLine& l2) const {
9090 SpanVec& spans = *this ->spans ;
9191 SpanVec& otherSpans = *l2.spans ;
92- assert (this != &l2);
92+ FML_DCHECK (this != &l2);
9393
9494 if (spans.size () != otherSpans.size ()) {
9595 return false ;
@@ -195,7 +195,7 @@ void DlRegion::addRects(std::vector<SkIRect>&& rects) {
195195 insertLine (i + 1 , makeLine (y1, prevLineEnd, *line.spans ));
196196 continue ;
197197 }
198- assert (y1 == line.top );
198+ FML_DCHECK (y1 == line.top );
199199 if (y2 < line.bottom ) {
200200 // duplicate line
201201 auto newLine = makeLine (y2, line.bottom , *line.spans );
@@ -206,7 +206,7 @@ void DlRegion::addRects(std::vector<SkIRect>&& rects) {
206206 mark_dirty (i);
207207 break ;
208208 }
209- assert (y2 >= line.bottom );
209+ FML_DCHECK (y2 >= line.bottom );
210210 line.insertSpan (rect.fLeft , rect.fRight );
211211 mark_dirty (i);
212212 y1 = line.bottom ;
0 commit comments