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

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

Issue 356513003: Step towards variable length effect keys. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak comment Created 6 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
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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 if (matrix) { 320 if (matrix) {
321 memcpy(matrix, fMatrix.fMat, 20 * sizeof(SkScalar)); 321 memcpy(matrix, fMatrix.fMat, 20 * sizeof(SkScalar));
322 } 322 }
323 return true; 323 return true;
324 } 324 }
325 325
326 #if SK_SUPPORT_GPU 326 #if SK_SUPPORT_GPU
327 #include "GrEffect.h" 327 #include "GrEffect.h"
328 #include "GrTBackendEffectFactory.h" 328 #include "GrTBackendEffectFactory.h"
329 #include "gl/GrGLEffect.h" 329 #include "gl/GrGLEffect.h"
330 #include "gl/GrGLShaderBuilder.h"
330 331
331 class ColorMatrixEffect : public GrEffect { 332 class ColorMatrixEffect : public GrEffect {
332 public: 333 public:
333 static GrEffect* Create(const SkColorMatrix& matrix) { 334 static GrEffect* Create(const SkColorMatrix& matrix) {
334 return SkNEW_ARGS(ColorMatrixEffect, (matrix)); 335 return SkNEW_ARGS(ColorMatrixEffect, (matrix));
335 } 336 }
336 337
337 static const char* Name() { return "Color Matrix"; } 338 static const char* Name() { return "Color Matrix"; }
338 339
339 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE { 340 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 str->append("matrix: ("); 493 str->append("matrix: (");
493 for (int i = 0; i < 20; ++i) { 494 for (int i = 0; i < 20; ++i) {
494 str->appendScalar(fMatrix.fMat[i]); 495 str->appendScalar(fMatrix.fMat[i]);
495 if (i < 19) { 496 if (i < 19) {
496 str->append(", "); 497 str->append(", ");
497 } 498 }
498 } 499 }
499 str->append(")"); 500 str->append(")");
500 } 501 }
501 #endif 502 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698