OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 | 7 |
9 #include "glsl/GrGLSLProgramDataManager.h" | 8 #include "glsl/GrGLSLProgramDataManager.h" |
10 | 9 |
11 #include "SkMatrix.h" | 10 #include "SkMatrix.h" |
12 | 11 |
13 void GrGLSLProgramDataManager::setSkMatrix(UniformHandle u, const SkMatrix& matr
ix) const { | 12 void GrGLSLProgramDataManager::setSkMatrix(UniformHandle u, const SkMatrix& matr
ix) const { |
14 float mt[] = { | 13 float mt[] = { |
15 matrix.get(SkMatrix::kMScaleX), | 14 matrix.get(SkMatrix::kMScaleX), |
16 matrix.get(SkMatrix::kMSkewY), | 15 matrix.get(SkMatrix::kMSkewY), |
17 matrix.get(SkMatrix::kMPersp0), | 16 matrix.get(SkMatrix::kMPersp0), |
18 matrix.get(SkMatrix::kMSkewX), | 17 matrix.get(SkMatrix::kMSkewX), |
19 matrix.get(SkMatrix::kMScaleY), | 18 matrix.get(SkMatrix::kMScaleY), |
20 matrix.get(SkMatrix::kMPersp1), | 19 matrix.get(SkMatrix::kMPersp1), |
21 matrix.get(SkMatrix::kMTransX), | 20 matrix.get(SkMatrix::kMTransX), |
22 matrix.get(SkMatrix::kMTransY), | 21 matrix.get(SkMatrix::kMTransY), |
23 matrix.get(SkMatrix::kMPersp2), | 22 matrix.get(SkMatrix::kMPersp2), |
24 }; | 23 }; |
25 this->setMatrix3f(u, mt); | 24 this->setMatrix3f(u, mt); |
26 } | 25 } |
27 | |
OLD | NEW |