| 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 #include "SkDraw.h" | 8 #include "SkDraw.h" |
| 9 #include "SkBlitter.h" | 9 #include "SkBlitter.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 | 1569 |
| 1570 // SkScalarRec doesn't currently have a way of representing hairline stroke
and | 1570 // SkScalarRec doesn't currently have a way of representing hairline stroke
and |
| 1571 // will fill if its frame-width is 0. | 1571 // will fill if its frame-width is 0. |
| 1572 if (ShouldDrawTextAsPaths(paint, *fMatrix)) { | 1572 if (ShouldDrawTextAsPaths(paint, *fMatrix)) { |
| 1573 this->drawText_asPaths(text, byteLength, x, y, paint); | 1573 this->drawText_asPaths(text, byteLength, x, y, paint); |
| 1574 return; | 1574 return; |
| 1575 } | 1575 } |
| 1576 | 1576 |
| 1577 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); | 1577 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); |
| 1578 | 1578 |
| 1579 SkAutoGlyphCache autoCache(paint, &fDevice->fLeakyProperties, fMatrix); | 1579 SkAutoGlyphCache autoCache(paint, &fDevice->getLeakyProperties(), fMatrix
); |
| 1580 SkGlyphCache* cache = autoCache.getCache(); | 1580 SkGlyphCache* cache = autoCache.getCache(); |
| 1581 | 1581 |
| 1582 // transform our starting point | 1582 // transform our starting point |
| 1583 { | 1583 { |
| 1584 SkPoint loc; | 1584 SkPoint loc; |
| 1585 fMatrix->mapXY(x, y, &loc); | 1585 fMatrix->mapXY(x, y, &loc); |
| 1586 x = loc.fX; | 1586 x = loc.fX; |
| 1587 y = loc.fY; | 1587 y = loc.fY; |
| 1588 } | 1588 } |
| 1589 | 1589 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1717 return; | 1717 return; |
| 1718 } | 1718 } |
| 1719 | 1719 |
| 1720 if (ShouldDrawTextAsPaths(paint, *fMatrix)) { | 1720 if (ShouldDrawTextAsPaths(paint, *fMatrix)) { |
| 1721 this->drawPosText_asPaths(text, byteLength, pos, constY, | 1721 this->drawPosText_asPaths(text, byteLength, pos, constY, |
| 1722 scalarsPerPosition, paint); | 1722 scalarsPerPosition, paint); |
| 1723 return; | 1723 return; |
| 1724 } | 1724 } |
| 1725 | 1725 |
| 1726 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); | 1726 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); |
| 1727 SkAutoGlyphCache autoCache(paint, &fDevice->fLeakyProperties, fMatrix); | 1727 SkAutoGlyphCache autoCache(paint, &fDevice->getLeakyProperties(), fMatrix
); |
| 1728 SkGlyphCache* cache = autoCache.getCache(); | 1728 SkGlyphCache* cache = autoCache.getCache(); |
| 1729 | 1729 |
| 1730 SkAAClipBlitterWrapper wrapper; | 1730 SkAAClipBlitterWrapper wrapper; |
| 1731 SkAutoBlitterChoose blitterChooser; | 1731 SkAutoBlitterChoose blitterChooser; |
| 1732 SkBlitter* blitter = NULL; | 1732 SkBlitter* blitter = NULL; |
| 1733 if (needsRasterTextBlit(*this)) { | 1733 if (needsRasterTextBlit(*this)) { |
| 1734 blitterChooser.choose(*fBitmap, *fMatrix, paint); | 1734 blitterChooser.choose(*fBitmap, *fMatrix, paint); |
| 1735 blitter = blitterChooser.get(); | 1735 blitter = blitterChooser.get(); |
| 1736 if (fRC->isAA()) { | 1736 if (fRC->isAA()) { |
| 1737 wrapper.init(*fRC, blitter); | 1737 wrapper.init(*fRC, blitter); |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2378 mask->fImage = SkMask::AllocImage(size); | 2378 mask->fImage = SkMask::AllocImage(size); |
| 2379 memset(mask->fImage, 0, mask->computeImageSize()); | 2379 memset(mask->fImage, 0, mask->computeImageSize()); |
| 2380 } | 2380 } |
| 2381 | 2381 |
| 2382 if (SkMask::kJustComputeBounds_CreateMode != mode) { | 2382 if (SkMask::kJustComputeBounds_CreateMode != mode) { |
| 2383 draw_into_mask(*mask, devPath, style); | 2383 draw_into_mask(*mask, devPath, style); |
| 2384 } | 2384 } |
| 2385 | 2385 |
| 2386 return true; | 2386 return true; |
| 2387 } | 2387 } |
| OLD | NEW |