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

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

Issue 699623003: Crop the fast path dashed lines to the cull rect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address coordinate xform issue Created 6 years, 1 month 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 | « gm/dashing.cpp ('k') | src/core/SkDraw.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // only return the public masks 53 // only return the public masks
54 return (TypeMask)(fTypeMask & 0xF); 54 return (TypeMask)(fTypeMask & 0xF);
55 } 55 }
56 56
57 /** Returns true if the matrix is identity. 57 /** Returns true if the matrix is identity.
58 */ 58 */
59 bool isIdentity() const { 59 bool isIdentity() const {
60 return this->getType() == 0; 60 return this->getType() == 0;
61 } 61 }
62 62
63 bool isScaleTranslate() const {
64 return !(this->getType() & ~(kScale_Mask | kTranslate_Mask));
65 }
66
63 /** Returns true if will map a rectangle to another rectangle. This can be 67 /** Returns true if will map a rectangle to another rectangle. This can be
64 true if the matrix is identity, scale-only, or rotates a multiple of 68 true if the matrix is identity, scale-only, or rotates a multiple of
65 90 degrees. 69 90 degrees.
66 */ 70 */
67 bool rectStaysRect() const { 71 bool rectStaysRect() const {
68 if (fTypeMask & kUnknown_Mask) { 72 if (fTypeMask & kUnknown_Mask) {
69 fTypeMask = this->computeTypeMask(); 73 fTypeMask = this->computeTypeMask();
70 } 74 }
71 return (fTypeMask & kRectStaysRect_Mask) != 0; 75 return (fTypeMask & kRectStaysRect_Mask) != 0;
72 } 76 }
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], 738 static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[],
735 int count); 739 int count);
736 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); 740 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int);
737 741
738 static const MapPtsProc gMapPtsProcs[]; 742 static const MapPtsProc gMapPtsProcs[];
739 743
740 friend class SkPerspIter; 744 friend class SkPerspIter;
741 }; 745 };
742 746
743 #endif 747 #endif
OLDNEW
« no previous file with comments | « gm/dashing.cpp ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698