SurfaceFlinger: Get rid of String8 in dumpsys
Test: build and gui/ui/renderengine/surfaceflinger tests and compare
dumpsys SurfaceFlinger results
Change-Id: Iafdaf73a0acbbbb8fbafc930ad86285106a07e13
diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp
index 618c7d6..3bd3748 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 @@
// ----------------------------------------------------------------------------
-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;
}
}