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 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1527 } | 1527 } |
1528 | 1528 |
1529 SkDraw1Glyph::Proc SkDraw1Glyph::init(const SkDraw* draw, SkBlitter* blitter, Sk
GlyphCache* cache, | 1529 SkDraw1Glyph::Proc SkDraw1Glyph::init(const SkDraw* draw, SkBlitter* blitter, Sk
GlyphCache* cache, |
1530 const SkPaint& pnt) { | 1530 const SkPaint& pnt) { |
1531 fDraw = draw; | 1531 fDraw = draw; |
1532 fBlitter = blitter; | 1532 fBlitter = blitter; |
1533 fCache = cache; | 1533 fCache = cache; |
1534 fPaint = &pnt; | 1534 fPaint = &pnt; |
1535 | 1535 |
1536 if (cache->isSubpixel()) { | 1536 if (cache->isSubpixel()) { |
1537 fHalfSampleX = fHalfSampleY = (SK_FixedHalf >> SkGlyph::kSubBits); | 1537 fHalfSampleX = fHalfSampleY = SkGlyph::kSubpixelRound; |
1538 } else { | 1538 } else { |
1539 fHalfSampleX = fHalfSampleY = SK_FixedHalf; | 1539 fHalfSampleX = fHalfSampleY = SK_FixedHalf; |
1540 } | 1540 } |
1541 | 1541 |
1542 if (hasCustomD1GProc(*draw)) { | 1542 if (hasCustomD1GProc(*draw)) { |
1543 // todo: fix this assumption about clips w/ custom | 1543 // todo: fix this assumption about clips w/ custom |
1544 fClip = draw->fClip; | 1544 fClip = draw->fClip; |
1545 fClipBounds = fClip->getBounds(); | 1545 fClipBounds = fClip->getBounds(); |
1546 return draw->fProcs->fD1GProc; | 1546 return draw->fProcs->fD1GProc; |
1547 } | 1547 } |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2394 mask->fImage = SkMask::AllocImage(size); | 2394 mask->fImage = SkMask::AllocImage(size); |
2395 memset(mask->fImage, 0, mask->computeImageSize()); | 2395 memset(mask->fImage, 0, mask->computeImageSize()); |
2396 } | 2396 } |
2397 | 2397 |
2398 if (SkMask::kJustComputeBounds_CreateMode != mode) { | 2398 if (SkMask::kJustComputeBounds_CreateMode != mode) { |
2399 draw_into_mask(*mask, devPath, style); | 2399 draw_into_mask(*mask, devPath, style); |
2400 } | 2400 } |
2401 | 2401 |
2402 return true; | 2402 return true; |
2403 } | 2403 } |
OLD | NEW |