am b7a5b05b: Fix missing recents screenshots

* commit 'b7a5b05b53b81cb24849c7e9934c941f64e05a42':
  Fix missing recents screenshots
This commit is contained in:
Mathias Agopian 2013-03-12 03:52:42 +00:00 committed by Android Git Automerger
commit 815721f6ab

View File

@ -2708,17 +2708,19 @@ 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 (state.z >= minLayerZ && state.z <= maxLayerZ) {
if (filtering) layer->setFiltering(true); if (filtering) layer->setFiltering(true);
layer->draw(hw); layer->draw(hw);
if (filtering) layer->setFiltering(false); if (filtering) layer->setFiltering(false);
} }
} }
}
// compositionComplete is needed for older driver // compositionComplete is needed for older driver
hw->compositionComplete(); hw->compositionComplete();