| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkSpriteBlitter.h" | 10 #include "SkSpriteBlitter.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 271 |
| 272 if (paint.getAlpha() < 0xFF) { | 272 if (paint.getAlpha() < 0xFF) { |
| 273 flags |= SkBlitRow::kGlobalAlpha_Flag; | 273 flags |= SkBlitRow::kGlobalAlpha_Flag; |
| 274 } | 274 } |
| 275 if (!fSource->isOpaque()) { | 275 if (!fSource->isOpaque()) { |
| 276 flags |= SkBlitRow::kSrcPixelAlpha_Flag; | 276 flags |= SkBlitRow::kSrcPixelAlpha_Flag; |
| 277 } | 277 } |
| 278 if (paint.isDither()) { | 278 if (paint.isDither()) { |
| 279 flags |= SkBlitRow::kDither_Flag; | 279 flags |= SkBlitRow::kDither_Flag; |
| 280 } | 280 } |
| 281 fProc = SkBlitRow::Factory(flags, SkBitmap::kRGB_565_Config); | 281 fProc = SkBlitRow::Factory(flags, kRGB_565_SkColorType); |
| 282 } | 282 } |
| 283 | 283 |
| 284 virtual void blitRect(int x, int y, int width, int height) { | 284 virtual void blitRect(int x, int y, int width, int height) { |
| 285 uint16_t* SK_RESTRICT dst = fDevice->getAddr16(x, y); | 285 uint16_t* SK_RESTRICT dst = fDevice->getAddr16(x, y); |
| 286 const SkPMColor* SK_RESTRICT src = fSource->getAddr32(x - fLeft, | 286 const SkPMColor* SK_RESTRICT src = fSource->getAddr32(x - fLeft, |
| 287 y - fTop); | 287 y - fTop); |
| 288 size_t dstRB = fDevice->rowBytes(); | 288 size_t dstRB = fDevice->rowBytes(); |
| 289 size_t srcRB = fSource->rowBytes(); | 289 size_t srcRB = fSource->rowBytes(); |
| 290 SkBlitRow::Proc proc = fProc; | 290 SkBlitRow::Proc proc = fProc; |
| 291 U8CPU alpha = fPaint->getAlpha(); | 291 U8CPU alpha = fPaint->getAlpha(); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 } else { | 360 } else { |
| 361 blitter = allocator->createT<Sprite_D16_SIndex8A_Blend>(sour
ce, alpha); | 361 blitter = allocator->createT<Sprite_D16_SIndex8A_Blend>(sour
ce, alpha); |
| 362 } | 362 } |
| 363 } | 363 } |
| 364 break; | 364 break; |
| 365 default: | 365 default: |
| 366 break; | 366 break; |
| 367 } | 367 } |
| 368 return blitter; | 368 return blitter; |
| 369 } | 369 } |
| OLD | NEW |