Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f29a96a0 authored by Corey Tabaka's avatar Corey Tabaka Committed by android-build-merger
Browse files

Merge "Fix concurrent access bug in VrFlinger." into oc-dr1-dev am: d90e5399

am: 4a20620e

Change-Id: I235b954716ed8f73d22391977b7ea6718f06a028
parents ebc8557f 4a20620e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -248,11 +248,12 @@ void ApplicationDisplaySurface::OnQueueEvent(
           "ApplicationDisplaySurface::OnQueueEvent: queue_id=%d events=%x",
           consumer_queue->id(), events);

  std::lock_guard<std::mutex> autolock(lock_);

  // Always give the queue a chance to handle its internal bookkeeping.
  consumer_queue->HandleQueueEvents();

  // Check for hangup and remove a queue that is no longer needed.
  std::lock_guard<std::mutex> autolock(lock_);
  if (consumer_queue->hung_up()) {
    ALOGD_IF(TRACE, "ApplicationDisplaySurface::OnQueueEvent: Removing queue.");
    UnregisterQueue(consumer_queue);
@@ -317,11 +318,12 @@ void DirectDisplaySurface::OnQueueEvent(
  ALOGD_IF(TRACE, "DirectDisplaySurface::OnQueueEvent: queue_id=%d events=%x",
           consumer_queue->id(), events);

  std::lock_guard<std::mutex> autolock(lock_);

  // Always give the queue a chance to handle its internal bookkeeping.
  consumer_queue->HandleQueueEvents();

  // Check for hangup and remove a queue that is no longer needed.
  std::lock_guard<std::mutex> autolock(lock_);
  if (consumer_queue->hung_up()) {
    ALOGD_IF(TRACE, "DirectDisplaySurface::OnQueueEvent: Removing queue.");
    UnregisterQueue(consumer_queue);