| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(SkMWCRandom* random, |
| 465 GrContext*, | 465 GrContext*, |
| 466 const GrDrawTargetCaps&, |
| 466 GrTexture* dummyTextures[2]) { | 467 GrTexture* dummyTextures[2]) { |
| 467 SkColorMatrix colorMatrix; | 468 SkColorMatrix colorMatrix; |
| 468 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) { |
| 469 colorMatrix.fMat[i] = random->nextSScalar1(); | 470 colorMatrix.fMat[i] = random->nextSScalar1(); |
| 470 } | 471 } |
| 471 return ColorMatrixEffect::Create(colorMatrix); | 472 return ColorMatrixEffect::Create(colorMatrix); |
| 472 } | 473 } |
| 473 | 474 |
| 474 GrEffectRef* SkColorMatrixFilter::asNewEffect(GrContext*) const { | 475 GrEffectRef* SkColorMatrixFilter::asNewEffect(GrContext*) const { |
| 475 return ColorMatrixEffect::Create(fMatrix); | 476 return ColorMatrixEffect::Create(fMatrix); |
| 476 } | 477 } |
| 477 | 478 |
| 478 #endif | 479 #endif |
| OLD | NEW |