Refactoring the DynamicTexture and remove gcc warning

Change-Id: I2676ea130b591c4b3e396935e5622fe373f29683