diff options
author | 2018-12-05 18:06:32 -0800 | |
---|---|---|
committer | 2018-12-05 23:50:03 -0800 | |
commit | 5434a781d70df56cef2ecf6cbc9d6c7b8faf1ae8 (patch) | |
tree | 8c75c8ddecb1f95d385b39666c4bca7d76021edf /libs/ui/Region.cpp | |
parent | 161410bcb27ac5203b802d34a1c836e490aeb2f7 (diff) |
SurfaceFlinger: Get rid of String8 in dumpsys
Test: build and gui/ui/renderengine/surfaceflinger tests and compare
dumpsys SurfaceFlinger results
Change-Id: Iafdaf73a0acbbbb8fbafc930ad86285106a07e13
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; } } |