From 6158b1bf0364da1582468a98ec09d004ba99deec Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 11 May 2009 00:03:41 -0700 Subject: Region now has its own implementation instead of relying on SkRegion, which allows us to break libui's dependency on libcorecg. --- libs/ui/Surface.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libs/ui/Surface.cpp') diff --git a/libs/ui/Surface.cpp b/libs/ui/Surface.cpp index 6437619b20e2..6db30c3a2efc 100644 --- a/libs/ui/Surface.cpp +++ b/libs/ui/Surface.cpp @@ -125,15 +125,17 @@ static void copyBlt( uint8_t* dst_bits; dst->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, reg.bounds(), (void**)&dst_bits); - Region::iterator iterator(reg); - if (iterator) { + size_t c; + Rect const* const rects = reg.getArray(&c); + + if (c) { // NOTE: dst and src must be the same format - Rect r; const size_t bpp = bytesPerPixel(src->format); const size_t dbpr = dst->stride * bpp; const size_t sbpr = src->stride * bpp; - while (iterator.iterate(&r)) { + for (size_t i=0 ; i