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

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

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 7 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ColorMatrixEffect); 531 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ColorMatrixEffect);
532 532
533 const GrFragmentProcessor* ColorMatrixEffect::TestCreate(GrProcessorTestData* d) { 533 const GrFragmentProcessor* ColorMatrixEffect::TestCreate(GrProcessorTestData* d) {
534 SkColorMatrix colorMatrix; 534 SkColorMatrix colorMatrix;
535 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) { 535 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) {
536 colorMatrix.fMat[i] = d->fRandom->nextSScalar1(); 536 colorMatrix.fMat[i] = d->fRandom->nextSScalar1();
537 } 537 }
538 return ColorMatrixEffect::Create(colorMatrix); 538 return ColorMatrixEffect::Create(colorMatrix);
539 } 539 }
540 540
541 const GrFragmentProcessor* SkColorMatrixFilter::asFragmentProcessor(GrContext*) const { 541 const GrFragmentProcessor* SkColorMatrixFilter::asFragmentProcessor(GrContext*,
542 GrRenderTarg et* dst) const {
542 return ColorMatrixEffect::Create(fMatrix); 543 return ColorMatrixEffect::Create(fMatrix);
543 } 544 }
544 545
545 #endif 546 #endif
546 547
547 #ifndef SK_IGNORE_TO_STRING 548 #ifndef SK_IGNORE_TO_STRING
548 void SkColorMatrixFilter::toString(SkString* str) const { 549 void SkColorMatrixFilter::toString(SkString* str) const {
549 str->append("SkColorMatrixFilter: "); 550 str->append("SkColorMatrixFilter: ");
550 551
551 str->append("matrix: ("); 552 str->append("matrix: (");
552 for (int i = 0; i < 20; ++i) { 553 for (int i = 0; i < 20; ++i) {
553 str->appendScalar(fMatrix.fMat[i]); 554 str->appendScalar(fMatrix.fMat[i]);
554 if (i < 19) { 555 if (i < 19) {
555 str->append(", "); 556 str->append(", ");
556 } 557 }
557 } 558 }
558 str->append(")"); 559 str->append(")");
559 } 560 }
560 #endif 561 #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