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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 SkFlattenable* SkModeColorFilter::CreateProc(SkReadBuffer& buffer) { | 117 SkFlattenable* SkModeColorFilter::CreateProc(SkReadBuffer& buffer) { |
118 SkColor color = buffer.readColor(); | 118 SkColor color = buffer.readColor(); |
119 SkXfermode::Mode mode = (SkXfermode::Mode)buffer.readUInt(); | 119 SkXfermode::Mode mode = (SkXfermode::Mode)buffer.readUInt(); |
120 return SkColorFilter::CreateModeFilter(color, mode); | 120 return SkColorFilter::CreateModeFilter(color, mode); |
121 } | 121 } |
122 | 122 |
123 /////////////////////////////////////////////////////////////////////////////// | 123 /////////////////////////////////////////////////////////////////////////////// |
124 #if SK_SUPPORT_GPU | 124 #if SK_SUPPORT_GPU |
125 #include "GrBlend.h" | 125 #include "GrBlend.h" |
126 #include "GrProcessor.h" | 126 #include "GrFragmentProcessor.h" |
127 #include "GrProcessorUnitTest.h" | 127 #include "GrProcessorUnitTest.h" |
128 #include "GrTBackendProcessorFactory.h" | 128 #include "GrTBackendProcessorFactory.h" |
129 #include "gl/GrGLProcessor.h" | 129 #include "gl/GrGLProcessor.h" |
130 #include "gl/builders/GrGLProgramBuilder.h" | 130 #include "gl/builders/GrGLProgramBuilder.h" |
131 #include "SkGr.h" | 131 #include "SkGr.h" |
132 | 132 |
133 namespace { | 133 namespace { |
134 /** | 134 /** |
135 * A definition of blend equation for one coefficient. Generates a | 135 * A definition of blend equation for one coefficient. Generates a |
136 * blend_coeff * value "expression". | 136 * blend_coeff * value "expression". |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)), | 550 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)), |
551 SkIntToScalar(SkColorGetG(add)), | 551 SkIntToScalar(SkColorGetG(add)), |
552 SkIntToScalar(SkColorGetB(add)), | 552 SkIntToScalar(SkColorGetB(add)), |
553 0); | 553 0); |
554 return SkColorMatrixFilter::Create(matrix); | 554 return SkColorMatrixFilter::Create(matrix); |
555 } | 555 } |
556 | 556 |
557 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter) | 557 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter) |
558 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkModeColorFilter) | 558 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkModeColorFilter) |
559 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 559 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |