Add SK_RESTRICT inside radial gradient shader - we can't currently see a benefit, but it shouldn't hurt, and some compiler somewhere ought to benefit from it.
git-svn-id: http://skia.googlecode.com/svn/trunk@2383 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/SkGradientShader.cpp b/src/effects/SkGradientShader.cpp
index e9aec52..0ff128b 100644
--- a/src/effects/SkGradientShader.cpp
+++ b/src/effects/SkGradientShader.cpp
@@ -1343,11 +1343,12 @@
// On Linux, this is faster with SkPMColor[] params than SkPMColor* SK_RESTRICT
static void radial_clamp(SkFixed fx, SkFixed fy, SkFixed dx, SkFixed dy,
- SkPMColor* dstC, int count, const SkPMColor* cache,
+ SkPMColor* SK_RESTRICT dstC, int count,
+ const SkPMColor* SK_RESTRICT cache,
const int kCache32Bits, const int kCache32Count) {
// Floating point seems to be slower than fixed point,
// even when we have float hardware.
- const uint8_t* sqrt_table = gSqrt8Table;
+ const uint8_t* SK_RESTRICT sqrt_table = gSqrt8Table;
fx >>= 1;
dx >>= 1;
fy >>= 1;
@@ -1387,7 +1388,7 @@
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,