Commit 8ea247e9 by Nicolas Capens

Fix not canceling an already queued graphics buffer.

cancelBuffer() returns a graphics buffer to the buffer queue but doesn't pass it on to the consumer side. There's currently no reason for us to call it when the EGL surface gets destroyed or resized, since we only briefly dequeue the buffer to blit the already rendered result and immediately queue it again. Even if the queuing fails, we shouldn't try to cancel the buffer because that's essentially the same as a queueing but without valid content. It would fail with the same error, or worse, transfer ownership twice and mess up the reference counting. Bug b/34981145 Change-Id: Ia37a711db5ebd61bcde14cf4bc45097d4e2d33e8 Reviewed-on: https://swiftshader-review.googlesource.com/8814Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarGreg Hartman <ghartman@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarGreg Hartman <ghartman@google.com>
parent b7afead1
...@@ -59,13 +59,6 @@ namespace sw ...@@ -59,13 +59,6 @@ namespace sw
FrameBufferAndroid::~FrameBufferAndroid() FrameBufferAndroid::~FrameBufferAndroid()
{ {
if(buffer)
{
// Probably doesn't have to cancel assuming a success queueing earlier
cancelBuffer(nativeWindow, buffer, -1);
buffer = nullptr;
}
nativeWindow->common.decRef(&nativeWindow->common); nativeWindow->common.decRef(&nativeWindow->common);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment