summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2015-01-21 16:39:22 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-01-21 16:39:22 +0000
commit4ecf6ec932644b680d5e13791275dd3bc1a1ee6d (patch)
tree15f54c357a2c6b020c9ebe800267246460cc9317
parent8f3ade0c9ab52a1e4f13d6ff1922dd98e3ccdbcc (diff)
parentfe4966d59b31ae6fd6dd4d81dd73d2f4f7be33fe (diff)
downloadframeworks_native-4ecf6ec932644b680d5e13791275dd3bc1a1ee6d.zip
frameworks_native-4ecf6ec932644b680d5e13791275dd3bc1a1ee6d.tar.gz
frameworks_native-4ecf6ec932644b680d5e13791275dd3bc1a1ee6d.tar.bz2
Merge "Restore Region::set(uint32_t, uint32_t)"
-rw-r--r--include/ui/Region.h1
-rw-r--r--libs/ui/Region.cpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/ui/Region.h b/include/ui/Region.h
index 873cd34..49740f7 100644
--- a/include/ui/Region.h
+++ b/include/ui/Region.h
@@ -59,6 +59,7 @@ public:
void clear();
void set(const Rect& r);
void set(int32_t w, int32_t h);
+ void set(uint32_t w, uint32_t h);
Region& orSelf(const Rect& rhs);
Region& xorSelf(const Rect& rhs);
diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp
index 06ab3d0..91fa216 100644
--- a/libs/ui/Region.cpp
+++ b/libs/ui/Region.cpp
@@ -260,6 +260,12 @@ void Region::set(int32_t w, int32_t h)
mStorage.add(Rect(w, h));
}
+void Region::set(uint32_t w, uint32_t h)
+{
+ mStorage.clear();
+ mStorage.add(Rect(w, h));
+}
+
bool Region::isTriviallyEqual(const Region& region) const {
return begin() == region.begin();
}