title: Android "spotlight" with changing shader
body: <p>I used the following example to create a spotlight shader: <a href="http://www.curious-creature.org/2012/12/13/android-recipe-2-fun-with-shaders/" rel="nofollow noreferrer">http://www.curious-creature.org/2012/12/13/android-recipe-2-fun-with-shaders/</a></p>
  
  <p>It works great and I use the spotlight with <code>HorizontalScrollView</code> and now I have to scroll the <code>HorizontalScrollView</code> at the same time I move the mask, and I can't figure out how to get it to work with good performance. The <code>HorizontalScrollView</code> has like 5 times screen width of content, and the <code>Shader</code> bitmap is only one screen width. Setting it all again when scrolling is too heavy operation and eventually causes memory crashes.</p>
  
  <p>Thanks.</p>
  
  <p>The picture below is to demonstrate my setting. I have A and B stacked on <code>FrameLayout</code>. While A moves the spotlight B scrolls the content. So could A somehow draw the spotlight as a "transparent hole" in it's background? A is <code>Fragment</code> pager which moves the spotlight and scrolls B <code>ScrollView</code> at the same time.</p>
  
  <p><img src="https://i.stack.imgur.com/XKscr.png" alt="enter image description here"></p>