| 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 #ifdef SK_NO_ANALYTIC_AA | 13 #ifdef SK_ANALYTIC_AA |
| 14 std::atomic<bool> gSkUseAnalyticAA{true}; |
| 15 #else |
| 14 std::atomic<bool> gSkUseAnalyticAA{false}; | 16 std::atomic<bool> gSkUseAnalyticAA{false}; |
| 15 #else | |
| 16 std::atomic<bool> gSkUseAnalyticAA{true}; | |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 static inline void blitrect(SkBlitter* blitter, const SkIRect& r) { | 19 static inline void blitrect(SkBlitter* blitter, const SkIRect& r) { |
| 20 blitter->blitRect(r.fLeft, r.fTop, r.width(), r.height()); | 20 blitter->blitRect(r.fLeft, r.fTop, r.width(), r.height()); |
| 21 } | 21 } |
| 22 | 22 |
| 23 void SkScan::FillIRect(const SkIRect& r, const SkRegion* clip, | 23 void SkScan::FillIRect(const SkIRect& r, const SkRegion* clip, |
| 24 SkBlitter* blitter) { | 24 SkBlitter* blitter) { |
| 25 if (!r.isEmpty()) { | 25 if (!r.isEmpty()) { |
| 26 if (clip) { | 26 if (clip) { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } | 105 } |
| 106 | 106 |
| 107 if (clip.isBW()) { | 107 if (clip.isBW()) { |
| 108 FillRect(r, &clip.bwRgn(), blitter); | 108 FillRect(r, &clip.bwRgn(), blitter); |
| 109 return; | 109 return; |
| 110 } | 110 } |
| 111 | 111 |
| 112 SkAAClipBlitterWrapper wrapper(clip, blitter); | 112 SkAAClipBlitterWrapper wrapper(clip, blitter); |
| 113 FillRect(r, &wrapper.getRgn(), wrapper.getBlitter()); | 113 FillRect(r, &wrapper.getRgn(), wrapper.getBlitter()); |
| 114 } | 114 } |
| OLD | NEW |