Merge changes I9a5e01bc,If1caee31

* changes:
  Optimize GLSL shaders.
  Improve performance of linear gradients.