title: Compose two Shaders (Color Picker)
body: <p>In my application I am using my custom color picker widget. In <code>onDraw</code> method I mix two <code>Shaders</code> using the following code:</p>
  
  <pre><code>ComposeShader mShader = new ComposeShader(mValShader, mSatShader, PorterDuff.Mode.MULTIPLY);
  </code></pre>
  
  <p>However, The result that I get is not what I would like to get.
  Below you can see how the <code>Shaders</code> mentioned above looks like:<BR>
  <img src="https://i.stack.imgur.com/7Bb4W.png" alt="enter image description here"> + <img src="https://i.stack.imgur.com/59Efy.png" alt="enter image description here"> = <img src="https://i.stack.imgur.com/mQOX2.png" alt="enter image description here"></p>
  
  <p>As you can see it totally doesn't works...<BR>
  This is how result should look like (more or less):<BR>
  <img src="https://i.stack.imgur.com/dWjKS.png" alt="enter image description here"><BR><BR></p>
  
  <p>EDIT (Possible solution):</p>
  
  <p>To make it work I have to use the following code:</p>
  
  <pre><code>if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.HONEYCOMB) {
      setLayerType(View.LAYER_TYPE_SOFTWARE, null);
  }
  </code></pre>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/12445583/issue-with-composeshader-on-android-4-1-1">Issue with ComposeShader on Android 4.1.1</a></li>
  </ul>
  
  <p>However I don't really understand how this line of code affect my application. I mean IU understand it sets the <code>HARDWARE ACCELERATION</code>, are there any consequences of doing that for my application? Should I turn it on again after drawing the <code>Shader</code>? Could anyone explain?</p>