am 81384bf9: don\'t emit GL commands when sf is in freeze mode
Merge commit '81384bf927c47a4efa653b14273084a13e67e3ac' into eclair-plus-aosp * commit '81384bf927c47a4efa653b14273084a13e67e3ac': don't emit GL commands when sf is in freeze mode
This commit is contained in:
@@ -491,7 +491,7 @@ bool SurfaceFlinger::threadLoop()
|
|||||||
handlePageFlip();
|
handlePageFlip();
|
||||||
|
|
||||||
const DisplayHardware& hw(graphicPlane(0).displayHardware());
|
const DisplayHardware& hw(graphicPlane(0).displayHardware());
|
||||||
if (LIKELY(hw.canDraw())) {
|
if (LIKELY(hw.canDraw() && !isFrozen())) {
|
||||||
// repaint the framebuffer (if needed)
|
// repaint the framebuffer (if needed)
|
||||||
handleRepaint();
|
handleRepaint();
|
||||||
|
|
||||||
@@ -512,14 +512,6 @@ bool SurfaceFlinger::threadLoop()
|
|||||||
|
|
||||||
void SurfaceFlinger::postFramebuffer()
|
void SurfaceFlinger::postFramebuffer()
|
||||||
{
|
{
|
||||||
if (isFrozen()) {
|
|
||||||
// we are not allowed to draw, but pause a bit to make sure
|
|
||||||
// apps don't end up using the whole CPU, if they depend on
|
|
||||||
// surfaceflinger for synchronization.
|
|
||||||
usleep(8333); // 8.3ms ~ 120fps
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mInvalidRegion.isEmpty()) {
|
if (!mInvalidRegion.isEmpty()) {
|
||||||
const DisplayHardware& hw(graphicPlane(0).displayHardware());
|
const DisplayHardware& hw(graphicPlane(0).displayHardware());
|
||||||
const nsecs_t now = systemTime();
|
const nsecs_t now = systemTime();
|
||||||
|
|||||||
Reference in New Issue
Block a user