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 #define __STDC_LIMIT_MACROS | 7 #define __STDC_LIMIT_MACROS |
8 | 8 |
9 #include "SkDraw.h" | 9 #include "SkDraw.h" |
10 #include "SkBlitter.h" | 10 #include "SkBlitter.h" |
(...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 SkScalar matrixScale = paint.setupForAsPaths(); | 1687 SkScalar matrixScale = paint.setupForAsPaths(); |
1688 | 1688 |
1689 SkMatrix matrix; | 1689 SkMatrix matrix; |
1690 matrix.setScale(matrixScale, matrixScale); | 1690 matrix.setScale(matrixScale, matrixScale); |
1691 | 1691 |
1692 // Temporarily jam in kFill, so we only ever ask for the raw outline from th
e cache. | 1692 // Temporarily jam in kFill, so we only ever ask for the raw outline from th
e cache. |
1693 paint.setStyle(SkPaint::kFill_Style); | 1693 paint.setStyle(SkPaint::kFill_Style); |
1694 paint.setPathEffect(NULL); | 1694 paint.setPathEffect(NULL); |
1695 | 1695 |
1696 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); | 1696 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); |
1697 SkAutoGlyphCache autoCache(paint, NULL, NULL); | 1697 SkAutoGlyphCache autoCache(paint, &fDevice->surfaceProps(), NULL); |
1698 SkGlyphCache* cache = autoCache.getCache(); | 1698 SkGlyphCache* cache = autoCache.getCache(); |
1699 | 1699 |
1700 const char* stop = text + byteLength; | 1700 const char* stop = text + byteLength; |
1701 SkTextAlignProc alignProc(paint.getTextAlign()); | 1701 SkTextAlignProc alignProc(paint.getTextAlign()); |
1702 SkTextMapStateProc tmsProc(SkMatrix::I(), offset, scalarsPerPosition); | 1702 SkTextMapStateProc tmsProc(SkMatrix::I(), offset, scalarsPerPosition); |
1703 | 1703 |
1704 // Now restore the original settings, so we "draw" with whatever style/strok
ing. | 1704 // Now restore the original settings, so we "draw" with whatever style/strok
ing. |
1705 paint.setStyle(origPaint.getStyle()); | 1705 paint.setStyle(origPaint.getStyle()); |
1706 paint.setPathEffect(origPaint.getPathEffect()); | 1706 paint.setPathEffect(origPaint.getPathEffect()); |
1707 | 1707 |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2260 mask->fImage = SkMask::AllocImage(size); | 2260 mask->fImage = SkMask::AllocImage(size); |
2261 memset(mask->fImage, 0, mask->computeImageSize()); | 2261 memset(mask->fImage, 0, mask->computeImageSize()); |
2262 } | 2262 } |
2263 | 2263 |
2264 if (SkMask::kJustComputeBounds_CreateMode != mode) { | 2264 if (SkMask::kJustComputeBounds_CreateMode != mode) { |
2265 draw_into_mask(*mask, devPath, style); | 2265 draw_into_mask(*mask, devPath, style); |
2266 } | 2266 } |
2267 | 2267 |
2268 return true; | 2268 return true; |
2269 } | 2269 } |
OLD | NEW |