From 6bdfe0fc5c0845f91cf3ccad961d270ed2a49aa1 Mon Sep 17 00:00:00 2001 From: Yang Ni Date: Mon, 18 Apr 2016 16:56:16 -0700 Subject: Made Element accessors thread-safe Bug: 28177082 Change-Id: I8f3f2d8ce559e93cba29f8eedd5b95d1389deb23 (cherry picked from commit 33703f0c4e9b16bda5fd72e71d7d89359ee0db17) --- rs/java/android/renderscript/RenderScript.java | 182 ++++++++++++------------- 1 file changed, 91 insertions(+), 91 deletions(-) (limited to 'rs/java/android/renderscript/RenderScript.java') diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java index 2650e5a868d2..3d1370a52ae3 100644 --- a/rs/java/android/renderscript/RenderScript.java +++ b/rs/java/android/renderscript/RenderScript.java @@ -1037,97 +1037,97 @@ public class RenderScript { @SuppressWarnings({"FieldCanBeLocal"}) MessageThread mMessageThread; - Element mElement_U8; - Element mElement_I8; - Element mElement_U16; - Element mElement_I16; - Element mElement_U32; - Element mElement_I32; - Element mElement_U64; - Element mElement_I64; - Element mElement_F16; - Element mElement_F32; - Element mElement_F64; - Element mElement_BOOLEAN; - - Element mElement_ELEMENT; - Element mElement_TYPE; - Element mElement_ALLOCATION; - Element mElement_SAMPLER; - Element mElement_SCRIPT; - Element mElement_MESH; - Element mElement_PROGRAM_FRAGMENT; - Element mElement_PROGRAM_VERTEX; - Element mElement_PROGRAM_RASTER; - Element mElement_PROGRAM_STORE; - Element mElement_FONT; - - Element mElement_A_8; - Element mElement_RGB_565; - Element mElement_RGB_888; - Element mElement_RGBA_5551; - Element mElement_RGBA_4444; - Element mElement_RGBA_8888; - - Element mElement_HALF_2; - Element mElement_HALF_3; - Element mElement_HALF_4; - - Element mElement_FLOAT_2; - Element mElement_FLOAT_3; - Element mElement_FLOAT_4; - - Element mElement_DOUBLE_2; - Element mElement_DOUBLE_3; - Element mElement_DOUBLE_4; - - Element mElement_UCHAR_2; - Element mElement_UCHAR_3; - Element mElement_UCHAR_4; - - Element mElement_CHAR_2; - Element mElement_CHAR_3; - Element mElement_CHAR_4; - - Element mElement_USHORT_2; - Element mElement_USHORT_3; - Element mElement_USHORT_4; - - Element mElement_SHORT_2; - Element mElement_SHORT_3; - Element mElement_SHORT_4; - - Element mElement_UINT_2; - Element mElement_UINT_3; - Element mElement_UINT_4; - - Element mElement_INT_2; - Element mElement_INT_3; - Element mElement_INT_4; - - Element mElement_ULONG_2; - Element mElement_ULONG_3; - Element mElement_ULONG_4; - - Element mElement_LONG_2; - Element mElement_LONG_3; - Element mElement_LONG_4; - - Element mElement_YUV; - - Element mElement_MATRIX_4X4; - Element mElement_MATRIX_3X3; - Element mElement_MATRIX_2X2; - - Sampler mSampler_CLAMP_NEAREST; - Sampler mSampler_CLAMP_LINEAR; - Sampler mSampler_CLAMP_LINEAR_MIP_LINEAR; - Sampler mSampler_WRAP_NEAREST; - Sampler mSampler_WRAP_LINEAR; - Sampler mSampler_WRAP_LINEAR_MIP_LINEAR; - Sampler mSampler_MIRRORED_REPEAT_NEAREST; - Sampler mSampler_MIRRORED_REPEAT_LINEAR; - Sampler mSampler_MIRRORED_REPEAT_LINEAR_MIP_LINEAR; + volatile Element mElement_U8; + volatile Element mElement_I8; + volatile Element mElement_U16; + volatile Element mElement_I16; + volatile Element mElement_U32; + volatile Element mElement_I32; + volatile Element mElement_U64; + volatile Element mElement_I64; + volatile Element mElement_F16; + volatile Element mElement_F32; + volatile Element mElement_F64; + volatile Element mElement_BOOLEAN; + + volatile Element mElement_ELEMENT; + volatile Element mElement_TYPE; + volatile Element mElement_ALLOCATION; + volatile Element mElement_SAMPLER; + volatile Element mElement_SCRIPT; + volatile Element mElement_MESH; + volatile Element mElement_PROGRAM_FRAGMENT; + volatile Element mElement_PROGRAM_VERTEX; + volatile Element mElement_PROGRAM_RASTER; + volatile Element mElement_PROGRAM_STORE; + volatile Element mElement_FONT; + + volatile Element mElement_A_8; + volatile Element mElement_RGB_565; + volatile Element mElement_RGB_888; + volatile Element mElement_RGBA_5551; + volatile Element mElement_RGBA_4444; + volatile Element mElement_RGBA_8888; + + volatile Element mElement_HALF_2; + volatile Element mElement_HALF_3; + volatile Element mElement_HALF_4; + + volatile Element mElement_FLOAT_2; + volatile Element mElement_FLOAT_3; + volatile Element mElement_FLOAT_4; + + volatile Element mElement_DOUBLE_2; + volatile Element mElement_DOUBLE_3; + volatile Element mElement_DOUBLE_4; + + volatile Element mElement_UCHAR_2; + volatile Element mElement_UCHAR_3; + volatile Element mElement_UCHAR_4; + + volatile Element mElement_CHAR_2; + volatile Element mElement_CHAR_3; + volatile Element mElement_CHAR_4; + + volatile Element mElement_USHORT_2; + volatile Element mElement_USHORT_3; + volatile Element mElement_USHORT_4; + + volatile Element mElement_SHORT_2; + volatile Element mElement_SHORT_3; + volatile Element mElement_SHORT_4; + + volatile Element mElement_UINT_2; + volatile Element mElement_UINT_3; + volatile Element mElement_UINT_4; + + volatile Element mElement_INT_2; + volatile Element mElement_INT_3; + volatile Element mElement_INT_4; + + volatile Element mElement_ULONG_2; + volatile Element mElement_ULONG_3; + volatile Element mElement_ULONG_4; + + volatile Element mElement_LONG_2; + volatile Element mElement_LONG_3; + volatile Element mElement_LONG_4; + + volatile Element mElement_YUV; + + volatile Element mElement_MATRIX_4X4; + volatile Element mElement_MATRIX_3X3; + volatile Element mElement_MATRIX_2X2; + + volatile Sampler mSampler_CLAMP_NEAREST; + volatile Sampler mSampler_CLAMP_LINEAR; + volatile Sampler mSampler_CLAMP_LINEAR_MIP_LINEAR; + volatile Sampler mSampler_WRAP_NEAREST; + volatile Sampler mSampler_WRAP_LINEAR; + volatile Sampler mSampler_WRAP_LINEAR_MIP_LINEAR; + volatile Sampler mSampler_MIRRORED_REPEAT_NEAREST; + volatile Sampler mSampler_MIRRORED_REPEAT_LINEAR; + volatile Sampler mSampler_MIRRORED_REPEAT_LINEAR_MIP_LINEAR; ProgramStore mProgramStore_BLEND_NONE_DEPTH_TEST; ProgramStore mProgramStore_BLEND_NONE_DEPTH_NO_DEPTH; -- cgit v1.2.3