| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkDither.h" | 8 #include "SkDither.h" |
| 9 #include "SkPerlinNoiseShader.h" | 9 #include "SkPerlinNoiseShader.h" |
| 10 #include "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 const SkPerlinNoiseShader::StitchData& stitchData = turbulence.stitchDat
a(); | 939 const SkPerlinNoiseShader::StitchData& stitchData = turbulence.stitchDat
a(); |
| 940 uman.set2f(fStitchDataUni, SkIntToScalar(stitchData.fWidth), | 940 uman.set2f(fStitchDataUni, SkIntToScalar(stitchData.fWidth), |
| 941 SkIntToScalar(stitchData.fHeight)); | 941 SkIntToScalar(stitchData.fHeight)); |
| 942 } | 942 } |
| 943 } | 943 } |
| 944 | 944 |
| 945 ///////////////////////////////////////////////////////////////////// | 945 ///////////////////////////////////////////////////////////////////// |
| 946 | 946 |
| 947 bool SkPerlinNoiseShader::asNewEffect(GrContext* context, const SkPaint& paint, | 947 bool SkPerlinNoiseShader::asNewEffect(GrContext* context, const SkPaint& paint, |
| 948 const SkMatrix* externalLocalMatrix, GrCol
or* grColor, | 948 const SkMatrix* externalLocalMatrix, GrCol
or* grColor, |
| 949 GrEffectRef** grEffect) const { | 949 GrEffect** grEffect) const { |
| 950 SkASSERT(NULL != context); | 950 SkASSERT(NULL != context); |
| 951 | 951 |
| 952 *grColor = SkColor2GrColorJustAlpha(paint.getColor()); | 952 *grColor = SkColor2GrColorJustAlpha(paint.getColor()); |
| 953 | 953 |
| 954 SkMatrix localMatrix = this->getLocalMatrix(); | 954 SkMatrix localMatrix = this->getLocalMatrix(); |
| 955 if (externalLocalMatrix) { | 955 if (externalLocalMatrix) { |
| 956 localMatrix.preConcat(*externalLocalMatrix); | 956 localMatrix.preConcat(*externalLocalMatrix); |
| 957 } | 957 } |
| 958 | 958 |
| 959 SkMatrix matrix = context->getMatrix(); | 959 SkMatrix matrix = context->getMatrix(); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 str->append(" seed: "); | 1043 str->append(" seed: "); |
| 1044 str->appendScalar(fSeed); | 1044 str->appendScalar(fSeed); |
| 1045 str->append(" stitch tiles: "); | 1045 str->append(" stitch tiles: "); |
| 1046 str->append(fStitchTiles ? "true " : "false "); | 1046 str->append(fStitchTiles ? "true " : "false "); |
| 1047 | 1047 |
| 1048 this->INHERITED::toString(str); | 1048 this->INHERITED::toString(str); |
| 1049 | 1049 |
| 1050 str->append(")"); | 1050 str->append(")"); |
| 1051 } | 1051 } |
| 1052 #endif | 1052 #endif |
| OLD | NEW |