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
This commit is contained in:
tomhudson@google.com 2011-09-30 14:31:28 +00:00
parent 9d12f5c11b
commit 3e0f22c060

View File

@ -1343,11 +1343,12 @@ static inline bool no_need_for_radial_pin(int fx, int dx,
// 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 @@ void Radial_Gradient::shadeSpan(int x, int y,
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,