| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 213 |
| 214 SkXfermode::Mode mode() const { return fMode; } | 214 SkXfermode::Mode mode() const { return fMode; } |
| 215 GrColor color() const { return fColor; } | 215 GrColor color() const { return fColor; } |
| 216 | 216 |
| 217 class GLProcessor : public GrGLFragmentProcessor { | 217 class GLProcessor : public GrGLFragmentProcessor { |
| 218 public: | 218 public: |
| 219 GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&
) | 219 GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&
) |
| 220 : INHERITED(factory) { | 220 : INHERITED(factory) { |
| 221 } | 221 } |
| 222 | 222 |
| 223 virtual void emitCode(GrGLProgramBuilder* builder, | 223 virtual void emitCode(GrGLFPBuilder* builder, |
| 224 const GrFragmentProcessor& fp, | 224 const GrFragmentProcessor& fp, |
| 225 const GrProcessorKey&, | 225 const GrProcessorKey&, |
| 226 const char* outputColor, | 226 const char* outputColor, |
| 227 const char* inputColor, | 227 const char* inputColor, |
| 228 const TransformedCoordsArray&, | 228 const TransformedCoordsArray&, |
| 229 const TextureSamplerArray&) SK_OVERRIDE { | 229 const TextureSamplerArray&) SK_OVERRIDE { |
| 230 SkXfermode::Mode mode = fp.cast<ModeColorFilterEffect>().mode(); | 230 SkXfermode::Mode mode = fp.cast<ModeColorFilterEffect>().mode(); |
| 231 | 231 |
| 232 SkASSERT(SkXfermode::kDst_Mode != mode); | 232 SkASSERT(SkXfermode::kDst_Mode != mode); |
| 233 const char* colorFilterColorUniName = NULL; | 233 const char* colorFilterColorUniName = NULL; |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)), | 552 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)), |
| 553 SkIntToScalar(SkColorGetG(add)), | 553 SkIntToScalar(SkColorGetG(add)), |
| 554 SkIntToScalar(SkColorGetB(add)), | 554 SkIntToScalar(SkColorGetB(add)), |
| 555 0); | 555 0); |
| 556 return SkColorMatrixFilter::Create(matrix); | 556 return SkColorMatrixFilter::Create(matrix); |
| 557 } | 557 } |
| 558 | 558 |
| 559 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter) | 559 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter) |
| 560 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkModeColorFilter) | 560 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkModeColorFilter) |
| 561 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 561 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |