Add plumbing to support gradients in OpenGL renderer.

The LinearGradient class keeps a copy of the various parameters that
define the gradient. The copies are native arrays to avoid copying
Java arrays on every draw call. The gradient code path is implemented
until OpenGLRenderer::drawRect() (see TODO.) The actual gradient
implementation will be added in a latter change.

Change-Id: I9300d250ef5e2e9c2e097c3116ee71dfc9d752d8
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 235931c..b3cef88 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -103,6 +103,8 @@
     void resetShader();
     void setupBitmapShader(SkBitmap* bitmap, SkShader::TileMode tileX, SkShader::TileMode tileY,
             SkMatrix* matrix, bool hasAlpha);
+    void setupLinearGradientShader(float* bounds, uint32_t* colors, float* positions,
+            SkShader::TileMode tileMode, SkMatrix* matrix, bool hasAlpha);
 
 private:
     /**
@@ -319,13 +321,18 @@
     GLenum mLastSrcMode;
     GLenum mLastDstMode;
 
-    // Skia shader
+    // Skia shaders
     ShaderType mShader;
     bool mShaderBlend;
-    SkBitmap* mShaderBitmap;
     SkShader::TileMode mShaderTileX;
     SkShader::TileMode mShaderTileY;
     SkMatrix* mShaderMatrix;
+    // Bitmaps
+    SkBitmap* mShaderBitmap;
+    // Gradients
+    float* mShaderBounds;
+    uint32_t* mShaderColors;
+    float* mShaderPositions;
 
     // Various caches
     TextureCache mTextureCache;