OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkBlitRow.h" | 8 #include "SkBlitRow.h" |
9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
10 #include "SkDither.h" | 10 #include "SkDither.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 S32A_D565_Blend, | 217 S32A_D565_Blend, |
218 | 218 |
219 // dither | 219 // dither |
220 S32_D565_Opaque_Dither, | 220 S32_D565_Opaque_Dither, |
221 S32_D565_Blend_Dither, | 221 S32_D565_Blend_Dither, |
222 | 222 |
223 S32A_D565_Opaque_Dither, | 223 S32A_D565_Opaque_Dither, |
224 S32A_D565_Blend_Dither | 224 S32A_D565_Blend_Dither |
225 }; | 225 }; |
226 | 226 |
227 SkBlitRow::Proc SkBlitRow::Factory(unsigned flags, SkBitmap::Config config) { | 227 SkBlitRow::Proc SkBlitRow::Factory(unsigned flags, SkColorType ct) { |
228 SkASSERT(flags < SK_ARRAY_COUNT(gDefault_565_Procs)); | 228 SkASSERT(flags < SK_ARRAY_COUNT(gDefault_565_Procs)); |
229 // just so we don't crash | 229 // just so we don't crash |
230 flags &= kFlags16_Mask; | 230 flags &= kFlags16_Mask; |
231 | 231 |
232 SkBlitRow::Proc proc = NULL; | 232 SkBlitRow::Proc proc = NULL; |
233 | 233 |
234 switch (config) { | 234 switch (ct) { |
235 case SkBitmap::kRGB_565_Config: | 235 case kRGB_565_SkColorType: |
236 proc = PlatformProcs565(flags); | 236 proc = PlatformProcs565(flags); |
237 if (NULL == proc) { | 237 if (NULL == proc) { |
238 proc = gDefault_565_Procs[flags]; | 238 proc = gDefault_565_Procs[flags]; |
239 } | 239 } |
240 break; | 240 break; |
241 default: | 241 default: |
242 break; | 242 break; |
243 } | 243 } |
244 return proc; | 244 return proc; |
245 } | 245 } |
OLD | NEW |