OLD | NEW |
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 #include "SkRect.h" | 9 #include "SkRect.h" |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 quad[0].set(fLeft, fTop); | 42 quad[0].set(fLeft, fTop); |
43 quad[1].set(fRight, fTop); | 43 quad[1].set(fRight, fTop); |
44 quad[2].set(fRight, fBottom); | 44 quad[2].set(fRight, fBottom); |
45 quad[3].set(fLeft, fBottom); | 45 quad[3].set(fLeft, fBottom); |
46 } | 46 } |
47 | 47 |
48 #include "SkNx.h" | 48 #include "SkNx.h" |
49 | 49 |
50 static inline bool is_finite(const Sk4s& value) { | 50 static inline bool is_finite(const Sk4s& value) { |
51 Sk4i finite = value * Sk4s(0) == Sk4s(0); | 51 auto finite = value * Sk4s(0) == Sk4s(0); |
52 return finite.allTrue(); | 52 return finite.allTrue(); |
53 } | 53 } |
54 | 54 |
55 bool SkRect::setBoundsCheck(const SkPoint pts[], int count) { | 55 bool SkRect::setBoundsCheck(const SkPoint pts[], int count) { |
56 SkASSERT((pts && count > 0) || count == 0); | 56 SkASSERT((pts && count > 0) || count == 0); |
57 | 57 |
58 bool isFinite = true; | 58 bool isFinite = true; |
59 | 59 |
60 if (count <= 0) { | 60 if (count <= 0) { |
61 sk_bzero(this, sizeof(SkRect)); | 61 sk_bzero(this, sizeof(SkRect)); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 SkString strL, strT, strR, strB; | 168 SkString strL, strT, strR, strB; |
169 SkAppendScalarDec(&strL, fLeft); | 169 SkAppendScalarDec(&strL, fLeft); |
170 SkAppendScalarDec(&strT, fTop); | 170 SkAppendScalarDec(&strT, fTop); |
171 SkAppendScalarDec(&strR, fRight); | 171 SkAppendScalarDec(&strR, fRight); |
172 SkAppendScalarDec(&strB, fBottom); | 172 SkAppendScalarDec(&strB, fBottom); |
173 line.printf("SkRect::MakeLTRB(%s, %s, %s, %s);", | 173 line.printf("SkRect::MakeLTRB(%s, %s, %s, %s);", |
174 strL.c_str(), strT.c_str(), strR.c_str(), strB.c_str()); | 174 strL.c_str(), strT.c_str(), strR.c_str(), strB.c_str()); |
175 } | 175 } |
176 SkDebugf("%s\n", line.c_str()); | 176 SkDebugf("%s\n", line.c_str()); |
177 } | 177 } |
OLD | NEW |