Loading services/surfaceflinger/BufferLayer.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -613,6 +613,11 @@ void BufferLayer::setPerFrameData(const sp<const DisplayDevice>& display) { const auto& viewport = display->getViewport(); Region visible = tr.transform(visibleRegion.intersect(viewport)); const auto displayId = display->getId(); if (!hasHwcLayer(displayId)) { ALOGE("[%s] failed to setPerFrameData: no HWC layer found (%d)", mName.string(), displayId); return; } auto& hwcInfo = getBE().mHwcLayers[displayId]; auto& hwcLayer = hwcInfo.layer; auto error = hwcLayer->setVisibleRegion(visible); Loading Loading @@ -667,8 +672,7 @@ void BufferLayer::setPerFrameData(const sp<const DisplayDevice>& display) { uint32_t hwcSlot = 0; sp<GraphicBuffer> hwcBuffer; getBE().mHwcLayers[displayId].bufferCache.getHwcBuffer(mActiveBufferSlot, mActiveBuffer, &hwcSlot, &hwcBuffer); hwcInfo.bufferCache.getHwcBuffer(mActiveBufferSlot, mActiveBuffer, &hwcSlot, &hwcBuffer); auto acquireFence = mConsumer->getCurrentFence(); error = hwcLayer->setBuffer(hwcSlot, hwcBuffer, acquireFence); Loading services/surfaceflinger/ColorLayer.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,11 @@ void ColorLayer::setPerFrameData(const sp<const DisplayDevice>& display) { const auto& viewport = display->getViewport(); Region visible = tr.transform(visibleRegion.intersect(viewport)); const auto displayId = display->getId(); if (!hasHwcLayer(displayId)) { ALOGE("[%s] failed to setPerFrameData: no HWC layer found (%d)", mName.string(), displayId); return; } auto& hwcInfo = getBE().mHwcLayers[displayId]; auto& hwcLayer = hwcInfo.layer; auto error = hwcLayer->setVisibleRegion(visible); Loading services/surfaceflinger/Layer.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -482,6 +482,11 @@ FloatRect Layer::computeCrop(const sp<const DisplayDevice>& hw) const { void Layer::setGeometry(const sp<const DisplayDevice>& display, uint32_t z) { const auto displayId = display->getId(); if (!hasHwcLayer(displayId)) { ALOGE("[%s] failed to setGeometry: no HWC layer found (%d)", mName.string(), displayId); return; } auto& hwcInfo = getBE().mHwcLayers[displayId]; // enable this layer Loading Loading @@ -1980,6 +1985,10 @@ void Layer::writeToProto(LayerProto* layerInfo, LayerVector::StateSet stateSet) } void Layer::writeToProto(LayerProto* layerInfo, int32_t displayId) { if (!hasHwcLayer(displayId)) { return; } writeToProto(layerInfo, LayerVector::StateSet::Drawing); const auto& hwcInfo = getBE().mHwcLayers.at(displayId); Loading Loading
services/surfaceflinger/BufferLayer.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -613,6 +613,11 @@ void BufferLayer::setPerFrameData(const sp<const DisplayDevice>& display) { const auto& viewport = display->getViewport(); Region visible = tr.transform(visibleRegion.intersect(viewport)); const auto displayId = display->getId(); if (!hasHwcLayer(displayId)) { ALOGE("[%s] failed to setPerFrameData: no HWC layer found (%d)", mName.string(), displayId); return; } auto& hwcInfo = getBE().mHwcLayers[displayId]; auto& hwcLayer = hwcInfo.layer; auto error = hwcLayer->setVisibleRegion(visible); Loading Loading @@ -667,8 +672,7 @@ void BufferLayer::setPerFrameData(const sp<const DisplayDevice>& display) { uint32_t hwcSlot = 0; sp<GraphicBuffer> hwcBuffer; getBE().mHwcLayers[displayId].bufferCache.getHwcBuffer(mActiveBufferSlot, mActiveBuffer, &hwcSlot, &hwcBuffer); hwcInfo.bufferCache.getHwcBuffer(mActiveBufferSlot, mActiveBuffer, &hwcSlot, &hwcBuffer); auto acquireFence = mConsumer->getCurrentFence(); error = hwcLayer->setBuffer(hwcSlot, hwcBuffer, acquireFence); Loading
services/surfaceflinger/ColorLayer.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,11 @@ void ColorLayer::setPerFrameData(const sp<const DisplayDevice>& display) { const auto& viewport = display->getViewport(); Region visible = tr.transform(visibleRegion.intersect(viewport)); const auto displayId = display->getId(); if (!hasHwcLayer(displayId)) { ALOGE("[%s] failed to setPerFrameData: no HWC layer found (%d)", mName.string(), displayId); return; } auto& hwcInfo = getBE().mHwcLayers[displayId]; auto& hwcLayer = hwcInfo.layer; auto error = hwcLayer->setVisibleRegion(visible); Loading
services/surfaceflinger/Layer.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -482,6 +482,11 @@ FloatRect Layer::computeCrop(const sp<const DisplayDevice>& hw) const { void Layer::setGeometry(const sp<const DisplayDevice>& display, uint32_t z) { const auto displayId = display->getId(); if (!hasHwcLayer(displayId)) { ALOGE("[%s] failed to setGeometry: no HWC layer found (%d)", mName.string(), displayId); return; } auto& hwcInfo = getBE().mHwcLayers[displayId]; // enable this layer Loading Loading @@ -1980,6 +1985,10 @@ void Layer::writeToProto(LayerProto* layerInfo, LayerVector::StateSet stateSet) } void Layer::writeToProto(LayerProto* layerInfo, int32_t displayId) { if (!hasHwcLayer(displayId)) { return; } writeToProto(layerInfo, LayerVector::StateSet::Drawing); const auto& hwcInfo = getBE().mHwcLayers.at(displayId); Loading