diff options
author | tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-04-10 19:14:48 +0000 |
---|---|---|
committer | tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-04-10 19:14:48 +0000 |
commit | 5efe0cb04961ef98fbe520ee732fbe50b4195ad3 (patch) | |
tree | 7d63946e0777962b20aff9d5754f4188f5a6918a /src/effects | |
parent | 8637a365518a82901d313d61eecd83a0c5102fe9 (diff) |
Clean up more Visual Studio warnings, including apparent bug in Arithmetic mode.
git-svn-id: http://skia.googlecode.com/svn/trunk@3645 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/SkArithmeticMode.cpp | 2 | ||||
-rw-r--r-- | src/effects/SkColorMatrixFilter.cpp | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp index cf651e1fcb..45464c2efa 100644 --- a/src/effects/SkArithmeticMode.cpp +++ b/src/effects/SkArithmeticMode.cpp @@ -66,7 +66,7 @@ void SkArithmeticMode_scalar::xfer32(SkPMColor dst[], const SkPMColor src[], int a, r, g, b; - if (!srcNeedsUnpremul && !srcNeedsUnpremul) { + if (!srcNeedsUnpremul && !dstNeedsUnpremul) { a = arith(k1, k2, k3, k4, sa, sa); r = arith(k1, k2, k3, k4, SkGetPackedR32(sc), SkGetPackedR32(dc)); g = arith(k1, k2, k3, k4, SkGetPackedG32(sc), SkGetPackedG32(dc)); diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp index c6886250fa..e2123e56ff 100644 --- a/src/effects/SkColorMatrixFilter.cpp +++ b/src/effects/SkColorMatrixFilter.cpp @@ -128,10 +128,7 @@ void SkColorMatrixFilter::setup(const SkScalar* SK_RESTRICT src) { } int32_t* array = fState.fArray; - - int i; SkFixed max = 0; - for (int i = 0; i < 20; i++) { SkFixed value = SkScalarToFixed(src[i]); array[i] = value; @@ -150,7 +147,7 @@ void SkColorMatrixFilter::setup(const SkScalar* SK_RESTRICT src) { if (bits < 9) { bits = 9 - bits; fState.fShift -= bits; - for (i = 0; i < 20; i++) { + for (int i = 0; i < 20; i++) { array[i] >>= bits; } one >>= bits; |