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

Side by Side Diff: include/core/SkMatrix.h

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 | « no previous file | src/core/SkMatrix.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkMatrix_DEFINED 10 #ifndef SkMatrix_DEFINED
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 584
585 static MapPtsProc GetMapPtsProc(TypeMask mask) { 585 static MapPtsProc GetMapPtsProc(TypeMask mask) {
586 SkASSERT((mask & ~kAllMasks) == 0); 586 SkASSERT((mask & ~kAllMasks) == 0);
587 return gMapPtsProcs[mask & kAllMasks]; 587 return gMapPtsProcs[mask & kAllMasks];
588 } 588 }
589 589
590 MapPtsProc getMapPtsProc() const { 590 MapPtsProc getMapPtsProc() const {
591 return GetMapPtsProc(this->getType()); 591 return GetMapPtsProc(this->getType());
592 } 592 }
593 593
594 /** Returns true if the matrix can be stepped in X (not complex
595 perspective).
596 */
597 bool isFixedStepInX() const;
598
594 /** If the matrix can be stepped in X (not complex perspective) 599 /** If the matrix can be stepped in X (not complex perspective)
595 then return true and if step[XY] is not null, return the step[XY] value. 600 then return the step value.
596 If it cannot, return false and ignore step. 601 If it cannot, behavior is undefined.
597 */ 602 */
598 bool fixedStepInX(SkScalar y, SkFixed* stepX, SkFixed* stepY) const; 603 SkVector fixedStepInX(SkScalar y) const;
599 604
600 /** Efficient comparison of two matrices. It distinguishes between zero and 605 /** Efficient comparison of two matrices. It distinguishes between zero and
601 * negative zero. It will return false when the sign of zero values is the 606 * negative zero. It will return false when the sign of zero values is the
602 * only difference between the two matrices. It considers NaN values to be 607 * only difference between the two matrices. It considers NaN values to be
603 * equal to themselves. So a matrix full of NaNs is "cheap equal" to 608 * equal to themselves. So a matrix full of NaNs is "cheap equal" to
604 * another matrix full of NaNs iff the NaN values are bitwise identical 609 * another matrix full of NaNs iff the NaN values are bitwise identical
605 * while according to strict the strict == test a matrix with a NaN value 610 * while according to strict the strict == test a matrix with a NaN value
606 * is equal to nothing, including itself. 611 * is equal to nothing, including itself.
607 */ 612 */
608 bool cheapEqualTo(const SkMatrix& m) const { 613 bool cheapEqualTo(const SkMatrix& m) const {
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 830
826 static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int ); 831 static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int );
827 832
828 static const MapPtsProc gMapPtsProcs[]; 833 static const MapPtsProc gMapPtsProcs[];
829 834
830 friend class SkPerspIter; 835 friend class SkPerspIter;
831 }; 836 };
832 SK_END_REQUIRE_DENSE 837 SK_END_REQUIRE_DENSE
833 838
834 #endif 839 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698