| 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 SkBlitRow_DEFINED | 8 #ifndef SkBlitRow_DEFINED |
| 9 #define SkBlitRow_DEFINED | 9 #define SkBlitRow_DEFINED |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 typedef void (*ColorRectProc)(SkPMColor* dst, int width, int height, | 77 typedef void (*ColorRectProc)(SkPMColor* dst, int width, int height, |
| 78 size_t rowBytes, SkPMColor color); | 78 size_t rowBytes, SkPMColor color); |
| 79 | 79 |
| 80 /** Blend a single color into a rectangle of D32 pixels. */ | 80 /** Blend a single color into a rectangle of D32 pixels. */ |
| 81 static void ColorRect32(SkPMColor* dst, int width, int height, | 81 static void ColorRect32(SkPMColor* dst, int width, int height, |
| 82 size_t rowBytes, SkPMColor color); | 82 size_t rowBytes, SkPMColor color); |
| 83 | 83 |
| 84 //! Public entry-point to return a blit function ptr | 84 //! Public entry-point to return a blit function ptr |
| 85 static ColorRectProc ColorRectProcFactory(); | 85 static ColorRectProc ColorRectProcFactory(); |
| 86 | 86 |
| 87 /** blend a single color into a row of D16 pixels. */ |
| 88 typedef void (*Blend32_16_row_Proc)(const SkPMColor* SK_RESTRICT src, |
| 89 uint16_t dst[], int count); |
| 90 |
| 91 //! Public entry-point to return a blend32_16_row function ptr |
| 92 static Blend32_16_row_Proc Blend32_16_rowProcFactory(); |
| 93 |
| 87 /** These static functions are called by the Factory and Factory32 | 94 /** These static functions are called by the Factory and Factory32 |
| 88 functions, and should return either NULL, or a | 95 functions, and should return either NULL, or a |
| 89 platform-specific function-ptr to be used in place of the | 96 platform-specific function-ptr to be used in place of the |
| 90 system default. | 97 system default. |
| 91 */ | 98 */ |
| 92 | 99 |
| 93 static Proc32 PlatformProcs32(unsigned flags); | 100 static Proc32 PlatformProcs32(unsigned flags); |
| 94 static Proc PlatformProcs565(unsigned flags); | 101 static Proc PlatformProcs565(unsigned flags); |
| 95 static ColorProc PlatformColorProc(); | 102 static ColorProc PlatformColorProc(); |
| 103 static Blend32_16_row_Proc PlatformBlend32_16_rowProc(); |
| 96 | 104 |
| 97 private: | 105 private: |
| 98 enum { | 106 enum { |
| 99 kFlags16_Mask = 7, | 107 kFlags16_Mask = 7, |
| 100 kFlags32_Mask = 3 | 108 kFlags32_Mask = 3 |
| 101 }; | 109 }; |
| 102 }; | 110 }; |
| 103 | 111 |
| 104 #endif | 112 #endif |
| OLD | NEW |