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

Side by Side Diff: src/core/SkBitmapProcState.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/SkBitmapProcShader.cpp ('k') | src/core/SkBitmapProcState.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 2007 The Android Open Source Project 2 * Copyright 2007 The Android Open Source Project
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 SkBitmapProcState_DEFINED 8 #ifndef SkBitmapProcState_DEFINED
9 #define SkBitmapProcState_DEFINED 9 #define SkBitmapProcState_DEFINED
10 10
(...skipping 14 matching lines...) Expand all
25 #define SkFixedToFractionalInt(x) SkFixedToFixed3232(x) 25 #define SkFixedToFractionalInt(x) SkFixedToFixed3232(x)
26 #define SkFractionalIntToInt(x) SkFixed3232ToInt(x) 26 #define SkFractionalIntToInt(x) SkFixed3232ToInt(x)
27 27
28 class SkPaint; 28 class SkPaint;
29 29
30 struct SkBitmapProcState { 30 struct SkBitmapProcState {
31 SkBitmapProcState(const SkBitmapProvider&, SkShader::TileMode tmx, SkShader: :TileMode tmy); 31 SkBitmapProcState(const SkBitmapProvider&, SkShader::TileMode tmx, SkShader: :TileMode tmy);
32 SkBitmapProcState(const SkBitmap&, SkShader::TileMode tmx, SkShader::TileMod e tmy); 32 SkBitmapProcState(const SkBitmap&, SkShader::TileMode tmx, SkShader::TileMod e tmy);
33 ~SkBitmapProcState(); 33 ~SkBitmapProcState();
34 34
35 typedef void (*ShaderProc32)(const SkBitmapProcState&, int x, int y, 35 typedef void (*ShaderProc32)(const void* ctx, int x, int y, SkPMColor[], int count);
36 SkPMColor[], int count);
37 36
38 typedef void (*ShaderProc16)(const SkBitmapProcState&, int x, int y, 37 typedef void (*ShaderProc16)(const void* ctx, int x, int y, uint16_t[], int count);
39 uint16_t[], int count);
40 38
41 typedef void (*MatrixProc)(const SkBitmapProcState&, 39 typedef void (*MatrixProc)(const SkBitmapProcState&,
42 uint32_t bitmapXY[], 40 uint32_t bitmapXY[],
43 int count, 41 int count,
44 int x, int y); 42 int x, int y);
45 43
46 typedef void (*SampleProc32)(const SkBitmapProcState&, 44 typedef void (*SampleProc32)(const SkBitmapProcState&,
47 const uint32_t[], 45 const uint32_t[],
48 int count, 46 int count,
49 SkPMColor colors[]); 47 SkPMColor colors[]);
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 } 221 }
224 222
225 SkFixed x() const { return fX; } 223 SkFixed x() const { return fX; }
226 SkFixed y() const { return fY; } 224 SkFixed y() const { return fY; }
227 225
228 private: 226 private:
229 SkFixed fX, fY; 227 SkFixed fX, fY;
230 }; 228 };
231 229
232 #endif 230 #endif
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkBitmapProcState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698