Fix missing recents screenshots
We were using the "visible layer list" when taking screenshots, which doesn't work when a layer is behind other opaque layers and therefore hidden. We fix this by using the full layer list, filtered by the layerstack of the display we're looking at. Bug: 7552304 Change-Id: I4b6f77e5511aea94f8d218975b6e22738e7e5d5b
This commit is contained in:
parent
2aee1b01b7
commit
b7a5b05b53
@ -2708,15 +2708,17 @@ status_t SurfaceFlinger::captureScreenImplLocked(
|
|||||||
glClearColor(0,0,0,1);
|
glClearColor(0,0,0,1);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
const Vector< sp<Layer> >& layers(hw->getVisibleLayersSortedByZ());
|
const LayerVector& layers( mDrawingState.layersSortedByZ );
|
||||||
const size_t count = layers.size();
|
const size_t count = layers.size();
|
||||||
for (size_t i=0 ; i<count ; ++i) {
|
for (size_t i=0 ; i<count ; ++i) {
|
||||||
const sp<Layer>& layer(layers[i]);
|
const sp<Layer>& layer(layers[i]);
|
||||||
const uint32_t z = layer->drawingState().z;
|
const Layer::State& state(layer->drawingState());
|
||||||
if (z >= minLayerZ && z <= maxLayerZ) {
|
if (state.layerStack == hw->getLayerStack()) {
|
||||||
if (filtering) layer->setFiltering(true);
|
if (state.z >= minLayerZ && state.z <= maxLayerZ) {
|
||||||
layer->draw(hw);
|
if (filtering) layer->setFiltering(true);
|
||||||
if (filtering) layer->setFiltering(false);
|
layer->draw(hw);
|
||||||
|
if (filtering) layer->setFiltering(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user