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 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 fDevice->drawPath(*this, *iterPath, pnt, &matrix, false); | 1428 fDevice->drawPath(*this, *iterPath, pnt, &matrix, false); |
1429 } else { | 1429 } else { |
1430 this->drawPath(*iterPath, pnt, &matrix, false); | 1430 this->drawPath(*iterPath, pnt, &matrix, false); |
1431 } | 1431 } |
1432 } | 1432 } |
1433 prevXPos = xpos; | 1433 prevXPos = xpos; |
1434 } | 1434 } |
1435 } | 1435 } |
1436 | 1436 |
1437 // disable warning : local variable used without having been initialized | 1437 // disable warning : local variable used without having been initialized |
1438 #if defined _WIN32 && _MSC_VER >= 1300 | 1438 #if defined _WIN32 |
1439 #pragma warning ( push ) | 1439 #pragma warning ( push ) |
1440 #pragma warning ( disable : 4701 ) | 1440 #pragma warning ( disable : 4701 ) |
1441 #endif | 1441 #endif |
1442 | 1442 |
1443 ////////////////////////////////////////////////////////////////////////////////
//////////////////// | 1443 ////////////////////////////////////////////////////////////////////////////////
//////////////////// |
1444 | 1444 |
1445 class DrawOneGlyph { | 1445 class DrawOneGlyph { |
1446 public: | 1446 public: |
1447 DrawOneGlyph(const SkDraw& draw, const SkPaint& paint, SkGlyphCache* cache,
SkBlitter* blitter) | 1447 DrawOneGlyph(const SkDraw& draw, const SkPaint& paint, SkGlyphCache* cache,
SkBlitter* blitter) |
1448 : fUseRegionToDraw(UsingRegionToDraw(draw.fRC)) | 1448 : fUseRegionToDraw(UsingRegionToDraw(draw.fRC)) |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 SkAutoBlitterChoose blitterChooser(fDst, *fMatrix, paint); | 1664 SkAutoBlitterChoose blitterChooser(fDst, *fMatrix, paint); |
1665 SkAAClipBlitterWrapper wrapper(*fRC, blitterChooser.get()); | 1665 SkAAClipBlitterWrapper wrapper(*fRC, blitterChooser.get()); |
1666 DrawOneGlyph drawOneGlyph(*this, paint, cache.get(), wrapper.getBl
itter()); | 1666 DrawOneGlyph drawOneGlyph(*this, paint, cache.get(), wrapper.getBl
itter()); |
1667 SkPaint::Align textAlignment = paint.getTextAlign(); | 1667 SkPaint::Align textAlignment = paint.getTextAlign(); |
1668 | 1668 |
1669 SkFindAndPlaceGlyph::ProcessPosText( | 1669 SkFindAndPlaceGlyph::ProcessPosText( |
1670 paint.getTextEncoding(), text, byteLength, | 1670 paint.getTextEncoding(), text, byteLength, |
1671 offset, *fMatrix, pos, scalarsPerPosition, textAlignment, cache.get(), d
rawOneGlyph); | 1671 offset, *fMatrix, pos, scalarsPerPosition, textAlignment, cache.get(), d
rawOneGlyph); |
1672 } | 1672 } |
1673 | 1673 |
1674 #if defined _WIN32 && _MSC_VER >= 1300 | 1674 #if defined _WIN32 |
1675 #pragma warning ( pop ) | 1675 #pragma warning ( pop ) |
1676 #endif | 1676 #endif |
1677 | 1677 |
1678 /////////////////////////////////////////////////////////////////////////////// | 1678 /////////////////////////////////////////////////////////////////////////////// |
1679 | 1679 |
1680 static SkScan::HairRCProc ChooseHairProc(bool doAntiAlias) { | 1680 static SkScan::HairRCProc ChooseHairProc(bool doAntiAlias) { |
1681 return doAntiAlias ? SkScan::AntiHairLine : SkScan::HairLine; | 1681 return doAntiAlias ? SkScan::AntiHairLine : SkScan::HairLine; |
1682 } | 1682 } |
1683 | 1683 |
1684 static bool texture_to_matrix(const VertState& state, const SkPoint verts[], | 1684 static bool texture_to_matrix(const VertState& state, const SkPoint verts[], |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2073 mask->fImage = SkMask::AllocImage(size); | 2073 mask->fImage = SkMask::AllocImage(size); |
2074 memset(mask->fImage, 0, mask->computeImageSize()); | 2074 memset(mask->fImage, 0, mask->computeImageSize()); |
2075 } | 2075 } |
2076 | 2076 |
2077 if (SkMask::kJustComputeBounds_CreateMode != mode) { | 2077 if (SkMask::kJustComputeBounds_CreateMode != mode) { |
2078 draw_into_mask(*mask, devPath, style); | 2078 draw_into_mask(*mask, devPath, style); |
2079 } | 2079 } |
2080 | 2080 |
2081 return true; | 2081 return true; |
2082 } | 2082 } |
OLD | NEW |