pixman vregion: remove unused function. submit/tizen/20191004.064529
authorHermet Park <hermetpark@gmail.com>
Fri, 4 Oct 2019 06:39:12 +0000 (15:39 +0900)
committerHermet Park <hermetpark@gmail.com>
Fri, 4 Oct 2019 06:41:39 +0000 (15:41 +0900)
Thatis acutally wrong that might access invalid data.

The below line, memory indexing

box_type_t *box = PIXREGION_RECTS(reg) + index;

won't work properly since the reg memory is not the exact box_type_t.

Change-Id: I872235580de839a1cc19aad8c5e7564ae56cc68e

src/vector/pixman/vregion.cpp

index 1c5300f..eea7ff9 100644 (file)
@@ -1982,16 +1982,6 @@ int VRegion::rectCount() const
     return PREFIX(_n_rects)(d->rgn);
 }
 
-VRect VRegion::rectAt(int index) const
-{
-    VRegionPrivate *reg = d->rgn;
-    if (!reg) return {};
-
-    box_type_t *box = PIXREGION_RECTS(reg) + index;
-
-    return box_to_rect(box);
-}
-
 VRegion VRegion::operator+(const VRect &r) const
 {
     return united(r);
@@ -2069,19 +2059,4 @@ bool VRegion::intersects(const VRegion &r) const
 
     return PREFIX(_intersects)(d->rgn, r.d->rgn);
 }
-
-VDebug &operator<<(VDebug &os, const VRegion &o)
-{
-    os << "[REGION: "
-       << "[bbox = " << o.boundingRect() << "]";
-    os << "[rectCount = " << o.rectCount() << "]";
-    os << "[rects = ";
-    for (int i = 0; i < o.rectCount(); i++) {
-        os << o.rectAt(i);
-    }
-    os << "]"
-       << "]";
-    return os;
-}
-
 V_END_NAMESPACE