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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 return cme.fMatrix == fMatrix; | 454 return cme.fMatrix == fMatrix; |
455 } | 455 } |
456 | 456 |
457 SkColorMatrix fMatrix; | 457 SkColorMatrix fMatrix; |
458 | 458 |
459 typedef GrGLEffect INHERITED; | 459 typedef GrGLEffect INHERITED; |
460 }; | 460 }; |
461 | 461 |
462 GR_DEFINE_EFFECT_TEST(ColorMatrixEffect); | 462 GR_DEFINE_EFFECT_TEST(ColorMatrixEffect); |
463 | 463 |
464 GrEffectRef* ColorMatrixEffect::TestCreate(SkMWCRandom* random, | 464 GrEffectRef* ColorMatrixEffect::TestCreate(SkRandom* random, |
465 GrContext*, | 465 GrContext*, |
466 const GrDrawTargetCaps&, | 466 const GrDrawTargetCaps&, |
467 GrTexture* dummyTextures[2]) { | 467 GrTexture* dummyTextures[2]) { |
468 SkColorMatrix colorMatrix; | 468 SkColorMatrix colorMatrix; |
469 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) { | 469 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) { |
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 |
(...skipping 10 matching lines...) Expand all Loading... |
485 str->append("matrix: ("); | 485 str->append("matrix: ("); |
486 for (int i = 0; i < 20; ++i) { | 486 for (int i = 0; i < 20; ++i) { |
487 str->appendScalar(fMatrix.fMat[i]); | 487 str->appendScalar(fMatrix.fMat[i]); |
488 if (i < 19) { | 488 if (i < 19) { |
489 str->append(", "); | 489 str->append(", "); |
490 } | 490 } |
491 } | 491 } |
492 str->append(")"); | 492 str->append(")"); |
493 } | 493 } |
494 #endif | 494 #endif |
OLD | NEW |