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 "SkReadBuffer.h" | 10 #include "SkReadBuffer.h" |
11 #include "SkWriteBuffer.h" | 11 #include "SkWriteBuffer.h" |
12 #include "SkString.h" | 12 #include "SkString.h" |
13 #include "SkUnPreMultiply.h" | 13 #include "SkUnPreMultiply.h" |
14 #if SK_SUPPORT_GPU | 14 #if SK_SUPPORT_GPU |
15 #include "GrContext.h" | 15 #include "GrContext.h" |
16 #include "GrCoordTransform.h" | 16 #include "GrCoordTransform.h" |
17 #include "gl/GrGLEffect.h" | 17 #include "gl/GrGLEffect.h" |
| 18 #include "gl/GrGLShaderBuilder.h" |
18 #include "GrTBackendEffectFactory.h" | 19 #include "GrTBackendEffectFactory.h" |
19 #endif | 20 #endif |
20 | 21 |
21 static const bool gUseUnpremul = false; | 22 static const bool gUseUnpremul = false; |
22 | 23 |
23 class SkArithmeticMode_scalar : public SkXfermode { | 24 class SkArithmeticMode_scalar : public SkXfermode { |
24 public: | 25 public: |
25 static SkArithmeticMode_scalar* Create(SkScalar k1, SkScalar k2, SkScalar k3
, SkScalar k4, | 26 static SkArithmeticMode_scalar* Create(SkScalar k1, SkScalar k2, SkScalar k3
, SkScalar k4, |
26 bool enforcePMColor) { | 27 bool enforcePMColor) { |
27 return SkNEW_ARGS(SkArithmeticMode_scalar, (k1, k2, k3, k4, enforcePMCol
or)); | 28 return SkNEW_ARGS(SkArithmeticMode_scalar, (k1, k2, k3, k4, enforcePMCol
or)); |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 background); | 436 background); |
436 } | 437 } |
437 return true; | 438 return true; |
438 } | 439 } |
439 | 440 |
440 #endif | 441 #endif |
441 | 442 |
442 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) | 443 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) |
443 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) | 444 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) |
444 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 445 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |