Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Side by Side Diff: src/effects/SkColorMatrixFilter.cpp

Issue 1316513002: Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Address comments, fix roll(?) Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/effects/SkColorFilters.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "SkColorMatrixFilter.h" 8 #include "SkColorMatrixFilter.h"
9 #include "SkColorMatrix.h" 9 #include "SkColorMatrix.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 GrInvariantOutput::kWill_ReadInput); 519 GrInvariantOutput::kWill_ReadInput);
520 } 520 }
521 521
522 SkColorMatrix fMatrix; 522 SkColorMatrix fMatrix;
523 523
524 typedef GrFragmentProcessor INHERITED; 524 typedef GrFragmentProcessor INHERITED;
525 }; 525 };
526 526
527 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ColorMatrixEffect); 527 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ColorMatrixEffect);
528 528
529 GrFragmentProcessor* ColorMatrixEffect::TestCreate(GrProcessorTestData* d) { 529 const GrFragmentProcessor* ColorMatrixEffect::TestCreate(GrProcessorTestData* d) {
530 SkColorMatrix colorMatrix; 530 SkColorMatrix colorMatrix;
531 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) { 531 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) {
532 colorMatrix.fMat[i] = d->fRandom->nextSScalar1(); 532 colorMatrix.fMat[i] = d->fRandom->nextSScalar1();
533 } 533 }
534 return ColorMatrixEffect::Create(colorMatrix); 534 return ColorMatrixEffect::Create(colorMatrix);
535 } 535 }
536 536
537 bool SkColorMatrixFilter::asFragmentProcessors(GrContext*, GrProcessorDataManage r*, 537 bool SkColorMatrixFilter::asFragmentProcessors(GrContext*, GrProcessorDataManage r*,
538 SkTDArray<GrFragmentProcessor*>* array) const { 538 SkTDArray<GrFragmentProcessor*>* array) const {
539 GrFragmentProcessor* frag = ColorMatrixEffect::Create(fMatrix); 539 GrFragmentProcessor* frag = ColorMatrixEffect::Create(fMatrix);
(...skipping 18 matching lines...) Expand all
558 str->append("matrix: ("); 558 str->append("matrix: (");
559 for (int i = 0; i < 20; ++i) { 559 for (int i = 0; i < 20; ++i) {
560 str->appendScalar(fMatrix.fMat[i]); 560 str->appendScalar(fMatrix.fMat[i]);
561 if (i < 19) { 561 if (i < 19) {
562 str->append(", "); 562 str->append(", ");
563 } 563 }
564 } 564 }
565 str->append(")"); 565 str->append(")");
566 } 566 }
567 #endif 567 #endif
OLDNEW
« no previous file with comments | « src/effects/SkColorFilters.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698