diff options
author | 2016-10-03 16:24:26 -0700 | |
---|---|---|
committer | 2016-10-04 12:57:38 -0700 | |
commit | 3b8e6b2f30af0564538c2a660033d6a97ab8038f (patch) | |
tree | 24513f55fef74732248dd0402e9ff03658658fd4 /libs/gui/ConsumerBase.cpp | |
parent | 3169437feb387b56499208464960d281bd9b87c9 (diff) |
Eliminate unnecessary calls to onBufferReleased
This change adds a callback to ProducerListener to indicate whether the
listener needs the 'onBufferReleased' notification. This allows us to
avoid making that binder call unnecessarily, saving ~170us per frame on
Android Wear.
By default the new callback returns true, so behavior for existing
clients should be unchanged. Only the DummyProducerListener returns
false.
Also note that it would be simpler to just pass NULL for the
ProducerListener if not for that fact that we still need it for death
notification.
Bug: b/31122630
Change-Id: I730834218a055d89e89f876dd77da8127eb78000
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
0 files changed, 0 insertions, 0 deletions