Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: src/effects/SkColorMatrix.cpp

Issue 163893002: Remove unnecessary includes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1
2 /* 1 /*
3 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
4 * 3 *
5 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 #include "SkColorMatrix.h" 7 #include "SkColorMatrix.h"
9 #include "SkReadBuffer.h"
10 #include "SkWriteBuffer.h"
11 8
12 void SkColorMatrix::setIdentity() { 9 void SkColorMatrix::setIdentity() {
13 memset(fMat, 0, sizeof(fMat)); 10 memset(fMat, 0, sizeof(fMat));
14 fMat[kR_Scale] = fMat[kG_Scale] = fMat[kB_Scale] = fMat[kA_Scale] = 1; 11 fMat[kR_Scale] = fMat[kG_Scale] = fMat[kB_Scale] = fMat[kA_Scale] = 1;
15 } 12 }
16 13
17 void SkColorMatrix::setScale(SkScalar rScale, SkScalar gScale, SkScalar bScale, 14 void SkColorMatrix::setScale(SkScalar rScale, SkScalar gScale, SkScalar bScale,
18 SkScalar aScale) { 15 SkScalar aScale) {
19 memset(fMat, 0, sizeof(fMat)); 16 memset(fMat, 0, sizeof(fMat));
20 fMat[kR_Scale] = rScale; 17 fMat[kR_Scale] = rScale;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 static const SkScalar kU2B = 1.772f; 153 static const SkScalar kU2B = 1.772f;
157 154
158 void SkColorMatrix::setYUV2RGB() { 155 void SkColorMatrix::setYUV2RGB() {
159 memset(fMat, 0, sizeof(fMat)); 156 memset(fMat, 0, sizeof(fMat));
160 157
161 setrow(fMat + 0, 1, 0, kV2R); 158 setrow(fMat + 0, 1, 0, kV2R);
162 setrow(fMat + 5, 1, kU2G, kV2G); 159 setrow(fMat + 5, 1, kU2G, kV2G);
163 setrow(fMat + 10, 1, kU2B, 0); 160 setrow(fMat + 10, 1, kU2B, 0);
164 fMat[kA_Scale] = 1; 161 fMat[kA_Scale] = 1;
165 } 162 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698