diff options
Diffstat (limited to 'libs/ui/Region.cpp')
-rw-r--r-- | libs/ui/Region.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp index 618c7d62b1..3bd3748439 100644 --- a/libs/ui/Region.cpp +++ b/libs/ui/Region.cpp @@ -19,8 +19,9 @@ #include <inttypes.h> #include <limits.h> +#include <android-base/stringprintf.h> + #include <utils/Log.h> -#include <utils/String8.h> #include <utils/CallStack.h> #include <ui/Rect.h> @@ -41,6 +42,8 @@ namespace android { // ---------------------------------------------------------------------------- +using base::StringAppendF; + enum { op_nand = region_operator<Rect>::op_nand, op_and = region_operator<Rect>::op_and, @@ -868,16 +871,14 @@ Rect const* Region::getArray(size_t* count) const { // ---------------------------------------------------------------------------- -void Region::dump(String8& out, const char* what, uint32_t /* flags */) const -{ +void Region::dump(std::string& out, const char* what, uint32_t /* flags */) const { const_iterator head = begin(); const_iterator const tail = end(); - out.appendFormat(" Region %s (this=%p, count=%" PRIdPTR ")\n", - what, this, tail - head); + StringAppendF(&out, " Region %s (this=%p, count=%" PRIdPTR ")\n", what, this, tail - head); while (head != tail) { - out.appendFormat(" [%3d, %3d, %3d, %3d]\n", head->left, head->top, - head->right, head->bottom); + StringAppendF(&out, " [%3d, %3d, %3d, %3d]\n", head->left, head->top, head->right, + head->bottom); ++head; } } |