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

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

Issue 1213613016: More threading of GrShaderDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@GrShaderDataManager
Patch Set: build issue 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/SkLumaColorFilter.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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 GrContext*, 535 GrContext*,
536 const GrCaps&, 536 const GrCaps&,
537 GrTexture* dummyTextures[2]) { 537 GrTexture* dummyTextures[2]) {
538 SkColorMatrix colorMatrix; 538 SkColorMatrix colorMatrix;
539 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) { 539 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) {
540 colorMatrix.fMat[i] = random->nextSScalar1(); 540 colorMatrix.fMat[i] = random->nextSScalar1();
541 } 541 }
542 return ColorMatrixEffect::Create(colorMatrix); 542 return ColorMatrixEffect::Create(colorMatrix);
543 } 543 }
544 544
545 bool SkColorMatrixFilter::asFragmentProcessors(GrContext*, 545 bool SkColorMatrixFilter::asFragmentProcessors(GrContext*, GrShaderDataManager*,
546 SkTDArray<GrFragmentProcessor*>* array) const { 546 SkTDArray<GrFragmentProcessor*>* array) const {
547 GrFragmentProcessor* frag = ColorMatrixEffect::Create(fMatrix); 547 GrFragmentProcessor* frag = ColorMatrixEffect::Create(fMatrix);
548 if (frag) { 548 if (frag) {
549 if (array) { 549 if (array) {
550 *array->append() = frag; 550 *array->append() = frag;
551 } else { 551 } else {
552 frag->unref(); 552 frag->unref();
553 SkDEBUGCODE(frag = NULL;) 553 SkDEBUGCODE(frag = NULL;)
554 } 554 }
555 return true; 555 return true;
(...skipping 10 matching lines...) Expand all
566 str->append("matrix: ("); 566 str->append("matrix: (");
567 for (int i = 0; i < 20; ++i) { 567 for (int i = 0; i < 20; ++i) {
568 str->appendScalar(fMatrix.fMat[i]); 568 str->appendScalar(fMatrix.fMat[i]);
569 if (i < 19) { 569 if (i < 19) {
570 str->append(", "); 570 str->append(", ");
571 } 571 }
572 } 572 }
573 str->append(")"); 573 str->append(")");
574 } 574 }
575 #endif 575 #endif
OLDNEW
« no previous file with comments | « src/effects/SkColorFilters.cpp ('k') | src/effects/SkLumaColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698