OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SkColorMatrixFilter.h" | 8 #include "SkColorMatrixFilter.h" |
9 #include "SkColorMatrix.h" | 9 #include "SkColorMatrix.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 GLEffect(const GrBackendEffectFactory& factory, | 392 GLEffect(const GrBackendEffectFactory& factory, |
393 const GrDrawEffect&) | 393 const GrDrawEffect&) |
394 : INHERITED(factory) { | 394 : INHERITED(factory) { |
395 } | 395 } |
396 | 396 |
397 virtual void emitCode(GrGLShaderBuilder* builder, | 397 virtual void emitCode(GrGLShaderBuilder* builder, |
398 const GrDrawEffect&, | 398 const GrDrawEffect&, |
399 EffectKey, | 399 EffectKey, |
400 const char* outputColor, | 400 const char* outputColor, |
401 const char* inputColor, | 401 const char* inputColor, |
| 402 const TransformedCoordsArray&, |
402 const TextureSamplerArray&) SK_OVERRIDE { | 403 const TextureSamplerArray&) SK_OVERRIDE { |
403 fMatrixHandle = builder->addUniform(GrGLShaderBuilder::kFragment_Vis
ibility, | 404 fMatrixHandle = builder->addUniform(GrGLShaderBuilder::kFragment_Vis
ibility, |
404 kMat44f_GrSLType, | 405 kMat44f_GrSLType, |
405 "ColorMatrix"); | 406 "ColorMatrix"); |
406 fVectorHandle = builder->addUniform(GrGLShaderBuilder::kFragment_Vis
ibility, | 407 fVectorHandle = builder->addUniform(GrGLShaderBuilder::kFragment_Vis
ibility, |
407 kVec4f_GrSLType, | 408 kVec4f_GrSLType, |
408 "ColorMatrixVector"); | 409 "ColorMatrixVector"); |
409 | 410 |
410 if (NULL == inputColor) { | 411 if (NULL == inputColor) { |
411 // could optimize this case, but we aren't for now. | 412 // could optimize this case, but we aren't for now. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 str->append("matrix: ("); | 486 str->append("matrix: ("); |
486 for (int i = 0; i < 20; ++i) { | 487 for (int i = 0; i < 20; ++i) { |
487 str->appendScalar(fMatrix.fMat[i]); | 488 str->appendScalar(fMatrix.fMat[i]); |
488 if (i < 19) { | 489 if (i < 19) { |
489 str->append(", "); | 490 str->append(", "); |
490 } | 491 } |
491 } | 492 } |
492 str->append(")"); | 493 str->append(")"); |
493 } | 494 } |
494 #endif | 495 #endif |
OLD | NEW |