| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 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 | 8 |
| 9 #include "SkScan.h" | 9 #include "SkScan.h" |
| 10 #include "SkBlitter.h" | 10 #include "SkBlitter.h" |
| 11 #include "SkRasterClip.h" | 11 #include "SkRasterClip.h" |
| 12 | 12 |
| 13 std::atomic<bool> gSkUseAnalyticAA{false}; | 13 #ifdef SK_ANALYTIC_AA |
| 14 std::atomic<bool> gSkUseAnalyticAA{true}; |
| 15 #else |
| 16 std::atomic<bool> gSkUseAnalyticAA{false}; |
| 17 #endif |
| 14 | 18 |
| 15 static inline void blitrect(SkBlitter* blitter, const SkIRect& r) { | 19 static inline void blitrect(SkBlitter* blitter, const SkIRect& r) { |
| 16 blitter->blitRect(r.fLeft, r.fTop, r.width(), r.height()); | 20 blitter->blitRect(r.fLeft, r.fTop, r.width(), r.height()); |
| 17 } | 21 } |
| 18 | 22 |
| 19 void SkScan::FillIRect(const SkIRect& r, const SkRegion* clip, | 23 void SkScan::FillIRect(const SkIRect& r, const SkRegion* clip, |
| 20 SkBlitter* blitter) { | 24 SkBlitter* blitter) { |
| 21 if (!r.isEmpty()) { | 25 if (!r.isEmpty()) { |
| 22 if (clip) { | 26 if (clip) { |
| 23 if (clip->isRect()) { | 27 if (clip->isRect()) { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 105 } |
| 102 | 106 |
| 103 if (clip.isBW()) { | 107 if (clip.isBW()) { |
| 104 FillRect(r, &clip.bwRgn(), blitter); | 108 FillRect(r, &clip.bwRgn(), blitter); |
| 105 return; | 109 return; |
| 106 } | 110 } |
| 107 | 111 |
| 108 SkAAClipBlitterWrapper wrapper(clip, blitter); | 112 SkAAClipBlitterWrapper wrapper(clip, blitter); |
| 109 FillRect(r, &wrapper.getRgn(), wrapper.getBlitter()); | 113 FillRect(r, &wrapper.getRgn(), wrapper.getBlitter()); |
| 110 } | 114 } |
| OLD | NEW |