aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkColorMatrix.cpp
diff options
context:
space:
mode:
authorGravatar rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-23 18:09:54 +0000
committerGravatar rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-23 18:09:54 +0000
commitfbfcd5602128ec010c82cb733c9cdc0a3254f9f3 (patch)
treed8b4815d15946c32ee9d254e932411e93be942bb /src/effects/SkColorMatrix.cpp
parent2abed834789bb64c7da740df4c47efc142b7311a (diff)
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part I of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6485054 git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects/SkColorMatrix.cpp')
-rw-r--r--src/effects/SkColorMatrix.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/effects/SkColorMatrix.cpp b/src/effects/SkColorMatrix.cpp
index 5f6cfd4777..98e2865601 100644
--- a/src/effects/SkColorMatrix.cpp
+++ b/src/effects/SkColorMatrix.cpp
@@ -46,7 +46,7 @@ void SkColorMatrix::setSinCos(Axis axis, SkScalar sine, SkScalar cosine) {
0, 1, 5, 6,
};
const uint8_t* index = gRotateIndex + axis * 4;
-
+
this->setIdentity();
fMat[index[0]] = cosine;
fMat[index[1]] = sine;
@@ -76,14 +76,14 @@ void SkColorMatrix::setConcat(const SkColorMatrix& matA,
if (&matA == this || &matB == this) {
result = tmp;
}
-
+
const SkScalar* a = matA.fMat;
const SkScalar* b = matB.fMat;
int index = 0;
for (int j = 0; j < 20; j += 5) {
for (int i = 0; i < 4; i++) {
- result[index++] = SkScalarMul(a[j + 0], b[i + 0]) +
+ result[index++] = SkScalarMul(a[j + 0], b[i + 0]) +
SkScalarMul(a[j + 1], b[i + 5]) +
SkScalarMul(a[j + 2], b[i + 10]) +
SkScalarMul(a[j + 3], b[i + 15]);
@@ -94,7 +94,7 @@ void SkColorMatrix::setConcat(const SkColorMatrix& matA,
SkScalarMul(a[j + 3], b[19]) +
a[j + 4];
}
-
+
if (fMat != result) {
memcpy(fMat, result, sizeof(fMat));
}
@@ -139,7 +139,7 @@ static const SkScalar kB2V = SkFloatToScalar(-0.08131f);
void SkColorMatrix::setRGB2YUV() {
memset(fMat, 0, sizeof(fMat));
-
+
setrow(fMat + 0, kR2Y, kG2Y, kB2Y);
setrow(fMat + 5, kR2U, kG2U, kB2U);
setrow(fMat + 10, kR2V, kG2V, kB2V);
@@ -153,7 +153,7 @@ static const SkScalar kU2B = SkFloatToScalar(1.772f);
void SkColorMatrix::setYUV2RGB() {
memset(fMat, 0, sizeof(fMat));
-
+
setrow(fMat + 0, SK_Scalar1, 0, kV2R);
setrow(fMat + 5, SK_Scalar1, kU2G, kV2G);
setrow(fMat + 10, SK_Scalar1, kU2B, 0);