From 9779b221e999583ff89e0dfc40e56398737adbb3 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 7 Sep 2009 16:32:45 -0700 Subject: fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properly Rewrote SurfaceFlinger's buffer management from the ground-up. The design now support an arbitrary number of buffers per surface, however the current implementation is limited to four. Currently only 2 buffers are used in practice. The main new feature is to be able to dequeue all buffers at once (very important when there are only two). A client can dequeue all buffers until there are none available, it can lock all buffers except the last one that is used for composition. The client will block then, until a new buffer is enqueued. The current implementation requires that buffers are locked in the same order they are dequeued and enqueued in the same order they are locked. Only one buffer can be locked at a time. eg. Allowed sequence: DQ, DQ, LOCK, Q, LOCK, Q eg. Forbidden sequence: DQ, DQ, LOCK, LOCK, Q, Q --- libs/surfaceflinger/LayerDim.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'libs/surfaceflinger/LayerDim.cpp') diff --git a/libs/surfaceflinger/LayerDim.cpp b/libs/surfaceflinger/LayerDim.cpp index f613767de8d5..8ba0a9d0da46 100644 --- a/libs/surfaceflinger/LayerDim.cpp +++ b/libs/surfaceflinger/LayerDim.cpp @@ -21,6 +21,7 @@ #include #include +#include "Buffer.h" #include "BufferAllocator.h" #include "LayerDim.h" #include "SurfaceFlinger.h" -- cgit v1.2.3-59-g8ed1b