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

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

Issue 1228683002: rename GrShaderDataManager -> GrProcessorDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@grfixuptests
Patch Set: rebase onto origin/master Created 5 years, 5 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ColorMatrixEffect); 532 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ColorMatrixEffect);
533 533
534 GrFragmentProcessor* ColorMatrixEffect::TestCreate(GrProcessorTestData* d) { 534 GrFragmentProcessor* ColorMatrixEffect::TestCreate(GrProcessorTestData* d) {
535 SkColorMatrix colorMatrix; 535 SkColorMatrix colorMatrix;
536 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) { 536 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) {
537 colorMatrix.fMat[i] = d->fRandom->nextSScalar1(); 537 colorMatrix.fMat[i] = d->fRandom->nextSScalar1();
538 } 538 }
539 return ColorMatrixEffect::Create(colorMatrix); 539 return ColorMatrixEffect::Create(colorMatrix);
540 } 540 }
541 541
542 bool SkColorMatrixFilter::asFragmentProcessors(GrContext*, GrShaderDataManager*, 542 bool SkColorMatrixFilter::asFragmentProcessors(GrContext*, GrProcessorDataManage r*,
543 SkTDArray<GrFragmentProcessor*>* array) const { 543 SkTDArray<GrFragmentProcessor*>* array) const {
544 GrFragmentProcessor* frag = ColorMatrixEffect::Create(fMatrix); 544 GrFragmentProcessor* frag = ColorMatrixEffect::Create(fMatrix);
545 if (frag) { 545 if (frag) {
546 if (array) { 546 if (array) {
547 *array->append() = frag; 547 *array->append() = frag;
548 } else { 548 } else {
549 frag->unref(); 549 frag->unref();
550 SkDEBUGCODE(frag = NULL;) 550 SkDEBUGCODE(frag = NULL;)
551 } 551 }
552 return true; 552 return true;
(...skipping 10 matching lines...) Expand all
563 str->append("matrix: ("); 563 str->append("matrix: (");
564 for (int i = 0; i < 20; ++i) { 564 for (int i = 0; i < 20; ++i) {
565 str->appendScalar(fMatrix.fMat[i]); 565 str->appendScalar(fMatrix.fMat[i]);
566 if (i < 19) { 566 if (i < 19) {
567 str->append(", "); 567 str->append(", ");
568 } 568 }
569 } 569 }
570 str->append(")"); 570 str->append(")");
571 } 571 }
572 #endif 572 #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