OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * 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 |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrGLProgram.h" | 8 #include "GrGLProgram.h" |
9 | 9 |
10 #include "GrAllocator.h" | 10 #include "GrAllocator.h" |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 knownFragColorValue, | 643 knownFragColorValue, |
644 knownDstContributionValue, | 644 knownDstContributionValue, |
645 false); | 645 false); |
646 } else { | 646 } else { |
647 expand_known_value4f(&fragColor, knownFragColorValue); | 647 expand_known_value4f(&fragColor, knownFragColorValue); |
648 } | 648 } |
649 builder.fsCodeAppendf("\t%s = %s;\n", colorOutput.getName().c_str(), fragCol
or.c_str()); | 649 builder.fsCodeAppendf("\t%s = %s;\n", colorOutput.getName().c_str(), fragCol
or.c_str()); |
650 | 650 |
651 /////////////////////////////////////////////////////////////////////////// | 651 /////////////////////////////////////////////////////////////////////////// |
652 // insert GS | 652 // insert GS |
653 #if GR_DEBUG | 653 #if SK_DEBUG |
654 this->genGeometryShader(&builder); | 654 this->genGeometryShader(&builder); |
655 #endif | 655 #endif |
656 | 656 |
657 /////////////////////////////////////////////////////////////////////////// | 657 /////////////////////////////////////////////////////////////////////////// |
658 // compile and setup attribs and unis | 658 // compile and setup attribs and unis |
659 | 659 |
660 if (!this->compileShaders(builder)) { | 660 if (!this->compileShaders(builder)) { |
661 return false; | 661 return false; |
662 } | 662 } |
663 | 663 |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 SkScalarToFloat(m[SkMatrix::kMTransX]), | 992 SkScalarToFloat(m[SkMatrix::kMTransX]), |
993 SkScalarToFloat(m[SkMatrix::kMTransY]), | 993 SkScalarToFloat(m[SkMatrix::kMTransY]), |
994 SkScalarToFloat(m[SkMatrix::kMPersp2]) | 994 SkScalarToFloat(m[SkMatrix::kMPersp2]) |
995 }; | 995 }; |
996 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, mt); | 996 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, mt); |
997 fMatrixState.fViewMatrix = drawState.getViewMatrix(); | 997 fMatrixState.fViewMatrix = drawState.getViewMatrix(); |
998 fMatrixState.fRenderTargetSize = size; | 998 fMatrixState.fRenderTargetSize = size; |
999 fMatrixState.fRenderTargetOrigin = rt->origin(); | 999 fMatrixState.fRenderTargetOrigin = rt->origin(); |
1000 } | 1000 } |
1001 } | 1001 } |
OLD | NEW |