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

Side by Side Diff: src/core/SkRegionPriv.h

Issue 1620333002: Revert of Consolidate SK_CRASH and sk_throw into SK_ABORT (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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/SkPath.cpp ('k') | src/device/xps/SkXPSDevice.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 SkRegionPriv_DEFINED 10 #ifndef SkRegionPriv_DEFINED
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return fIntervalCount; 59 return fIntervalCount;
60 } 60 }
61 61
62 static RunHead* Alloc(int count) { 62 static RunHead* Alloc(int count) {
63 //SkDEBUGCODE(sk_atomic_inc(&gRgnAllocCounter);) 63 //SkDEBUGCODE(sk_atomic_inc(&gRgnAllocCounter);)
64 //SkDEBUGF(("************** gRgnAllocCounter::alloc %d\n", gRgnAllocCoun ter)); 64 //SkDEBUGF(("************** gRgnAllocCounter::alloc %d\n", gRgnAllocCoun ter));
65 65
66 SkASSERT(count >= SkRegion::kRectRegionRuns); 66 SkASSERT(count >= SkRegion::kRectRegionRuns);
67 67
68 const int64_t size = sk_64_mul(count, sizeof(RunType)) + sizeof(RunHead) ; 68 const int64_t size = sk_64_mul(count, sizeof(RunType)) + sizeof(RunHead) ;
69 if (count < 0 || !sk_64_isS32(size)) { SK_ABORT("Invalid Size"); } 69 if (count < 0 || !sk_64_isS32(size)) { SK_CRASH(); }
70 70
71 RunHead* head = (RunHead*)sk_malloc_throw(size); 71 RunHead* head = (RunHead*)sk_malloc_throw(size);
72 head->fRefCnt = 1; 72 head->fRefCnt = 1;
73 head->fRunCount = count; 73 head->fRunCount = count;
74 // these must be filled in later, otherwise we will be invalid 74 // these must be filled in later, otherwise we will be invalid
75 head->fYSpanCount = 0; 75 head->fYSpanCount = 0;
76 head->fIntervalCount = 0; 76 head->fIntervalCount = 0;
77 return head; 77 return head;
78 } 78 }
79 79
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 bounds->fRight = rite; 227 bounds->fRight = rite;
228 bounds->fBottom = bot; 228 bounds->fBottom = bot;
229 } 229 }
230 230
231 private: 231 private:
232 int32_t fYSpanCount; 232 int32_t fYSpanCount;
233 int32_t fIntervalCount; 233 int32_t fIntervalCount;
234 }; 234 };
235 235
236 #endif 236 #endif
OLDNEW
« no previous file with comments | « src/core/SkPath.cpp ('k') | src/device/xps/SkXPSDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698