Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: src/core/SkDraw.cpp

Issue 1768433003: remove align16 calls in skhader context sizes. will handle this elsewhere as needed (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkComposeShader.cpp ('k') | src/core/SkEmptyShader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/core/SkComposeShader.cpp ('k') | src/core/SkEmptyShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698