| OLD | NEW |
| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 // this class always generates the same code. | 357 // this class always generates the same code. |
| 358 static void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBu
ilder* b) {} | 358 static void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBu
ilder* b) {} |
| 359 | 359 |
| 360 GLProcessor(const GrBackendProcessorFactory& factory, | 360 GLProcessor(const GrBackendProcessorFactory& factory, |
| 361 const GrProcessor&) | 361 const GrProcessor&) |
| 362 : INHERITED(factory) { | 362 : INHERITED(factory) { |
| 363 } | 363 } |
| 364 | 364 |
| 365 virtual void emitCode(GrGLFPBuilder* builder, | 365 virtual void emitCode(GrGLFPBuilder* builder, |
| 366 const GrFragmentProcessor&, | 366 const GrFragmentProcessor&, |
| 367 const GrProcessorKey&, | |
| 368 const char* outputColor, | 367 const char* outputColor, |
| 369 const char* inputColor, | 368 const char* inputColor, |
| 370 const TransformedCoordsArray&, | 369 const TransformedCoordsArray&, |
| 371 const TextureSamplerArray&) SK_OVERRIDE { | 370 const TextureSamplerArray&) SK_OVERRIDE { |
| 372 fMatrixHandle = builder->addUniform(GrGLProgramBuilder::kFragment_Vi
sibility, | 371 fMatrixHandle = builder->addUniform(GrGLProgramBuilder::kFragment_Vi
sibility, |
| 373 kMat44f_GrSLType, | 372 kMat44f_GrSLType, |
| 374 "ColorMatrix"); | 373 "ColorMatrix"); |
| 375 fVectorHandle = builder->addUniform(GrGLProgramBuilder::kFragment_Vi
sibility, | 374 fVectorHandle = builder->addUniform(GrGLProgramBuilder::kFragment_Vi
sibility, |
| 376 kVec4f_GrSLType, | 375 kVec4f_GrSLType, |
| 377 "ColorMatrixVector"); | 376 "ColorMatrixVector"); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 str->append("matrix: ("); | 502 str->append("matrix: ("); |
| 504 for (int i = 0; i < 20; ++i) { | 503 for (int i = 0; i < 20; ++i) { |
| 505 str->appendScalar(fMatrix.fMat[i]); | 504 str->appendScalar(fMatrix.fMat[i]); |
| 506 if (i < 19) { | 505 if (i < 19) { |
| 507 str->append(", "); | 506 str->append(", "); |
| 508 } | 507 } |
| 509 } | 508 } |
| 510 str->append(")"); | 509 str->append(")"); |
| 511 } | 510 } |
| 512 #endif | 511 #endif |
| OLD | NEW |