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

Unified Diff: src/core/SkPathRef.cpp

Issue 1491843006: add support for capped hairlines (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: suppress warning Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: src/core/SkPathRef.cpp
diff --git a/src/core/SkPathRef.cpp b/src/core/SkPathRef.cpp
index 12429aecfcc889b3244ab03c40dbfea423464780..acf72d98589dab3a42ee2b753281d5bebe1892a5 100644
--- a/src/core/SkPathRef.cpp
+++ b/src/core/SkPathRef.cpp
@@ -573,6 +573,11 @@ uint8_t SkPathRef::Iter::next(SkPoint pts[4]) {
return (uint8_t) verb;
}
+uint8_t SkPathRef::Iter::peek() const {
+ const uint8_t* next = fVerbs - 1;
reed1 2015/12/08 16:59:02 I wonder if this should just SkASSERT if we read p
caryclark 2015/12/08 19:59:39 I'll try the assert. I thought that if fVerbs is p
+ return next <= fVerbStop ? (uint8_t) SkPath::kDone_Verb : *next;
+}
+
#ifdef SK_DEBUG
void SkPathRef::validate() const {
this->INHERITED::validate();
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkScan.h » ('j') | src/core/SkScan_Hairline.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698