Loading services/surfaceflinger/Layer.cpp +11 −4 Original line number Diff line number Diff line Loading @@ -2195,7 +2195,7 @@ void Layer::setInputInfo(const InputWindowInfo& info) { } LayerProto* Layer::writeToProto(LayersProto& layersProto, uint32_t traceFlags, const DisplayDevice* display) const { const DisplayDevice* display) { LayerProto* layerProto = layersProto.add_layers(); writeToProtoDrawingState(layerProto, traceFlags, display); writeToProtoCommonState(layerProto, LayerVector::StateSet::Drawing, traceFlags); Loading @@ -2216,7 +2216,7 @@ LayerProto* Layer::writeToProto(LayersProto& layersProto, uint32_t traceFlags, } void Layer::writeToProtoDrawingState(LayerProto* layerInfo, uint32_t traceFlags, const DisplayDevice* display) const { const DisplayDevice* display) { ui::Transform transform = getTransform(); if (traceFlags & SurfaceTracing::TRACE_CRITICAL) { Loading Loading @@ -2273,7 +2273,7 @@ void Layer::writeToProtoDrawingState(LayerProto* layerInfo, uint32_t traceFlags, } void Layer::writeToProtoCommonState(LayerProto* layerInfo, LayerVector::StateSet stateSet, uint32_t traceFlags) const { uint32_t traceFlags) { const bool useDrawing = stateSet == LayerVector::StateSet::Drawing; const LayerVector& children = useDrawing ? mDrawingChildren : mCurrentChildren; const State& state = useDrawing ? mDrawingState : mCurrentState; Loading Loading @@ -2343,7 +2343,14 @@ void Layer::writeToProtoCommonState(LayerProto* layerInfo, LayerVector::StateSet } if (traceFlags & SurfaceTracing::TRACE_INPUT) { LayerProtoHelper::writeToProto(state.inputInfo, state.touchableRegionCrop, InputWindowInfo info; if (useDrawing) { info = fillInputInfo(); } else { info = state.inputInfo; } LayerProtoHelper::writeToProto(info, state.touchableRegionCrop, [&]() { return layerInfo->mutable_input_window_info(); }); } Loading services/surfaceflinger/Layer.h +3 −5 Original line number Diff line number Diff line Loading @@ -528,19 +528,17 @@ public: bool isRemovedFromCurrentState() const; LayerProto* writeToProto(LayersProto& layersProto, uint32_t traceFlags, const DisplayDevice*) const; LayerProto* writeToProto(LayersProto& layersProto, uint32_t traceFlags, const DisplayDevice*); // Write states that are modified by the main thread. This includes drawing // state as well as buffer data. This should be called in the main or tracing // thread. void writeToProtoDrawingState(LayerProto* layerInfo, uint32_t traceFlags, const DisplayDevice*) const; void writeToProtoDrawingState(LayerProto* layerInfo, uint32_t traceFlags, const DisplayDevice*); // Write drawing or current state. If writing current state, the caller should hold the // external mStateLock. If writing drawing state, this function should be called on the // main or tracing thread. void writeToProtoCommonState(LayerProto* layerInfo, LayerVector::StateSet stateSet, uint32_t traceFlags = SurfaceTracing::TRACE_ALL) const; uint32_t traceFlags = SurfaceTracing::TRACE_ALL); virtual Geometry getActiveGeometry(const Layer::State& s) const { return s.active_legacy; } virtual uint32_t getActiveWidth(const Layer::State& s) const { return s.active_legacy.w; } Loading Loading
services/surfaceflinger/Layer.cpp +11 −4 Original line number Diff line number Diff line Loading @@ -2195,7 +2195,7 @@ void Layer::setInputInfo(const InputWindowInfo& info) { } LayerProto* Layer::writeToProto(LayersProto& layersProto, uint32_t traceFlags, const DisplayDevice* display) const { const DisplayDevice* display) { LayerProto* layerProto = layersProto.add_layers(); writeToProtoDrawingState(layerProto, traceFlags, display); writeToProtoCommonState(layerProto, LayerVector::StateSet::Drawing, traceFlags); Loading @@ -2216,7 +2216,7 @@ LayerProto* Layer::writeToProto(LayersProto& layersProto, uint32_t traceFlags, } void Layer::writeToProtoDrawingState(LayerProto* layerInfo, uint32_t traceFlags, const DisplayDevice* display) const { const DisplayDevice* display) { ui::Transform transform = getTransform(); if (traceFlags & SurfaceTracing::TRACE_CRITICAL) { Loading Loading @@ -2273,7 +2273,7 @@ void Layer::writeToProtoDrawingState(LayerProto* layerInfo, uint32_t traceFlags, } void Layer::writeToProtoCommonState(LayerProto* layerInfo, LayerVector::StateSet stateSet, uint32_t traceFlags) const { uint32_t traceFlags) { const bool useDrawing = stateSet == LayerVector::StateSet::Drawing; const LayerVector& children = useDrawing ? mDrawingChildren : mCurrentChildren; const State& state = useDrawing ? mDrawingState : mCurrentState; Loading Loading @@ -2343,7 +2343,14 @@ void Layer::writeToProtoCommonState(LayerProto* layerInfo, LayerVector::StateSet } if (traceFlags & SurfaceTracing::TRACE_INPUT) { LayerProtoHelper::writeToProto(state.inputInfo, state.touchableRegionCrop, InputWindowInfo info; if (useDrawing) { info = fillInputInfo(); } else { info = state.inputInfo; } LayerProtoHelper::writeToProto(info, state.touchableRegionCrop, [&]() { return layerInfo->mutable_input_window_info(); }); } Loading
services/surfaceflinger/Layer.h +3 −5 Original line number Diff line number Diff line Loading @@ -528,19 +528,17 @@ public: bool isRemovedFromCurrentState() const; LayerProto* writeToProto(LayersProto& layersProto, uint32_t traceFlags, const DisplayDevice*) const; LayerProto* writeToProto(LayersProto& layersProto, uint32_t traceFlags, const DisplayDevice*); // Write states that are modified by the main thread. This includes drawing // state as well as buffer data. This should be called in the main or tracing // thread. void writeToProtoDrawingState(LayerProto* layerInfo, uint32_t traceFlags, const DisplayDevice*) const; void writeToProtoDrawingState(LayerProto* layerInfo, uint32_t traceFlags, const DisplayDevice*); // Write drawing or current state. If writing current state, the caller should hold the // external mStateLock. If writing drawing state, this function should be called on the // main or tracing thread. void writeToProtoCommonState(LayerProto* layerInfo, LayerVector::StateSet stateSet, uint32_t traceFlags = SurfaceTracing::TRACE_ALL) const; uint32_t traceFlags = SurfaceTracing::TRACE_ALL); virtual Geometry getActiveGeometry(const Layer::State& s) const { return s.active_legacy; } virtual uint32_t getActiveWidth(const Layer::State& s) const { return s.active_legacy.w; } Loading