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

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

Issue 1246193002: Moved GrGLFragmentProcessor definition to its own file (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 SkScalar concat[20]; 376 SkScalar concat[20];
377 SkColorMatrix::SetConcat(concat, fMatrix.fMat, innerMatrix); 377 SkColorMatrix::SetConcat(concat, fMatrix.fMat, innerMatrix);
378 return SkColorMatrixFilter::Create(concat); 378 return SkColorMatrixFilter::Create(concat);
379 } 379 }
380 return NULL; 380 return NULL;
381 } 381 }
382 382
383 #if SK_SUPPORT_GPU 383 #if SK_SUPPORT_GPU
384 #include "GrFragmentProcessor.h" 384 #include "GrFragmentProcessor.h"
385 #include "GrInvariantOutput.h" 385 #include "GrInvariantOutput.h"
386 #include "gl/GrGLProcessor.h" 386 #include "gl/GrGLFragmentProcessor.h"
387 #include "gl/builders/GrGLProgramBuilder.h" 387 #include "gl/builders/GrGLProgramBuilder.h"
388 388
389 class ColorMatrixEffect : public GrFragmentProcessor { 389 class ColorMatrixEffect : public GrFragmentProcessor {
390 public: 390 public:
391 static GrFragmentProcessor* Create(const SkColorMatrix& matrix) { 391 static GrFragmentProcessor* Create(const SkColorMatrix& matrix) {
392 return SkNEW_ARGS(ColorMatrixEffect, (matrix)); 392 return SkNEW_ARGS(ColorMatrixEffect, (matrix));
393 } 393 }
394 394
395 const char* name() const override { return "Color Matrix"; } 395 const char* name() const override { return "Color Matrix"; }
396 396
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
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