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

Unified Diff: src/gpu/GrStrokeInfo.h

Issue 1116123003: Improve caching of dashed paths in GrStencilAndCoverPathRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@dashing-nvpr-01
Patch Set: . Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrStrokeInfo.h
diff --git a/src/gpu/GrStrokeInfo.h b/src/gpu/GrStrokeInfo.h
index e1349a7eece9d941afdc8dfdd801154d759ccc62..0a2500901ab0fb6788eeee8fec8d7f0faeeedf63 100644
--- a/src/gpu/GrStrokeInfo.h
+++ b/src/gpu/GrStrokeInfo.h
@@ -55,6 +55,21 @@ public:
return *this;
}
+ bool operator==(const GrStrokeInfo& other) const {
+ if (this->isDashed() != other.isDashed()) {
+ return false;
+ }
+ if (this->isDashed()) {
+ if (fDashPhase != other.fDashPhase ||
+ fIntervals.count() != other.fIntervals.count() ||
egdaniel 2015/05/05 19:48:44 align these lines under each other? It could be th
Kimmo Kinnunen 2015/05/06 08:30:25 It was intentional -- some reviewers want *me* to
+ memcmp(fIntervals.get(), other.fIntervals.get(),
+ fIntervals.count() * sizeof(SkScalar)) != 0) {
+ return false;
+ }
+ }
+ return fStroke == other.fStroke;
+ }
+
const SkStrokeRec& getStrokeRec() const { return fStroke; }
SkStrokeRec* getStrokeRecPtr() { return &fStroke; }

Powered by Google App Engine
This is Rietveld 408576698