Add flag for mapping buffer in native surface 20/258720/4
authorSunghyun Kim <scholb.kim@samsung.com>
Tue, 25 May 2021 01:33:54 +0000 (10:33 +0900)
committerSunghyun Kim <scholb.kim@samsung.com>
Wed, 26 May 2021 01:22:37 +0000 (10:22 +0900)
If application want to write to the buffer,
it has to use TBM_SURF_OPTION_WRITE flag.
so i added this flag in AcquireBuffer().

Change-Id: I376d61d85a779d1dc2c4aeac7779151a3e24fd4c

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

index 1e455d5..41618eb 100644 (file)
@@ -508,7 +508,7 @@ uint8_t* NativeImageSourceTizen::AcquireBuffer(uint16_t& width, uint16_t& height
   {
     tbm_surface_info_s info;
 
-    if(tbm_surface_map(mTbmSurface, TBM_SURF_OPTION_READ, &info) != TBM_SURFACE_ERROR_NONE)
+    if(tbm_surface_map(mTbmSurface, TBM_SURF_OPTION_READ | TBM_SURF_OPTION_WRITE, &info) != TBM_SURFACE_ERROR_NONE)
     {
       DALI_LOG_ERROR("Fail to map tbm_surface\n");