blob: 8d3d3cea8070006db7bc6001cd7fe07a7490c967 [file] [log] [blame]
egdaniel2829bb72016-02-03 09:52:51 -08001
2/*
3 * Copyright 2016 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9#include "glsl/GrGLSLProgramDataManager.h"
10
11#include "SkMatrix.h"
12
13void GrGLSLProgramDataManager::setSkMatrix(UniformHandle u, const SkMatrix& matrix) const {
14 float mt[] = {
15 matrix.get(SkMatrix::kMScaleX),
16 matrix.get(SkMatrix::kMSkewY),
17 matrix.get(SkMatrix::kMPersp0),
18 matrix.get(SkMatrix::kMSkewX),
19 matrix.get(SkMatrix::kMScaleY),
20 matrix.get(SkMatrix::kMPersp1),
21 matrix.get(SkMatrix::kMTransX),
22 matrix.get(SkMatrix::kMTransY),
23 matrix.get(SkMatrix::kMPersp2),
24 };
25 this->setMatrix3f(u, mt);
26}
27