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

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

Issue 22340010: Refactor GrGLUniformManager::UniformHandle to initialize itself by default (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: description Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/effects/SkBicubicImageFilter.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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 384
385 GR_DECLARE_EFFECT_TEST; 385 GR_DECLARE_EFFECT_TEST;
386 386
387 class GLEffect : public GrGLEffect { 387 class GLEffect : public GrGLEffect {
388 public: 388 public:
389 // this class always generates the same code. 389 // this class always generates the same code.
390 static EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&) { return 0 ; } 390 static EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&) { return 0 ; }
391 391
392 GLEffect(const GrBackendEffectFactory& factory, 392 GLEffect(const GrBackendEffectFactory& factory,
393 const GrDrawEffect&) 393 const GrDrawEffect&)
394 : INHERITED(factory) 394 : INHERITED(factory) {
395 , fMatrixHandle(GrGLUniformManager::kInvalidUniformHandle) 395 }
396 , fVectorHandle(GrGLUniformManager::kInvalidUniformHandle) {}
397 396
398 virtual void emitCode(GrGLShaderBuilder* builder, 397 virtual void emitCode(GrGLShaderBuilder* builder,
399 const GrDrawEffect&, 398 const GrDrawEffect&,
400 EffectKey, 399 EffectKey,
401 const char* outputColor, 400 const char* outputColor,
402 const char* inputColor, 401 const char* inputColor,
403 const TextureSamplerArray&) SK_OVERRIDE { 402 const TextureSamplerArray&) SK_OVERRIDE {
404 fMatrixHandle = builder->addUniform(GrGLShaderBuilder::kFragment_Sha derType, 403 fMatrixHandle = builder->addUniform(GrGLShaderBuilder::kFragment_Sha derType,
405 kMat44f_GrSLType, 404 kMat44f_GrSLType,
406 "ColorMatrix"); 405 "ColorMatrix");
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 str->append("matrix: ("); 485 str->append("matrix: (");
487 for (int i = 0; i < 20; ++i) { 486 for (int i = 0; i < 20; ++i) {
488 str->appendScalar(fMatrix.fMat[i]); 487 str->appendScalar(fMatrix.fMat[i]);
489 if (i < 19) { 488 if (i < 19) {
490 str->append(", "); 489 str->append(", ");
491 } 490 }
492 } 491 }
493 str->append(")"); 492 str->append(")");
494 } 493 }
495 #endif 494 #endif
OLDNEW
« no previous file with comments | « src/effects/SkBicubicImageFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698