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

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

Issue 1388113002: Bye bye processor data manager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove files Created 5 years, 2 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ColorMatrixEffect); 529 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ColorMatrixEffect);
530 530
531 const GrFragmentProcessor* ColorMatrixEffect::TestCreate(GrProcessorTestData* d) { 531 const GrFragmentProcessor* ColorMatrixEffect::TestCreate(GrProcessorTestData* d) {
532 SkColorMatrix colorMatrix; 532 SkColorMatrix colorMatrix;
533 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) { 533 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) {
534 colorMatrix.fMat[i] = d->fRandom->nextSScalar1(); 534 colorMatrix.fMat[i] = d->fRandom->nextSScalar1();
535 } 535 }
536 return ColorMatrixEffect::Create(colorMatrix); 536 return ColorMatrixEffect::Create(colorMatrix);
537 } 537 }
538 538
539 const GrFragmentProcessor* SkColorMatrixFilter::asFragmentProcessor(GrContext*, 539 const GrFragmentProcessor* SkColorMatrixFilter::asFragmentProcessor(GrContext*) const {
540 GrProcessorD ataManager*) const {
541 return ColorMatrixEffect::Create(fMatrix); 540 return ColorMatrixEffect::Create(fMatrix);
542 } 541 }
543 542
544 #endif 543 #endif
545 544
546 #ifndef SK_IGNORE_TO_STRING 545 #ifndef SK_IGNORE_TO_STRING
547 void SkColorMatrixFilter::toString(SkString* str) const { 546 void SkColorMatrixFilter::toString(SkString* str) const {
548 str->append("SkColorMatrixFilter: "); 547 str->append("SkColorMatrixFilter: ");
549 548
550 str->append("matrix: ("); 549 str->append("matrix: (");
551 for (int i = 0; i < 20; ++i) { 550 for (int i = 0; i < 20; ++i) {
552 str->appendScalar(fMatrix.fMat[i]); 551 str->appendScalar(fMatrix.fMat[i]);
553 if (i < 19) { 552 if (i < 19) {
554 str->append(", "); 553 str->append(", ");
555 } 554 }
556 } 555 }
557 str->append(")"); 556 str->append(")");
558 } 557 }
559 #endif 558 #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