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

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

Issue 660573002: Split GrFragmentProcessor into its own header (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add file to git Created 6 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/SkLightingImageFilter.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 325 }
326 326
327 bool SkColorMatrixFilter::asColorMatrix(SkScalar matrix[20]) const { 327 bool SkColorMatrixFilter::asColorMatrix(SkScalar matrix[20]) const {
328 if (matrix) { 328 if (matrix) {
329 memcpy(matrix, fMatrix.fMat, 20 * sizeof(SkScalar)); 329 memcpy(matrix, fMatrix.fMat, 20 * sizeof(SkScalar));
330 } 330 }
331 return true; 331 return true;
332 } 332 }
333 333
334 #if SK_SUPPORT_GPU 334 #if SK_SUPPORT_GPU
335 #include "GrProcessor.h" 335 #include "GrFragmentProcessor.h"
336 #include "GrTBackendProcessorFactory.h" 336 #include "GrTBackendProcessorFactory.h"
337 #include "gl/GrGLProcessor.h" 337 #include "gl/GrGLProcessor.h"
338 #include "gl/builders/GrGLProgramBuilder.h" 338 #include "gl/builders/GrGLProgramBuilder.h"
339 339
340 class ColorMatrixEffect : public GrFragmentProcessor { 340 class ColorMatrixEffect : public GrFragmentProcessor {
341 public: 341 public:
342 static GrFragmentProcessor* Create(const SkColorMatrix& matrix) { 342 static GrFragmentProcessor* Create(const SkColorMatrix& matrix) {
343 return SkNEW_ARGS(ColorMatrixEffect, (matrix)); 343 return SkNEW_ARGS(ColorMatrixEffect, (matrix));
344 } 344 }
345 345
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 str->append("matrix: ("); 501 str->append("matrix: (");
502 for (int i = 0; i < 20; ++i) { 502 for (int i = 0; i < 20; ++i) {
503 str->appendScalar(fMatrix.fMat[i]); 503 str->appendScalar(fMatrix.fMat[i]);
504 if (i < 19) { 504 if (i < 19) {
505 str->append(", "); 505 str->append(", ");
506 } 506 }
507 } 507 }
508 str->append(")"); 508 str->append(")");
509 } 509 }
510 #endif 510 #endif
OLDNEW
« no previous file with comments | « src/effects/SkColorFilters.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698