OSDN Git Service

BufferQueue: Add allocateBuffers method
authorDan Stoza <stoza@google.com>
Fri, 20 Jun 2014 20:13:57 +0000 (13:13 -0700)
committerDan Stoza <stoza@google.com>
Fri, 20 Jun 2014 20:13:57 +0000 (13:13 -0700)
commit29a3e90879fd96404c971e7187cd0e05927bbce0
tree024503f644be306ea3eb99e14b8847d454bdbf51
parenta317f27b7bf49e2e7b2b443223c07fb8c7c3ac3f
BufferQueue: Add allocateBuffers method

This adds an allocateBuffers method to BufferQueue, which instructs
it to allocate up to the maximum number of buffers allowed by the
current configuration. The goal is that this method can be called
ahead of render time, which will prevent dequeueBuffers from blocking
in allocation and inducing jank.

This interface is also plumbed up to the native Surface (and, in
another change, up to the Java Surface and ThreadedRenderer).

Bug: 11792166
Change-Id: I4aa96b4351ea1c95ed5db228ca3ef98303229c74
include/gui/BufferQueueProducer.h
include/gui/IGraphicBufferProducer.h
include/gui/Surface.h
libs/gui/BufferQueueProducer.cpp
libs/gui/IGraphicBufferProducer.cpp
libs/gui/Surface.cpp
services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
services/surfaceflinger/MonitoredProducer.cpp
services/surfaceflinger/MonitoredProducer.h