better workaround for bug: 6020860
this prevents the GPU from running when composition is fully handled by overlays. this should improve animations a bit. Change-Id: If4ae584b7a3976e6bdd36e318686ac3940b6b075
This commit is contained in:
parent
9e0b1f880b
commit
4b2ba53423
|
@ -1013,18 +1013,29 @@ void SurfaceFlinger::composeSurfaces(const Region& dirty)
|
||||||
drawWormhole();
|
drawWormhole();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: workaroud for b/6020860
|
|
||||||
glEnable(GL_SCISSOR_TEST);
|
|
||||||
glScissor(0,0,0,0);
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
|
||||||
// end-workaround
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 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());
|
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();
|
||||||
|
|
||||||
|
|
||||||
|
// FIXME: workaround for b/6020860
|
||||||
|
if (hw.getFlags() & DisplayHardware::BUFFER_PRESERVED) {
|
||||||
|
for (size_t i=0 ; i<count ; i++) {
|
||||||
|
if (cur && (cur[i].compositionType == HWC_FRAMEBUFFER)) {
|
||||||
|
glEnable(GL_SCISSOR_TEST);
|
||||||
|
glScissor(0,0,0,0);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// FIXME: bug6020860 for b/6020860
|
||||||
|
|
||||||
|
|
||||||
for (size_t i=0 ; i<count ; i++) {
|
for (size_t i=0 ; i<count ; i++) {
|
||||||
if (cur && (cur[i].compositionType != HWC_FRAMEBUFFER)) {
|
if (cur && (cur[i].compositionType != HWC_FRAMEBUFFER)) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue