| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 "SkBlitRow.h" | 8 #include "SkBlitRow.h" |
| 9 #include "SkColorFilter.h" | 9 #include "SkColorFilter.h" |
| 10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 GrColor color() const { return fColor; } | 216 GrColor color() const { return fColor; } |
| 217 | 217 |
| 218 class GLProcessor : public GrGLFragmentProcessor { | 218 class GLProcessor : public GrGLFragmentProcessor { |
| 219 public: | 219 public: |
| 220 GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&
) | 220 GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&
) |
| 221 : INHERITED(factory) { | 221 : INHERITED(factory) { |
| 222 } | 222 } |
| 223 | 223 |
| 224 virtual void emitCode(GrGLFPBuilder* builder, | 224 virtual void emitCode(GrGLFPBuilder* builder, |
| 225 const GrFragmentProcessor& fp, | 225 const GrFragmentProcessor& fp, |
| 226 const GrProcessorKey&, | |
| 227 const char* outputColor, | 226 const char* outputColor, |
| 228 const char* inputColor, | 227 const char* inputColor, |
| 229 const TransformedCoordsArray&, | 228 const TransformedCoordsArray&, |
| 230 const TextureSamplerArray&) SK_OVERRIDE { | 229 const TextureSamplerArray&) SK_OVERRIDE { |
| 231 SkXfermode::Mode mode = fp.cast<ModeColorFilterEffect>().mode(); | 230 SkXfermode::Mode mode = fp.cast<ModeColorFilterEffect>().mode(); |
| 232 | 231 |
| 233 SkASSERT(SkXfermode::kDst_Mode != mode); | 232 SkASSERT(SkXfermode::kDst_Mode != mode); |
| 234 const char* colorFilterColorUniName = NULL; | 233 const char* colorFilterColorUniName = NULL; |
| 235 if (fp.cast<ModeColorFilterEffect>().willUseFilterColor()) { | 234 if (fp.cast<ModeColorFilterEffect>().willUseFilterColor()) { |
| 236 fFilterColorUni = builder->addUniform(GrGLProgramBuilder::kFragm
ent_Visibility, | 235 fFilterColorUni = builder->addUniform(GrGLProgramBuilder::kFragm
ent_Visibility, |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)), | 550 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)), |
| 552 SkIntToScalar(SkColorGetG(add)), | 551 SkIntToScalar(SkColorGetG(add)), |
| 553 SkIntToScalar(SkColorGetB(add)), | 552 SkIntToScalar(SkColorGetB(add)), |
| 554 0); | 553 0); |
| 555 return SkColorMatrixFilter::Create(matrix); | 554 return SkColorMatrixFilter::Create(matrix); |
| 556 } | 555 } |
| 557 | 556 |
| 558 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter) | 557 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter) |
| 559 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkModeColorFilter) | 558 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkModeColorFilter) |
| 560 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 559 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |