| 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 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1765 } | 1765 } |
| 1766 | 1766 |
| 1767 | 1767 |
| 1768 SkTriColorShader::TriColorShaderContext::TriColorShaderContext(const SkTriColorS
hader& shader, | 1768 SkTriColorShader::TriColorShaderContext::TriColorShaderContext(const SkTriColorS
hader& shader, |
| 1769 const ContextRec&
rec) | 1769 const ContextRec&
rec) |
| 1770 : INHERITED(shader, rec) {} | 1770 : INHERITED(shader, rec) {} |
| 1771 | 1771 |
| 1772 SkTriColorShader::TriColorShaderContext::~TriColorShaderContext() {} | 1772 SkTriColorShader::TriColorShaderContext::~TriColorShaderContext() {} |
| 1773 | 1773 |
| 1774 size_t SkTriColorShader::onContextSize(const ContextRec&) const { | 1774 size_t SkTriColorShader::onContextSize(const ContextRec&) const { |
| 1775 return SkAlign16(sizeof(TriColorShaderContext)); | 1775 return sizeof(TriColorShaderContext); |
| 1776 } | 1776 } |
| 1777 | 1777 |
| 1778 void SkTriColorShader::TriColorShaderContext::shadeSpan(int x, int y, SkPMColor
dstC[], int count) { | 1778 void SkTriColorShader::TriColorShaderContext::shadeSpan(int x, int y, SkPMColor
dstC[], int count) { |
| 1779 const int alphaScale = Sk255To256(this->getPaintAlpha()); | 1779 const int alphaScale = Sk255To256(this->getPaintAlpha()); |
| 1780 | 1780 |
| 1781 SkPoint src; | 1781 SkPoint src; |
| 1782 | 1782 |
| 1783 for (int i = 0; i < count; i++) { | 1783 for (int i = 0; i < count; i++) { |
| 1784 fDstToUnit.mapXY(SkIntToScalar(x), SkIntToScalar(y), &src); | 1784 fDstToUnit.mapXY(SkIntToScalar(x), SkIntToScalar(y), &src); |
| 1785 x += 1; | 1785 x += 1; |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2057 mask->fImage = SkMask::AllocImage(size); | 2057 mask->fImage = SkMask::AllocImage(size); |
| 2058 memset(mask->fImage, 0, mask->computeImageSize()); | 2058 memset(mask->fImage, 0, mask->computeImageSize()); |
| 2059 } | 2059 } |
| 2060 | 2060 |
| 2061 if (SkMask::kJustComputeBounds_CreateMode != mode) { | 2061 if (SkMask::kJustComputeBounds_CreateMode != mode) { |
| 2062 draw_into_mask(*mask, devPath, style); | 2062 draw_into_mask(*mask, devPath, style); |
| 2063 } | 2063 } |
| 2064 | 2064 |
| 2065 return true; | 2065 return true; |
| 2066 } | 2066 } |
| OLD | NEW |