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 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1594 | 1594 |
1595 // SkScalarRec doesn't currently have a way of representing hairline stroke
and | 1595 // SkScalarRec doesn't currently have a way of representing hairline stroke
and |
1596 // will fill if its frame-width is 0. | 1596 // will fill if its frame-width is 0. |
1597 if (ShouldDrawTextAsPaths(paint, *fMatrix)) { | 1597 if (ShouldDrawTextAsPaths(paint, *fMatrix)) { |
1598 this->drawText_asPaths(text, byteLength, x, y, paint); | 1598 this->drawText_asPaths(text, byteLength, x, y, paint); |
1599 return; | 1599 return; |
1600 } | 1600 } |
1601 | 1601 |
1602 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); | 1602 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); |
1603 | 1603 |
1604 SkAutoGlyphCache autoCache(paint, &fDevice->getLeakyProperties(), fMatrix
); | 1604 SkAutoGlyphCache autoCache(paint, &fDevice->surfaceProps(), fMatrix); |
1605 SkGlyphCache* cache = autoCache.getCache(); | 1605 SkGlyphCache* cache = autoCache.getCache(); |
1606 | 1606 |
1607 // transform our starting point | 1607 // transform our starting point |
1608 { | 1608 { |
1609 SkPoint loc; | 1609 SkPoint loc; |
1610 fMatrix->mapXY(x, y, &loc); | 1610 fMatrix->mapXY(x, y, &loc); |
1611 x = loc.fX; | 1611 x = loc.fX; |
1612 y = loc.fY; | 1612 y = loc.fY; |
1613 } | 1613 } |
1614 | 1614 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1740 if (text == NULL || byteLength == 0 || fRC->isEmpty()) { | 1740 if (text == NULL || byteLength == 0 || fRC->isEmpty()) { |
1741 return; | 1741 return; |
1742 } | 1742 } |
1743 | 1743 |
1744 if (ShouldDrawTextAsPaths(paint, *fMatrix)) { | 1744 if (ShouldDrawTextAsPaths(paint, *fMatrix)) { |
1745 this->drawPosText_asPaths(text, byteLength, pos, scalarsPerPosition, off
set, paint); | 1745 this->drawPosText_asPaths(text, byteLength, pos, scalarsPerPosition, off
set, paint); |
1746 return; | 1746 return; |
1747 } | 1747 } |
1748 | 1748 |
1749 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); | 1749 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); |
1750 SkAutoGlyphCache autoCache(paint, &fDevice->getLeakyProperties(), fMatrix
); | 1750 SkAutoGlyphCache autoCache(paint, &fDevice->surfaceProps(), fMatrix); |
1751 SkGlyphCache* cache = autoCache.getCache(); | 1751 SkGlyphCache* cache = autoCache.getCache(); |
1752 | 1752 |
1753 SkAAClipBlitterWrapper wrapper; | 1753 SkAAClipBlitterWrapper wrapper; |
1754 SkAutoBlitterChoose blitterChooser; | 1754 SkAutoBlitterChoose blitterChooser; |
1755 SkBlitter* blitter = NULL; | 1755 SkBlitter* blitter = NULL; |
1756 if (needsRasterTextBlit(*this)) { | 1756 if (needsRasterTextBlit(*this)) { |
1757 blitterChooser.choose(fDst, *fMatrix, paint); | 1757 blitterChooser.choose(fDst, *fMatrix, paint); |
1758 blitter = blitterChooser.get(); | 1758 blitter = blitterChooser.get(); |
1759 if (fRC->isAA()) { | 1759 if (fRC->isAA()) { |
1760 wrapper.init(*fRC, blitter); | 1760 wrapper.init(*fRC, blitter); |
(...skipping 499 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 |