From bcf67554619fa2568055ee94e7fe3ee30dc10329 Mon Sep 17 00:00:00 2001 From: "huiyu.eun" Date: Thu, 25 Apr 2019 11:27:47 +0900 Subject: [PATCH] Revert "[Non-ACR][NUI] Fix PixelData crash issue" This reverts commit 426105965cee8270fed05b9da180699b36cf0ec8. Change-Id: I637d4a66671e5d966698401a2bce31dbe35800f1 --- tct-suite-vs/Tizen.NUI.Tests/testcase/TSTexture.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTexture.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTexture.cs index 990b0917d..5303b6f41 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTexture.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTexture.cs @@ -110,7 +110,8 @@ namespace Tizen.NUI.Tests uint height = 64; Texture texture = new Texture(TextureType.TEXTURE_2D, PixelFormat.RGBA8888, width, height); uint bufferSize = width * height * 4; - PixelData pixelData = new PixelData(null, bufferSize, width, height, PixelFormat.RGBA8888, PixelData.ReleaseFunction.Free); + byte[] buffer = new byte[bufferSize]; + PixelData pixelData = new PixelData(buffer, bufferSize, width, height, PixelFormat.RGBA8888, PixelData.ReleaseFunction.Free); texture.Upload(pixelData); } catch (Exception e) @@ -138,7 +139,8 @@ namespace Tizen.NUI.Tests uint height = 64; Texture texture = new Texture(TextureType.TEXTURE_2D, PixelFormat.RGBA8888, width, height); uint bufferSize = width * height * 2; - PixelData pixelData = new PixelData(null, bufferSize, width, height, PixelFormat.RGBA8888, PixelData.ReleaseFunction.Free); + byte[] buffer = new byte[bufferSize]; + PixelData pixelData = new PixelData(buffer, bufferSize, width, height, PixelFormat.RGBA8888, PixelData.ReleaseFunction.Free); texture.Upload(pixelData, 0u, 0u, width / 2, height / 2, width / 2, height / 2); } catch (Exception e) -- 2.34.1