summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-03-02 22:40:51 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-03-02 22:40:51 +0000
commitd45b96e21fb7a628ee88a699016c76cfd77a752d (patch)
treeccb48ac5ae87bc71d689dc1aa02b65af1aaf9280 /services/surfaceflinger/SurfaceFlinger.cpp
parent44f05ea6c0083b064454355d9d3b6ca83da619b0 (diff)
parent6b9e9918b9b56f1d6bf3abbfba32ce661f1f97f6 (diff)
Merge "[SurfaceFlinger] Add hwc information to winscope:" into rvc-dev
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 1d00624199..c995db4972 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -4450,13 +4450,20 @@ void SurfaceFlinger::dumpWideColorInfo(std::string& result) const {
}
LayersProto SurfaceFlinger::dumpDrawingStateProto(uint32_t traceFlags) const {
+ Mutex::Autolock _l(mStateLock);
+ const auto device = getDefaultDisplayDeviceLocked();
LayersProto layersProto;
for (const sp<Layer>& layer : mDrawingState.layersSortedByZ) {
- layer->writeToProto(layersProto, traceFlags);
+ layer->writeToProto(layersProto, traceFlags, device);
}
+
return layersProto;
}
+void SurfaceFlinger::dumpHwc(std::string& result) const {
+ getHwComposer().dump(result);
+}
+
void SurfaceFlinger::dumpOffscreenLayersProto(LayersProto& layersProto, uint32_t traceFlags) const {
// Add a fake invisible root layer to the proto output and parent all the offscreen layers to
// it.
@@ -4471,7 +4478,8 @@ void SurfaceFlinger::dumpOffscreenLayersProto(LayersProto& layersProto, uint32_t
rootProto->add_children(offscreenLayer->sequence);
// Add layer
- LayerProto* layerProto = offscreenLayer->writeToProto(layersProto, traceFlags);
+ LayerProto* layerProto =
+ offscreenLayer->writeToProto(layersProto, traceFlags, nullptr /*device*/);
layerProto->set_parent(offscreenRootLayerId);
}
}