| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkCodecPriv.h" | 8 #include "SkCodecPriv.h" |
| 9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
| 10 #include "SkMaskSwizzler.h" | 10 #include "SkMaskSwizzler.h" |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 } | 314 } |
| 315 break; | 315 break; |
| 316 default: | 316 default: |
| 317 break; | 317 break; |
| 318 } | 318 } |
| 319 break; | 319 break; |
| 320 default: | 320 default: |
| 321 SkASSERT(false); | 321 SkASSERT(false); |
| 322 return NULL; | 322 return NULL; |
| 323 } | 323 } |
| 324 return SkNEW_ARGS(SkMaskSwizzler, (info, masks, proc)); | 324 return new SkMaskSwizzler(info, masks, proc); |
| 325 } | 325 } |
| 326 | 326 |
| 327 /* | 327 /* |
| 328 * | 328 * |
| 329 * Constructor for mask swizzler | 329 * Constructor for mask swizzler |
| 330 * | 330 * |
| 331 */ | 331 */ |
| 332 SkMaskSwizzler::SkMaskSwizzler(const SkImageInfo& dstInfo, SkMasks* masks, | 332 SkMaskSwizzler::SkMaskSwizzler(const SkImageInfo& dstInfo, SkMasks* masks, |
| 333 RowProc proc) | 333 RowProc proc) |
| 334 : fDstInfo(dstInfo) | 334 : fDstInfo(dstInfo) |
| 335 , fMasks(masks) | 335 , fMasks(masks) |
| 336 , fRowProc(proc) | 336 , fRowProc(proc) |
| 337 {} | 337 {} |
| 338 | 338 |
| 339 /* | 339 /* |
| 340 * | 340 * |
| 341 * Swizzle the specified row | 341 * Swizzle the specified row |
| 342 * | 342 * |
| 343 */ | 343 */ |
| 344 SkSwizzler::ResultAlpha SkMaskSwizzler::swizzle(void* dst, const uint8_t* SK_RES
TRICT src) { | 344 SkSwizzler::ResultAlpha SkMaskSwizzler::swizzle(void* dst, const uint8_t* SK_RES
TRICT src) { |
| 345 SkASSERT(NULL != dst && NULL != src); | 345 SkASSERT(NULL != dst && NULL != src); |
| 346 return fRowProc(dst, src, fDstInfo.width(), fMasks); | 346 return fRowProc(dst, src, fDstInfo.width(), fMasks); |
| 347 } | 347 } |
| OLD | NEW |