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

Unified Diff: src/gpu/effects/GrDashingEffect.cpp

Issue 1121463002: Move bounds to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks 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
« src/gpu/GrDrawTarget.cpp ('K') | « src/gpu/GrTestBatch.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDashingEffect.cpp
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
index a284b272db239bea4d31ac991a2b81aca6615a7e..f95e1e3469e6c2766a1662fac1b599365c6d6c6e 100644
--- a/src/gpu/effects/GrDashingEffect.cpp
+++ b/src/gpu/effects/GrDashingEffect.cpp
@@ -256,7 +256,6 @@ public:
SkScalar fIntervals[2];
SkScalar fParallelScale;
SkScalar fPerpendicularScale;
- SkDEBUGCODE(SkRect fDevBounds;)
};
static GrBatch* Create(const Geometry& geometry, SkPaint::Cap cap, DashAAMode aaMode,
@@ -646,6 +645,9 @@ private:
fBatch.fAAMode = aaMode;
fBatch.fCap = cap;
fBatch.fFullDash = fullDash;
+
+ // TODO more accurate bounds
+ this->setBoundsLargest();
}
bool onCombineIfPossible(GrBatch* t) override {
@@ -674,6 +676,7 @@ private:
}
fGeoData.push_back_n(that->geoData()->count(), that->geoData()->begin());
+ this->joinBounds(that->bounds());
return true;
}
« src/gpu/GrDrawTarget.cpp ('K') | « src/gpu/GrTestBatch.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698