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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 colorMatrix.fMat[i] = random->nextSScalar1(); | 470 colorMatrix.fMat[i] = random->nextSScalar1(); |
471 } | 471 } |
472 return ColorMatrixEffect::Create(colorMatrix); | 472 return ColorMatrixEffect::Create(colorMatrix); |
473 } | 473 } |
474 | 474 |
475 GrEffectRef* SkColorMatrixFilter::asNewEffect(GrContext*) const { | 475 GrEffectRef* SkColorMatrixFilter::asNewEffect(GrContext*) const { |
476 return ColorMatrixEffect::Create(fMatrix); | 476 return ColorMatrixEffect::Create(fMatrix); |
477 } | 477 } |
478 | 478 |
479 #endif | 479 #endif |
| 480 |
| 481 #ifdef SK_DEVELOPER |
| 482 void SkColorMatrixFilter::toString(SkString* str) const { |
| 483 str->append("SkColorMatrixFilter: "); |
| 484 |
| 485 str->append("matrix: ("); |
| 486 for (int i = 0; i < 20; ++i) { |
| 487 str->appendScalar(fMatrix.fMat[i]); |
| 488 if (i < 19) { |
| 489 str->append(", "); |
| 490 } |
| 491 } |
| 492 str->append(")"); |
| 493 } |
| 494 #endif |
OLD | NEW |