Add mutex to NativeImageSourceImpl 92/277692/1
authorHeeyong Song <heeyong.song@samsung.com>
Tue, 12 Jul 2022 07:07:19 +0000 (16:07 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Tue, 12 Jul 2022 07:07:19 +0000 (16:07 +0900)
Change-Id: I86c6c5906832f314622d79071c40741553034130

dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp

index f8e8f7c..153848f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@ namespace Adaptor
 {
 namespace
 {
-const char* SAMPLER_TYPE    = "samplerExternalOES";
+const char* SAMPLER_TYPE = "samplerExternalOES";
 
 // clang-format off
 tbm_format FORMATS_BLENDING_REQUIRED[] = {
@@ -556,6 +556,7 @@ bool NativeImageSourceTizen::ReleaseBuffer()
 
 void NativeImageSourceTizen::SetResourceDestructionCallback(EventThreadCallback* callback)
 {
+  Dali::Mutex::ScopedLock lock(mMutex);
   mResourceDestructionCallback = std::unique_ptr<EventThreadCallback>(callback);
 }