Index: src/gpu/GrDefaultPathRenderer.cpp |
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp |
index d8f723eaefdc0fc33b0c1e5cef664fb5acacb14f..7222e628e8e22bdd58664b77e9299cece06a6a3a 100644 |
--- a/src/gpu/GrDefaultPathRenderer.cpp |
+++ b/src/gpu/GrDefaultPathRenderer.cpp |
@@ -364,8 +364,8 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawTarget* target, |
tol)) { |
return false; |
} |
- |
- bool colorWritesWereDisabled = drawState->isColorWriteDisabled(); |
+ // Save the current xp on the draw state so we can reset it if needed |
+ SkAutoTUnref<const GrXPFactory> backupXPFactory(SkRef(drawState->getXPFactory())); |
// face culling doesn't make sense here |
SkASSERT(GrDrawState::kBoth_DrawFace == drawState->getDrawFace()); |
@@ -471,9 +471,8 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawTarget* target, |
} |
if (lastPassIsBounds && (p == passCount-1)) { |
- if (!colorWritesWereDisabled) { |
- drawState->disableState(GrDrawState::kNoColorWrites_StateBit); |
- } |
+ // Reset the XP Factory on drawState |
+ drawState->setXPFactory(backupXPFactory); |
SkRect bounds; |
GrDrawState::AutoViewMatrixRestore avmr; |
if (reverse) { |
@@ -495,7 +494,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawTarget* target, |
target->drawSimpleRect(drawState, color, bounds); |
} else { |
if (passCount > 1) { |
- drawState->enableState(GrDrawState::kNoColorWrites_StateBit); |
+ drawState->setDisableColorXPFactory(); |
} |
GrDrawState::AutoRestoreEffects are(drawState); |
SkAutoTUnref<const GrGeometryProcessor> gp( |