| 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 #ifndef SkBlitMask_DEFINED | 8 #ifndef SkBlitMask_DEFINED |
| 9 #define SkBlitMask_DEFINED | 9 #define SkBlitMask_DEFINED |
| 10 | 10 |
| 11 #include "SkBitmap.h" | |
| 12 #include "SkColor.h" | 11 #include "SkColor.h" |
| 13 #include "SkMask.h" | 12 #include "SkMask.h" |
| 13 #include "SkPixmap.h" |
| 14 | 14 |
| 15 class SkBlitMask { | 15 class SkBlitMask { |
| 16 public: | 16 public: |
| 17 /** | 17 /** |
| 18 * Returns true if the device config and mask format were supported. | 18 * Returns true if the device config and mask format were supported. |
| 19 * else return false (nothing was drawn) | 19 * else return false (nothing was drawn) |
| 20 */ | 20 */ |
| 21 static bool BlitColor(const SkBitmap& device, const SkMask& mask, | 21 static bool BlitColor(const SkPixmap& device, const SkMask& mask, |
| 22 const SkIRect& clip, SkColor color); | 22 const SkIRect& clip, SkColor color); |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * Function pointer that blits the mask into a device (dst) colorized | 25 * Function pointer that blits the mask into a device (dst) colorized |
| 26 * by color. The number of pixels to blit is specified by width and height, | 26 * by color. The number of pixels to blit is specified by width and height, |
| 27 * but each scanline is offset by dstRB (rowbytes) and srcRB respectively. | 27 * but each scanline is offset by dstRB (rowbytes) and srcRB respectively. |
| 28 */ | 28 */ |
| 29 typedef void (*ColorProc)(void* dst, size_t dstRB, | 29 typedef void (*ColorProc)(void* dst, size_t dstRB, |
| 30 const void* mask, size_t maskRB, | 30 const void* mask, size_t maskRB, |
| 31 SkColor color, int width, int height); | 31 SkColor color, int width, int height); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 static RowProc RowFactory(SkColorType, SkMask::Format, RowFlags); | 81 static RowProc RowFactory(SkColorType, SkMask::Format, RowFlags); |
| 82 | 82 |
| 83 /** | 83 /** |
| 84 * Return either platform specific optimized blitmask RowProc, | 84 * Return either platform specific optimized blitmask RowProc, |
| 85 * or NULL if no optimized routine is available. | 85 * or NULL if no optimized routine is available. |
| 86 */ | 86 */ |
| 87 static RowProc PlatformRowProcs(SkColorType, SkMask::Format, RowFlags); | 87 static RowProc PlatformRowProcs(SkColorType, SkMask::Format, RowFlags); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 #endif | 90 #endif |
| OLD | NEW |