add SK_RESTRICT in shadeSpan methods



git-svn-id: http://skia.googlecode.com/svn/trunk@2288 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/SkGradientShader.cpp b/src/effects/SkGradientShader.cpp
index aee059e..36177b1 100644
--- a/src/effects/SkGradientShader.cpp
+++ b/src/effects/SkGradientShader.cpp
@@ -836,13 +836,13 @@
     } while (0)
 
 
-void Linear_Gradient::shadeSpan(int x, int y, SkPMColor dstC[], int count) {
+void Linear_Gradient::shadeSpan(int x, int y, SkPMColor* SK_RESTRICT dstC, int count) {
     SkASSERT(count > 0);
 
     SkPoint             srcPt;
     SkMatrix::MapXYProc dstProc = fDstToIndexProc;
     TileProc            proc = fTileProc;
-    const SkPMColor*    cache = this->getCache32();
+    const SkPMColor* SK_RESTRICT cache = this->getCache32();
 #ifdef USE_DITHER_32BIT_GRADIENT
     int                 toggle = ((x ^ y) & 1) << kCache32Bits;
     const int           TOGGLE_MASK = (1 << kCache32Bits);
@@ -987,13 +987,13 @@
     } while (0)
 
 
-void Linear_Gradient::shadeSpan16(int x, int y, uint16_t dstC[], int count) {
+void Linear_Gradient::shadeSpan16(int x, int y, uint16_t* SK_RESTRICT dstC, int count) {
     SkASSERT(count > 0);
 
     SkPoint             srcPt;
     SkMatrix::MapXYProc dstProc = fDstToIndexProc;
     TileProc            proc = fTileProc;
-    const uint16_t*     cache = this->getCache16();
+    const uint16_t* SK_RESTRICT cache = this->getCache16();
     int                 toggle = ((x ^ y) & 1) << kCache16Bits;
     const int           TOGGLE_MASK = (1 << kCache32Bits);
 
@@ -1147,13 +1147,13 @@
         rad_to_unit_matrix(center, radius, &fPtsToUnit);
     }
 
-    virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) {
+    virtual void shadeSpan(int x, int y, SkPMColor* SK_RESTRICT dstC, int count) {
         SkASSERT(count > 0);
 
         SkPoint             srcPt;
         SkMatrix::MapXYProc dstProc = fDstToIndexProc;
         TileProc            proc = fTileProc;
-        const SkPMColor*    cache = this->getCache32();
+        const SkPMColor* SK_RESTRICT cache = this->getCache32();
 
         if (fDstToIndexClass != kPerspective_MatrixClass) {
             dstProc(fDstToIndex, SkIntToScalar(x) + SK_ScalarHalf,
@@ -1173,7 +1173,7 @@
             }
 
             if (proc == clamp_tileproc) {
-                const uint8_t* sqrt_table = gSqrt8Table;
+                const uint8_t* SK_RESTRICT sqrt_table = gSqrt8Table;
                 fx >>= 1;
                 dx >>= 1;
                 fy >>= 1;
@@ -1226,13 +1226,13 @@
         }
     }
 
-    virtual void shadeSpan16(int x, int y, uint16_t dstC[], int count) {
+    virtual void shadeSpan16(int x, int y, uint16_t* SK_RESTRICT dstC, int count) {
         SkASSERT(count > 0);
 
         SkPoint             srcPt;
         SkMatrix::MapXYProc dstProc = fDstToIndexProc;
         TileProc            proc = fTileProc;
-        const uint16_t*     cache = this->getCache16();
+        const uint16_t* SK_RESTRICT cache = this->getCache16();
         int                 toggle = ((x ^ y) & 1) << kCache16Bits;
 
         if (fDstToIndexClass != kPerspective_MatrixClass) {
@@ -1253,7 +1253,7 @@
             }
 
             if (proc == clamp_tileproc) {
-                const uint8_t* sqrt_table = gSqrt8Table;
+                const uint8_t* SK_RESTRICT sqrt_table = gSqrt8Table;
 
                 /* knock these down so we can pin against +- 0x7FFF, which is an immediate load,
                     rather than 0xFFFF which is slower. This is a compromise, since it reduces our
@@ -1532,7 +1532,7 @@
         return kRadial2_GradientType;
     }
 
-    virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) {
+    virtual void shadeSpan(int x, int y, SkPMColor* SK_RESTRICT dstC, int count) {
         SkASSERT(count > 0);
 
         // Zero difference between radii:  fill with transparent black.
@@ -1542,7 +1542,7 @@
         }
         SkMatrix::MapXYProc dstProc = fDstToIndexProc;
         TileProc            proc = fTileProc;
-        const SkPMColor*    cache = this->getCache32();
+        const SkPMColor* SK_RESTRICT cache = this->getCache32();
 
         SkScalar foura = fA * 4;
         bool posRoot = fDiffRadius < 0;
@@ -1962,10 +1962,10 @@
     return result;
 }
 
-void Sweep_Gradient::shadeSpan(int x, int y, SkPMColor dstC[], int count) {
+void Sweep_Gradient::shadeSpan(int x, int y, SkPMColor* SK_RESTRICT dstC, int count) {
     SkMatrix::MapXYProc proc = fDstToIndexProc;
     const SkMatrix&     matrix = fDstToIndex;
-    const SkPMColor*    cache = this->getCache32();
+    const SkPMColor* SK_RESTRICT cache = this->getCache32();
     SkPoint             srcPt;
 
     if (fDstToIndexClass != kPerspective_MatrixClass) {
@@ -2003,10 +2003,10 @@
     }
 }
 
-void Sweep_Gradient::shadeSpan16(int x, int y, uint16_t dstC[], int count) {
+void Sweep_Gradient::shadeSpan16(int x, int y, uint16_t* SK_RESTRICT dstC, int count) {
     SkMatrix::MapXYProc proc = fDstToIndexProc;
     const SkMatrix&     matrix = fDstToIndex;
-    const uint16_t*     cache = this->getCache16();
+    const uint16_t* SK_RESTRICT cache = this->getCache16();
     int                 toggle = ((x ^ y) & 1) << kCache16Bits;
     SkPoint             srcPt;