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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 return SkColorFilter::CreateModeFilter(color, mode); | 62 return SkColorFilter::CreateModeFilter(color, mode); |
63 } | 63 } |
64 | 64 |
65 /////////////////////////////////////////////////////////////////////////////// | 65 /////////////////////////////////////////////////////////////////////////////// |
66 #if SK_SUPPORT_GPU | 66 #if SK_SUPPORT_GPU |
67 #include "GrBlend.h" | 67 #include "GrBlend.h" |
68 #include "GrFragmentProcessor.h" | 68 #include "GrFragmentProcessor.h" |
69 #include "GrInvariantOutput.h" | 69 #include "GrInvariantOutput.h" |
70 #include "GrProcessorUnitTest.h" | 70 #include "GrProcessorUnitTest.h" |
71 #include "SkGr.h" | 71 #include "SkGr.h" |
72 #include "gl/GrGLProcessor.h" | 72 #include "gl/GrGLFragmentProcessor.h" |
73 #include "gl/builders/GrGLProgramBuilder.h" | 73 #include "gl/builders/GrGLProgramBuilder.h" |
74 | 74 |
75 namespace { | 75 namespace { |
76 /** | 76 /** |
77 * A definition of blend equation for one coefficient. Generates a | 77 * A definition of blend equation for one coefficient. Generates a |
78 * blend_coeff * value "expression". | 78 * blend_coeff * value "expression". |
79 */ | 79 */ |
80 template<typename ColorExpr> | 80 template<typename ColorExpr> |
81 static inline ColorExpr blend_term(SkXfermode::Coeff coeff, | 81 static inline ColorExpr blend_term(SkXfermode::Coeff coeff, |
82 const ColorExpr& src, | 82 const ColorExpr& src, |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 byte_to_scale(SkColorGetG(mul)), | 466 byte_to_scale(SkColorGetG(mul)), |
467 byte_to_scale(SkColorGetB(mul)), | 467 byte_to_scale(SkColorGetB(mul)), |
468 1); | 468 1); |
469 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)), | 469 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)), |
470 SkIntToScalar(SkColorGetG(add)), | 470 SkIntToScalar(SkColorGetG(add)), |
471 SkIntToScalar(SkColorGetB(add)), | 471 SkIntToScalar(SkColorGetB(add)), |
472 0); | 472 0); |
473 return SkColorMatrixFilter::Create(matrix); | 473 return SkColorMatrixFilter::Create(matrix); |
474 } | 474 } |
475 | 475 |
OLD | NEW |