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
Loading
Please register or sign in to comment