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

Commit 77088579 authored by Patrick Williams's avatar Patrick Williams Committed by Android (Google) Code Review
Browse files

Merge "SF: log fatal if layer destroyed off main thread"

parents 207aa487 70093fd5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -216,6 +216,9 @@ void Layer::onFirstRef() {
}

Layer::~Layer() {
    LOG_ALWAYS_FATAL_IF(std::this_thread::get_id() != mFlinger->mMainThreadId,
                        "Layer destructor called off the main thread.");

    // The original layer and the clone layer share the same texture and buffer. Therefore, only
    // one of the layers, in this case the original layer, needs to handle the deletion. The
    // original layer and the clone should be removed at the same time so there shouldn't be any