Handle shader matrix correctly when ignoring canvas transform

bug:20063841

Restores old SkShader matrix behavior from before the Glop refactor.

Many drawing operations draw without sending the canvas transform to
the GL shader. In such cases, we need to adapt the matrix sent to the
SkShader logic to invert the canvas transform that's built into
the mesh.

Change-Id: I42b6f59df36ce46436322b95bf9ad2140795ee58
diff --git a/libs/hwui/SkiaShader.cpp b/libs/hwui/SkiaShader.cpp
index ecf8b6b..2cfb9e1 100644
--- a/libs/hwui/SkiaShader.cpp
+++ b/libs/hwui/SkiaShader.cpp
@@ -346,33 +346,28 @@
     glUniform2fv(caches.program().getUniform("textureDimension"), 1, &data.textureDimension[0]);
 }
 
-void SkiaShader::store(Caches& caches, const SkShader* shader, const Matrix4& modelViewMatrix,
+void SkiaShader::store(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
         GLuint* textureUnit, ProgramDescription* description,
         SkiaShaderData* outData) {
-    if (!shader) {
-        outData->skiaShaderType = kNone_SkiaShaderType;
-        return;
-    }
-
-    if (tryStoreGradient(caches, *shader, modelViewMatrix,
+    if (tryStoreGradient(caches, shader, modelViewMatrix,
             textureUnit, description, &outData->gradientData)) {
         outData->skiaShaderType = kGradient_SkiaShaderType;
         return;
     }
 
-    if (tryStoreBitmap(caches, *shader, modelViewMatrix,
+    if (tryStoreBitmap(caches, shader, modelViewMatrix,
             textureUnit, description, &outData->bitmapData)) {
         outData->skiaShaderType = kBitmap_SkiaShaderType;
         return;
     }
 
-    if (tryStoreCompose(caches, *shader, modelViewMatrix,
+    if (tryStoreCompose(caches, shader, modelViewMatrix,
             textureUnit, description, outData)) {
         outData->skiaShaderType = kCompose_SkiaShaderType;
         return;
     }
 
-    if (tryStoreLayer(caches, *shader, modelViewMatrix,
+    if (tryStoreLayer(caches, shader, modelViewMatrix,
             textureUnit, description, &outData->layerData)) {
         outData->skiaShaderType = kLayer_SkiaShaderType;
     }