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

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

Issue 2084603002: assert that non-empty clips have non-empty bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 "SkAAClip.h" 8 #include "SkAAClip.h"
9 #include "SkAtomics.h" 9 #include "SkAtomics.h"
10 #include "SkBlitter.h" 10 #include "SkBlitter.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 SkASSERT(0 == width); 185 SkASSERT(0 == width);
186 return row - origRow; 186 return row - origRow;
187 } 187 }
188 188
189 void SkAAClip::validate() const { 189 void SkAAClip::validate() const {
190 if (nullptr == fRunHead) { 190 if (nullptr == fRunHead) {
191 SkASSERT(fBounds.isEmpty()); 191 SkASSERT(fBounds.isEmpty());
192 return; 192 return;
193 } 193 }
194 SkASSERT(!fBounds.isEmpty());
194 195
195 const RunHead* head = fRunHead; 196 const RunHead* head = fRunHead;
196 SkASSERT(head->fRefCnt > 0); 197 SkASSERT(head->fRefCnt > 0);
197 SkASSERT(head->fRowCount > 0); 198 SkASSERT(head->fRowCount > 0);
198 199
199 const YOffset* yoff = head->yoffsets(); 200 const YOffset* yoff = head->yoffsets();
200 const YOffset* ystop = yoff + head->fRowCount; 201 const YOffset* ystop = yoff + head->fRowCount;
201 const int lastY = fBounds.height() - 1; 202 const int lastY = fBounds.height() - 1;
202 203
203 // Y and offset must be monotonic 204 // Y and offset must be monotonic
(...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 rowMask.fBounds.fBottom = y + 1; 2211 rowMask.fBounds.fBottom = y + 1;
2211 fBlitter->blitMask(rowMask, rowMask.fBounds); 2212 fBlitter->blitMask(rowMask, rowMask.fBounds);
2212 src = (const void*)((const char*)src + srcRB); 2213 src = (const void*)((const char*)src + srcRB);
2213 } while (++y < localStopY); 2214 } while (++y < localStopY);
2214 } while (y < stopY); 2215 } while (y < stopY);
2215 } 2216 }
2216 2217
2217 const SkPixmap* SkAAClipBlitter::justAnOpaqueColor(uint32_t* value) { 2218 const SkPixmap* SkAAClipBlitter::justAnOpaqueColor(uint32_t* value) {
2218 return nullptr; 2219 return nullptr;
2219 } 2220 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698