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/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index b27344d..0aa0dfb 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -774,11 +774,11 @@
return getComposer()->isUsingVrComposer();
}
-void HWComposer::dump(String8& result) const {
+void HWComposer::dump(std::string& result) const {
// TODO: In order to provide a dump equivalent to HWC1, we need to shadow
// all the state going into the layers. This is probably better done in
// Layer itself, but it's going to take a bit of work to get there.
- result.append(mHwcDevice->dump().c_str());
+ result.append(mHwcDevice->dump());
}
std::optional<DisplayId> HWComposer::toPhysicalDisplayId(hwc2_display_t hwcDisplayId) const {
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h
index 3f1328e..aaa6e8c 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.h
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.h
@@ -37,7 +37,6 @@
namespace android {
class GraphicBuffer;
-class String8;
class TestableSurfaceFlinger;
struct CompositionInfo;
@@ -161,7 +160,7 @@
bool isUsingVrComposer() const;
// for debugging ----------------------------------------------------------
- void dump(String8& out) const;
+ void dump(std::string& out) const;
Hwc2::Composer* getComposer() const { return mHwcDevice->getComposer(); }