Merge "don't clear the framebuffer when the framebuffer is not used" into ics-factoryrom
This commit is contained in:
committed by
Android (Google) Code Review
commit
a2a3f1e7e6
@@ -986,19 +986,20 @@ void SurfaceFlinger::setupHardwareComposer(Region& dirtyInOut)
|
|||||||
|
|
||||||
void SurfaceFlinger::composeSurfaces(const Region& dirty)
|
void SurfaceFlinger::composeSurfaces(const Region& dirty)
|
||||||
{
|
{
|
||||||
if (UNLIKELY(!mWormholeRegion.isEmpty())) {
|
const DisplayHardware& hw(graphicPlane(0).displayHardware());
|
||||||
|
HWComposer& hwc(hw.getHwComposer());
|
||||||
|
|
||||||
|
const size_t fbLayerCount = hwc.getLayerCount(HWC_FRAMEBUFFER);
|
||||||
|
if (UNLIKELY(fbLayerCount && !mWormholeRegion.isEmpty())) {
|
||||||
// should never happen unless the window manager has a bug
|
// should never happen unless the window manager has a bug
|
||||||
// draw something...
|
// draw something...
|
||||||
drawWormhole();
|
drawWormhole();
|
||||||
}
|
}
|
||||||
|
|
||||||
const DisplayHardware& hw(graphicPlane(0).displayHardware());
|
|
||||||
HWComposer& hwc(hw.getHwComposer());
|
|
||||||
hwc_layer_t* const cur(hwc.getLayers());
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* and then, render the layers targeted at the framebuffer
|
* and then, render the layers targeted at the framebuffer
|
||||||
*/
|
*/
|
||||||
|
hwc_layer_t* const cur(hwc.getLayers());
|
||||||
const Vector< sp<LayerBase> >& layers(mVisibleLayersSortedByZ);
|
const Vector< sp<LayerBase> >& layers(mVisibleLayersSortedByZ);
|
||||||
size_t count = layers.size();
|
size_t count = layers.size();
|
||||||
for (size_t i=0 ; i<count ; i++) {
|
for (size_t i=0 ; i<count ; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user