| 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 "SkAtomics.h" |    10 #include "SkAtomics.h" | 
| (...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2158  |  2158  | 
|  2159     if (fAAClip->quickContains(clip)) { |  2159     if (fAAClip->quickContains(clip)) { | 
|  2160         fBlitter->blitMask(origMask, clip); |  2160         fBlitter->blitMask(origMask, clip); | 
|  2161         return; |  2161         return; | 
|  2162     } |  2162     } | 
|  2163  |  2163  | 
|  2164     const SkMask* mask = &origMask; |  2164     const SkMask* mask = &origMask; | 
|  2165  |  2165  | 
|  2166     // if we're BW, we need to upscale to A8 (ugh) |  2166     // if we're BW, we need to upscale to A8 (ugh) | 
|  2167     SkMask  grayMask; |  2167     SkMask  grayMask; | 
|  2168     grayMask.fImage = nullptr; |  | 
|  2169     if (SkMask::kBW_Format == origMask.fFormat) { |  2168     if (SkMask::kBW_Format == origMask.fFormat) { | 
|  2170         grayMask.fFormat = SkMask::kA8_Format; |  2169         grayMask.fFormat = SkMask::kA8_Format; | 
|  2171         grayMask.fBounds = origMask.fBounds; |  2170         grayMask.fBounds = origMask.fBounds; | 
|  2172         grayMask.fRowBytes = origMask.fBounds.width(); |  2171         grayMask.fRowBytes = origMask.fBounds.width(); | 
|  2173         size_t size = grayMask.computeImageSize(); |  2172         size_t size = grayMask.computeImageSize(); | 
|  2174         grayMask.fImage = (uint8_t*)fGrayMaskScratch.reset(size, |  2173         grayMask.fImage = (uint8_t*)fGrayMaskScratch.reset(size, | 
|  2175                                                SkAutoMalloc::kReuse_OnShrink); |  2174                                                SkAutoMalloc::kReuse_OnShrink); | 
|  2176  |  2175  | 
|  2177         upscaleBW2A8(&grayMask, origMask); |  2176         upscaleBW2A8(&grayMask, origMask); | 
|  2178         mask = &grayMask; |  2177         mask = &grayMask; | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2212             rowMask.fBounds.fBottom = y + 1; |  2211             rowMask.fBounds.fBottom = y + 1; | 
|  2213             fBlitter->blitMask(rowMask, rowMask.fBounds); |  2212             fBlitter->blitMask(rowMask, rowMask.fBounds); | 
|  2214             src = (const void*)((const char*)src + srcRB); |  2213             src = (const void*)((const char*)src + srcRB); | 
|  2215         } while (++y < localStopY); |  2214         } while (++y < localStopY); | 
|  2216     } while (y < stopY); |  2215     } while (y < stopY); | 
|  2217 } |  2216 } | 
|  2218  |  2217  | 
|  2219 const SkPixmap* SkAAClipBlitter::justAnOpaqueColor(uint32_t* value) { |  2218 const SkPixmap* SkAAClipBlitter::justAnOpaqueColor(uint32_t* value) { | 
|  2220     return nullptr; |  2219     return nullptr; | 
|  2221 } |  2220 } | 
| OLD | NEW |