| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 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 "SkArithmeticMode.h" | 8 #include "SkArithmeticMode.h" |
| 9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
| 10 #include "SkFlattenableBuffers.h" | 10 #include "SkFlattenableBuffers.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 } | 224 } |
| 225 if (0 == i3) { | 225 if (0 == i3) { |
| 226 return SkNEW_ARGS(SkArithmeticMode_src, (i2, i4)); | 226 return SkNEW_ARGS(SkArithmeticMode_src, (i2, i4)); |
| 227 } | 227 } |
| 228 return SkNEW_ARGS(SkArithmeticMode_linear, (i2, i3, i4)); | 228 return SkNEW_ARGS(SkArithmeticMode_linear, (i2, i3, i4)); |
| 229 #endif | 229 #endif |
| 230 } | 230 } |
| 231 return SkNEW_ARGS(SkArithmeticMode_scalar, (k1, k2, k3, k4)); | 231 return SkNEW_ARGS(SkArithmeticMode_scalar, (k1, k2, k3, k4)); |
| 232 } | 232 } |
| 233 | 233 |
| 234 | |
| 235 ////////////////////////////////////////////////////////////////////////////// | 234 ////////////////////////////////////////////////////////////////////////////// |
| 236 | 235 |
| 237 #if SK_SUPPORT_GPU | 236 #if SK_SUPPORT_GPU |
| 238 | 237 |
| 239 class GrGLArithmeticEffect : public GrGLEffect { | 238 class GrGLArithmeticEffect : public GrGLEffect { |
| 240 public: | 239 public: |
| 241 GrGLArithmeticEffect(const GrBackendEffectFactory&, const GrDrawEffect&); | 240 GrGLArithmeticEffect(const GrBackendEffectFactory&, const GrDrawEffect&); |
| 242 virtual ~GrGLArithmeticEffect(); | 241 virtual ~GrGLArithmeticEffect(); |
| 243 | 242 |
| 244 virtual void emitCode(GrGLShaderBuilder*, | 243 virtual void emitCode(GrGLShaderBuilder*, |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 background); | 420 background); |
| 422 } | 421 } |
| 423 return true; | 422 return true; |
| 424 } | 423 } |
| 425 | 424 |
| 426 #endif | 425 #endif |
| 427 | 426 |
| 428 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) | 427 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) |
| 429 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) | 428 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) |
| 430 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 429 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |