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

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

Issue 1692013002: Change SkMatrix::fixedStepInX to return SkVector rather than SkFixed. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Split fixedStepInX into bool isFixedStepInX and SkVector fixedStepInX. Created 4 years, 10 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/SkMatrix.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('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 7
8 #include "SkAtomics.h" 8 #include "SkAtomics.h"
9 #include "SkBitmapProcShader.h" 9 #include "SkBitmapProcShader.h"
10 #include "SkColorShader.h" 10 #include "SkColorShader.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 srcA += 4; 183 srcA += 4;
184 } while (--n != 0); 184 } while (--n != 0);
185 } while (count > 0); 185 } while (count > 0);
186 #endif 186 #endif
187 } 187 }
188 188
189 SkShader::Context::MatrixClass SkShader::Context::ComputeMatrixClass(const SkMat rix& mat) { 189 SkShader::Context::MatrixClass SkShader::Context::ComputeMatrixClass(const SkMat rix& mat) {
190 MatrixClass mc = kLinear_MatrixClass; 190 MatrixClass mc = kLinear_MatrixClass;
191 191
192 if (mat.hasPerspective()) { 192 if (mat.hasPerspective()) {
193 if (mat.fixedStepInX(0, nullptr, nullptr)) { 193 if (mat.isFixedStepInX()) {
194 mc = kFixedStepInX_MatrixClass; 194 mc = kFixedStepInX_MatrixClass;
195 } else { 195 } else {
196 mc = kPerspective_MatrixClass; 196 mc = kPerspective_MatrixClass;
197 } 197 }
198 } 198 }
199 return mc; 199 return mc;
200 } 200 }
201 201
202 ////////////////////////////////////////////////////////////////////////////// 202 //////////////////////////////////////////////////////////////////////////////
203 203
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 #include "SkEmptyShader.h" 354 #include "SkEmptyShader.h"
355 355
356 void SkEmptyShader::toString(SkString* str) const { 356 void SkEmptyShader::toString(SkString* str) const {
357 str->append("SkEmptyShader: ("); 357 str->append("SkEmptyShader: (");
358 358
359 this->INHERITED::toString(str); 359 this->INHERITED::toString(str);
360 360
361 str->append(")"); 361 str->append(")");
362 } 362 }
363 #endif 363 #endif
OLDNEW
« no previous file with comments | « src/core/SkMatrix.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698