diff options
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 12 |
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); } } |