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

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: add comment 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
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkScan.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698