Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(626)

Side by Side Diff: src/core/SkBlitMask.h

Issue 1530743002: Fix UB function problems for shaders and mask. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix 16-bit masks Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkBitmapProcState_shaderproc.h ('k') | src/core/SkBlitMask_D32.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 26 matching lines...) Expand all
37 */ 37 */
38 typedef void (*BlitLCD16RowProc)(SkPMColor dst[], const uint16_t src[], 38 typedef void (*BlitLCD16RowProc)(SkPMColor dst[], const uint16_t src[],
39 SkColor color, int width, 39 SkColor color, int width,
40 SkPMColor opaqueDst); 40 SkPMColor opaqueDst);
41 41
42 /** 42 /**
43 * Function pointer that blits a row of src colors through a row of a mask 43 * Function pointer that blits a row of src colors through a row of a mask
44 * onto a row of dst colors. The RowFactory that returns this function ptr 44 * onto a row of dst colors. The RowFactory that returns this function ptr
45 * will have been told the formats for the mask and the dst. 45 * will have been told the formats for the mask and the dst.
46 */ 46 */
47 typedef void (*RowProc)(void* dst, const void* mask, 47 typedef void (*RowProc)(SkPMColor* dst, const void* mask,
48 const SkPMColor* src, int width); 48 const SkPMColor* src, int width);
49 49
50 /** 50 /**
51 * Public entry-point to return a blitcolor BlitLCD16RowProc. 51 * Public entry-point to return a blitcolor BlitLCD16RowProc.
52 */ 52 */
53 static BlitLCD16RowProc BlitLCD16RowFactory(bool isOpaque); 53 static BlitLCD16RowProc BlitLCD16RowFactory(bool isOpaque);
54 54
55 /** 55 /**
56 * Return either platform specific optimized blitcolor BlitLCD16RowProc, 56 * Return either platform specific optimized blitcolor BlitLCD16RowProc,
57 * or nullptr if no optimized routine is available. 57 * or nullptr if no optimized routine is available.
(...skipping 11 matching lines...) Expand all
69 static RowProc RowFactory(SkColorType, SkMask::Format, RowFlags); 69 static RowProc RowFactory(SkColorType, SkMask::Format, RowFlags);
70 70
71 /** 71 /**
72 * Return either platform specific optimized blitmask RowProc, 72 * Return either platform specific optimized blitmask RowProc,
73 * or nullptr if no optimized routine is available. 73 * or nullptr if no optimized routine is available.
74 */ 74 */
75 static RowProc PlatformRowProcs(SkColorType, SkMask::Format, RowFlags); 75 static RowProc PlatformRowProcs(SkColorType, SkMask::Format, RowFlags);
76 }; 76 };
77 77
78 #endif 78 #endif
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcState_shaderproc.h ('k') | src/core/SkBlitMask_D32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698