OSDN Git Service

surfaceflinger: skip composition for empty frames
authorJesse Hall <jessehall@google.com>
Thu, 14 Aug 2014 22:45:06 +0000 (15:45 -0700)
committerJesse Hall <jessehall@google.com>
Wed, 20 Aug 2014 05:15:43 +0000 (22:15 -0700)
commitb7a0549c983bef103ce07eb3af5905febc6e538e
tree1aacaf9b71a57800fc358fb4f120e3dd4452ac71
parente3d37a7b55f86f5d005dd67f828dcf51fe60c0f6
surfaceflinger: skip composition for empty frames

By not committing the results of composition for empty frames, we
avoid spitting out series of black frames for virtual displays that
don't have visible layers. We still draw one black frame when going
from having layers to not having any. In particular, this avoids
having a series of empty frames due to re-compositing the primary
display in the period between creating the virtual display and adding
layers to it.

Bug: 16786752
Change-Id: I7e9b2ed2e407d8d49c7af736b447d4c6181b0ad8
services/surfaceflinger/DisplayDevice.cpp
services/surfaceflinger/DisplayDevice.h
services/surfaceflinger/SurfaceFlinger.cpp