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

Unified Diff: src/gpu/GrAAConvexPathRenderer.cpp

Issue 815553003: Move ViewMatrix off of drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-fragment-stage
Patch Set: more cleaning Created 6 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/gpu/GrAAConvexPathRenderer.h ('k') | src/gpu/GrAADistanceFieldPathRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 3a344ce0b8130f9f4a90c3f8bdc4641bb345cbcb..47b68ed18f3147f68df76b26603a7f1c23ee8327 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -627,7 +627,7 @@ public:
private:
QuadEdgeEffect(GrColor color, const SkMatrix& localMatrix)
- : INHERITED(color, false, localMatrix) {
+ : INHERITED(color, SkMatrix::I(), localMatrix) {
this->initClassID<QuadEdgeEffect>();
fInPosition = &this->addVertexAttrib(GrAttribute("inPosition", kVec2f_GrVertexAttribType));
fInQuadEdge = &this->addVertexAttrib(GrAttribute("inQuadEdge", kVec4f_GrVertexAttribType));
@@ -671,6 +671,7 @@ GrGeometryProcessor* QuadEdgeEffect::TestCreate(SkRandom* random,
bool GrAAConvexPathRenderer::canDrawPath(const GrDrawTarget* target,
const GrDrawState*,
+ const SkMatrix& viewMatrix,
const SkPath& path,
const SkStrokeRec& stroke,
bool antiAlias) const {
@@ -681,6 +682,7 @@ bool GrAAConvexPathRenderer::canDrawPath(const GrDrawTarget* target,
bool GrAAConvexPathRenderer::onDrawPath(GrDrawTarget* target,
GrDrawState* drawState,
GrColor color,
+ const SkMatrix& vm,
const SkPath& origPath,
const SkStrokeRec&,
bool antiAlias) {
@@ -690,14 +692,12 @@ bool GrAAConvexPathRenderer::onDrawPath(GrDrawTarget* target,
return true;
}
- SkMatrix viewMatrix = drawState->getViewMatrix();
+ SkMatrix viewMatrix = vm;
SkMatrix invert;
if (!viewMatrix.invert(&invert)) {
return false;
}
- GrDrawState::AutoViewMatrixRestore avmr(drawState);
-
// We use the fact that SkPath::transform path does subdivision based on
// perspective. Otherwise, we apply the view matrix when copying to the
// segment representation.
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.h ('k') | src/gpu/GrAADistanceFieldPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698