egl/android: Remove our own reference to buffers.

We currently doesn't maintain it correctly and the buffer gets leaked if
surface is destroyed before calling swapping buffers.

From Android frameworks/native/libs/nativewindow/include/system/window.h:

  The window holds a reference to the buffer between dequeueBuffer and
  either queueBuffer or cancelBuffer, so clients only need their own
  reference if they might use the buffer after queueing or canceling it.

v2: Remove our own reference.

Fixes: 0212db35 ("egl/android: Cancel any outstanding ANativeBuffer in surface destructor")

Reviewed-by: Chia-I Wu <> (v1)
Reviewed-By: Tapani Pälli <>
Signed-off-by: Lepton Wu <>
49 jobs for !2013 with aleak in 44 minutes and 12 seconds (queued for 5 seconds)
merge request