Home | History | Annotate | Download | only in glsl
      1 
      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 
     13 void 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 
     28