OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
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 #include "SkAAClip.h" | 9 #include "SkAAClip.h" |
10 #include "SkBlitter.h" | 10 #include "SkBlitter.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #ifdef SK_DEBUG | 29 #ifdef SK_DEBUG |
30 #define AUTO_AACLIP_VALIDATE(clip) AutoAAClipValidate acv(clip) | 30 #define AUTO_AACLIP_VALIDATE(clip) AutoAAClipValidate acv(clip) |
31 #else | 31 #else |
32 #define AUTO_AACLIP_VALIDATE(clip) | 32 #define AUTO_AACLIP_VALIDATE(clip) |
33 #endif | 33 #endif |
34 | 34 |
35 /////////////////////////////////////////////////////////////////////////////// | 35 /////////////////////////////////////////////////////////////////////////////// |
36 | 36 |
37 #define kMaxInt32 0x7FFFFFFF | 37 #define kMaxInt32 0x7FFFFFFF |
38 | 38 |
| 39 #ifdef SK_DEBUG |
39 static inline bool x_in_rect(int x, const SkIRect& rect) { | 40 static inline bool x_in_rect(int x, const SkIRect& rect) { |
40 return (unsigned)(x - rect.fLeft) < (unsigned)rect.width(); | 41 return (unsigned)(x - rect.fLeft) < (unsigned)rect.width(); |
41 } | 42 } |
| 43 #endif |
42 | 44 |
43 static inline bool y_in_rect(int y, const SkIRect& rect) { | 45 static inline bool y_in_rect(int y, const SkIRect& rect) { |
44 return (unsigned)(y - rect.fTop) < (unsigned)rect.height(); | 46 return (unsigned)(y - rect.fTop) < (unsigned)rect.height(); |
45 } | 47 } |
46 | 48 |
47 /* | 49 /* |
48 * Data runs are packed [count, alpha] | 50 * Data runs are packed [count, alpha] |
49 */ | 51 */ |
50 | 52 |
51 struct SkAAClip::YOffset { | 53 struct SkAAClip::YOffset { |
(...skipping 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2158 rowMask.fBounds.fBottom = y + 1; | 2160 rowMask.fBounds.fBottom = y + 1; |
2159 fBlitter->blitMask(rowMask, rowMask.fBounds); | 2161 fBlitter->blitMask(rowMask, rowMask.fBounds); |
2160 src = (const void*)((const char*)src + srcRB); | 2162 src = (const void*)((const char*)src + srcRB); |
2161 } while (++y < localStopY); | 2163 } while (++y < localStopY); |
2162 } while (y < stopY); | 2164 } while (y < stopY); |
2163 } | 2165 } |
2164 | 2166 |
2165 const SkBitmap* SkAAClipBlitter::justAnOpaqueColor(uint32_t* value) { | 2167 const SkBitmap* SkAAClipBlitter::justAnOpaqueColor(uint32_t* value) { |
2166 return NULL; | 2168 return NULL; |
2167 } | 2169 } |
OLD | NEW |