OSDN Git Service

Provide HWC prepare with a valid output buffer
authorJesse Hall <jessehall@google.com>
Tue, 20 Aug 2013 23:35:32 +0000 (16:35 -0700)
committerJesse Hall <jessehall@google.com>
Tue, 20 Aug 2013 23:35:32 +0000 (16:35 -0700)
commit028dc8f2d72bc7cd4fbe7808781443125a742f78
treeb0e255599a9034e1981971dd13ec03b49c9a30a0
parent353ddc6e77816352107537c215dc8302f6e8587a
Provide HWC prepare with a valid output buffer

We weren't dequeing and setting the output buffer until just before
set(). This didn't allow HWC to make decisions in prepare() based on
the output buffer format, dimensions, etc.

Now we dequeue the output buffer at the beginning of the composition
loop and provide it to HWC in prepare. In GLES-only rendering, we may
have to cancel the buffer and acquire a new one if GLES requests a
buffer with properties different than the one we already dequeued.

Bug: 10365313
Change-Id: I96b4b0a851920e4334ef05080d58097d46467ab8
services/surfaceflinger/DisplayDevice.cpp
services/surfaceflinger/DisplayDevice.h
services/surfaceflinger/DisplayHardware/DisplaySurface.h
services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
services/surfaceflinger/DisplayHardware/FramebufferSurface.h
services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
services/surfaceflinger/SurfaceFlinger.cpp